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" name: "GitHub CI"
on: on:
push: push:
branches: ["devel"] branches: ["cleanup"]
pull_request: pull_request:
branches: ["devel"] branches: ["cleanup"]
jobs: jobs:
plugin_tests: plugin_tests:
strategy: 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, # 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/>. # see <https://www.gnu.org/licenses/>.
require 'redmine'
require "#{File.dirname(__FILE__)}/lib/redmine_custom_workflows"
Redmine::Plugin.register :redmine_custom_workflows do Redmine::Plugin.register :redmine_custom_workflows do
name 'Redmine Custom Workflow plugin' name 'Redmine Custom Workflow plugin'
url 'https://www.redmine.org/plugins/redmine_custom_workflows' 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 permission :manage_project_workflow, {}, require: :member
end 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 module AttachmentsControllerPatch
################################################################################################################ ################################################################################################################
# New methods # New methods
#
def self.prepended(base) def self.prepended(base)
base.class_eval do base.class_eval do

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -40,10 +40,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 ProjectsController.send :helper, RedmineCustomWorkflows::Patches::Helpers::ProjectsHelperPatch
end

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 Attachment.prepend RedmineCustomWorkflows::Patches::Models::AttachmentPatch
end

View File

@ -89,8 +89,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 Group.prepend RedmineCustomWorkflows::Patches::Models::GroupPatch
end

View File

@ -103,8 +103,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 Issue.prepend RedmineCustomWorkflows::Patches::Models::IssuePatch
end

View File

@ -87,9 +87,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 IssueRelation.prepend RedmineCustomWorkflows::Patches::Models::IssueRelationPatch
end

View File

@ -69,8 +69,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 Member.prepend RedmineCustomWorkflows::Patches::Models::MemberPatch
end

View File

@ -97,9 +97,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 Project.prepend RedmineCustomWorkflows::Patches::Models::ProjectPatch
end

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 TimeEntry.prepend RedmineCustomWorkflows::Patches::Models::TimeEntryPatch
end

View File

@ -69,8 +69,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 User.prepend RedmineCustomWorkflows::Patches::Models::UserPatch
end

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 Version.prepend RedmineCustomWorkflows::Patches::Models::VersionPatch
end

View File

@ -69,9 +69,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 WikiContent.prepend RedmineCustomWorkflows::Patches::Models::WikiContentPatch
end

View File

@ -58,9 +58,4 @@ module RedmineCustomWorkflows
end end
# Apply the patch # 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 WikiPage.prepend RedmineCustomWorkflows::Patches::Models::WikiPagePatch
end