Removal of unnnecessary files

This commit is contained in:
1redmine 2025-07-01 13:55:13 +02:00
parent e7dc9b7ba8
commit 9ff21d929b
25 changed files with 23 additions and 120 deletions

View File

@ -20,9 +20,9 @@
name: "GitHub CI"
on:
push:
branches: ["devel"]
branches: ["cleanup"]
pull_request:
branches: ["devel"]
branches: ["cleanup"]
jobs:
plugin_tests:
strategy:

View File

@ -1,38 +0,0 @@
# frozen_string_literal: true
# Redmine plugin for Custom Workflows
#
# Anton Argirov, Karel Pičman <karel.picman@kontron.com>
#
# This file is part of Redmine OAuth plugin.
#
# Redmine Custom Workflows plugin is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# Redmine Custom Workflows plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along with Redmine Custom Workflows plugin. If not,
# see <https://www.gnu.org/licenses/>.
require 'redmine'
require "#{File.dirname(__FILE__)}/lib/redmine_custom_workflows"
def custom_workflows_init
# Administration menu extension
Redmine::MenuManager.map :admin_menu do |menu|
menu.push :custom_workflows, { controller: 'custom_workflows', action: 'index' },
caption: :label_custom_workflow_plural, icon: 'workflows',
html: { class: 'icon icon-workflows workflows' }
end
end
if Redmine::Plugin.installed?('easy_extensions')
ActiveSupport.on_load(:easyproject, yield: true) do
custom_workflows_init
end
else
custom_workflows_init
end

10
init.rb
View File

@ -17,6 +17,9 @@
# You should have received a copy of the GNU General Public License along with Redmine Custom Workflows plugin. If not,
# see <https://www.gnu.org/licenses/>.
require 'redmine'
require "#{File.dirname(__FILE__)}/lib/redmine_custom_workflows"
Redmine::Plugin.register :redmine_custom_workflows do
name 'Redmine Custom Workflow plugin'
url 'https://www.redmine.org/plugins/redmine_custom_workflows'
@ -30,4 +33,9 @@ Redmine::Plugin.register :redmine_custom_workflows do
permission :manage_project_workflow, {}, require: :member
end
require_relative 'after_init' unless Redmine::Plugin.installed?('easy_extensions')
# Administration menu extension
Redmine::MenuManager.map :admin_menu do |menu|
menu.push :custom_workflows, { controller: 'custom_workflows', action: 'index' },
caption: :label_custom_workflow_plural, icon: 'workflows',
html: { class: 'icon icon-workflows workflows' }
end

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module AttachmentsControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module GroupsControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module IssueRelationsControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module IssuesControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module MembersControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module ProjectsControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module TimelogControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module UsersControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module VersionsControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -24,7 +24,6 @@ module RedmineCustomWorkflows
module WikiControllerPatch
################################################################################################################
# New methods
#
def self.prepended(base)
base.class_eval do

View File

@ -40,10 +40,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_helper_patch 'ProjectsHelper',
'RedmineCustomWorkflows::Patches::Helpers::ProjectsHelperPatch',
prepend: true
else
ProjectsController.send :helper, RedmineCustomWorkflows::Patches::Helpers::ProjectsHelperPatch
end
ProjectsController.send :helper, RedmineCustomWorkflows::Patches::Helpers::ProjectsHelperPatch

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'Attachment',
'RedmineCustomWorkflows::Patches::Models::AttachmentPatch'
else
Attachment.prepend RedmineCustomWorkflows::Patches::Models::AttachmentPatch
end
Attachment.prepend RedmineCustomWorkflows::Patches::Models::AttachmentPatch

View File

@ -89,8 +89,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'Group', 'RedmineCustomWorkflows::Patches::Models::GroupPatch'
else
Group.prepend RedmineCustomWorkflows::Patches::Models::GroupPatch
end
Group.prepend RedmineCustomWorkflows::Patches::Models::GroupPatch

View File

@ -103,8 +103,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'Issue', 'RedmineCustomWorkflows::Patches::Models::IssuePatch'
else
Issue.prepend RedmineCustomWorkflows::Patches::Models::IssuePatch
end
Issue.prepend RedmineCustomWorkflows::Patches::Models::IssuePatch

View File

@ -87,9 +87,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'IssueRelation',
'RedmineCustomWorkflows::Patches::Models::IssueRelationPatch'
else
IssueRelation.prepend RedmineCustomWorkflows::Patches::Models::IssueRelationPatch
end
IssueRelation.prepend RedmineCustomWorkflows::Patches::Models::IssueRelationPatch

View File

@ -69,8 +69,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'Member', 'RedmineCustomWorkflows::Patches::Models::MemberPatch'
else
Member.prepend RedmineCustomWorkflows::Patches::Models::MemberPatch
end
Member.prepend RedmineCustomWorkflows::Patches::Models::MemberPatch

View File

@ -97,9 +97,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'Project',
'RedmineCustomWorkflows::Patches::Models::ProjectPatch'
else
Project.prepend RedmineCustomWorkflows::Patches::Models::ProjectPatch
end
Project.prepend RedmineCustomWorkflows::Patches::Models::ProjectPatch

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'TimeEntry',
'RedmineCustomWorkflows::Patches::Models::TimeEntryPatch'
else
TimeEntry.prepend RedmineCustomWorkflows::Patches::Models::TimeEntryPatch
end
TimeEntry.prepend RedmineCustomWorkflows::Patches::Models::TimeEntryPatch

View File

@ -69,8 +69,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'User', 'RedmineCustomWorkflows::Patches::Models::UserPatch'
else
User.prepend RedmineCustomWorkflows::Patches::Models::UserPatch
end
User.prepend RedmineCustomWorkflows::Patches::Models::UserPatch

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'Version',
'RedmineCustomWorkflows::Patches::Models::VersionPatch'
else
Version.prepend RedmineCustomWorkflows::Patches::Models::VersionPatch
end
Version.prepend RedmineCustomWorkflows::Patches::Models::VersionPatch

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'WikiContent',
'RedmineCustomWorkflows::Patches::Models::WikiContentPatch'
else
WikiContent.prepend RedmineCustomWorkflows::Patches::Models::WikiContentPatch
end
WikiContent.prepend RedmineCustomWorkflows::Patches::Models::WikiContentPatch

View File

@ -58,9 +58,4 @@ module RedmineCustomWorkflows
end
# Apply the patch
if Redmine::Plugin.installed?('easy_extensions')
RedmineExtensions::PatchManager.register_model_patch 'WikiPage',
'RedmineCustomWorkflows::Patches::Models::WikiPagePatch'
else
WikiPage.prepend RedmineCustomWorkflows::Patches::Models::WikiPagePatch
end
WikiPage.prepend RedmineCustomWorkflows::Patches::Models::WikiPagePatch