Updated patches to take advantage of the plugins plugin patching

pull/6827/head
Sebastian Schuster 11 years ago
parent 46b5a2de82
commit 5201240214
  1. 4
      lib/open_project/costs/patches/application_controller_patch.rb
  2. 6
      lib/open_project/costs/patches/application_helper_patch.rb
  3. 4
      lib/open_project/costs/patches/permitted_params_patch.rb
  4. 4
      lib/open_project/costs/patches/project_patch.rb
  5. 4
      lib/open_project/costs/patches/projects_controller_patch.rb
  6. 4
      lib/open_project/costs/patches/query_patch.rb
  7. 2
      lib/open_project/costs/patches/role_patch.rb
  8. 4
      lib/open_project/costs/patches/time_entry_patch.rb
  9. 7
      lib/open_project/costs/patches/user_patch.rb
  10. 4
      lib/open_project/costs/patches/users_helper_patch.rb
  11. 4
      lib/open_project/costs/patches/version_patch.rb
  12. 3
      lib/open_project/costs/patches/work_package_patch.rb

@ -1,5 +1,3 @@
require_dependency 'application_controller'
module OpenProject::Costs::Patches::ApplicationControllerPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
@ -17,5 +15,3 @@ module OpenProject::Costs::Patches::ApplicationControllerPatch
end
end
end
ApplicationController.send(:include, OpenProject::Costs::Patches::ApplicationControllerPatch)

@ -1,6 +1,4 @@
require_dependency 'application_helper'
module OpenProject::Costs::PatchesApplicationHelperPatch
module OpenProject::Costs::Patches::ApplicationHelperPatch
def self.included(base) # :nodoc:
# Same as typing in the class
base.class_eval do
@ -23,5 +21,3 @@ module OpenProject::Costs::PatchesApplicationHelperPatch
end
end
end
ApplicationHelper.send(:include, OpenProject::Costs::PatchesApplicationHelperPatch)

@ -1,5 +1,3 @@
require_dependency 'permitted_params'
module OpenProject::Costs::Patches::PermittedParamsPatch
def self.included(base) # :nodoc:
@ -39,5 +37,3 @@ module OpenProject::Costs::Patches::PermittedParamsPatch
end
end
end
PermittedParams.send(:include, OpenProject::Costs::Patches::PermittedParamsPatch)

@ -1,5 +1,3 @@
require_dependency 'project'
module OpenProject::Costs::Patches::ProjectPatch
def self.included(base) # :nodoc:
# Same as typing in the class
@ -17,5 +15,3 @@ module OpenProject::Costs::Patches::ProjectPatch
end
end
Project.send(:include, OpenProject::Costs::Patches::ProjectPatch)

@ -1,5 +1,3 @@
require_dependency 'projects_controller'
module OpenProject::Costs::Patches::ProjectsControllerPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
@ -19,5 +17,3 @@ module OpenProject::Costs::Patches::ProjectsControllerPatch
end
end
end
ProjectsController.send(:include, OpenProject::Costs::Patches::ProjectsControllerPatch)

@ -1,5 +1,3 @@
require_dependency 'query'
module OpenProject::Costs::Patches::QueryPatch
class CurrencyQueryColumn < QueryColumn
unloadable
@ -67,5 +65,3 @@ module OpenProject::Costs::Patches::QueryPatch
end
end
end
Query.send(:include, OpenProject::Costs::Patches::QueryPatch)

@ -67,5 +67,3 @@ module OpenProject::Costs::Patches::RolePatch
end
end
end
Role.send(:include, OpenProject::Costs::Patches::RolePatch)

@ -1,5 +1,3 @@
require_dependency 'time_entry'
# Patches Redmine's Users dynamically.
module OpenProject::Costs::Patches::TimeEntryPatch
def self.included(base) # :nodoc:
@ -106,5 +104,3 @@ module OpenProject::Costs::Patches::TimeEntryPatch
end
end
end
TimeEntry.send(:include, OpenProject::Costs::Patches::TimeEntryPatch)

@ -1,8 +1,3 @@
require_dependency 'project'
require_dependency 'principal'
require_dependency 'user'
module OpenProject::Costs::Patches::UserPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
@ -95,5 +90,3 @@ module OpenProject::Costs::Patches::UserPatch
end
end
end
User.send(:include, OpenProject::Costs::Patches::UserPatch)

@ -1,5 +1,3 @@
require_dependency 'users_helper'
module OpenProject::Costs::Patches::UsersHelperPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
@ -20,5 +18,3 @@ module OpenProject::Costs::Patches::UsersHelperPatch
end
end
end
UsersHelper.send(:include, OpenProject::Costs::Patches::UsersHelperPatch)

@ -1,5 +1,3 @@
require_dependency 'version'
module OpenProject::Costs::Patches::VersionPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
@ -16,5 +14,3 @@ module OpenProject::Costs::Patches::VersionPatch
end
end
end
Version.send(:include, OpenProject::Costs::Patches::VersionPatch)

@ -1,5 +1,3 @@
require 'work_package'
module OpenProject::Costs::Patches::WorkPackagePatch
def self.included(base) # :nodoc:
base.extend(ClassMethods)
@ -126,4 +124,3 @@ module OpenProject::Costs::Patches::WorkPackagePatch
end
WorkPackage::SAFE_ATTRIBUTES << "cost_object_id" if WorkPackage.const_defined? "SAFE_ATTRIBUTES"
WorkPackage.send(:include, OpenProject::Costs::Patches::WorkPackagePatch)

Loading…
Cancel
Save