patch apply refactored
This commit is contained in:
@@ -16,16 +16,15 @@ Rails.configuration.to_prepare do
|
||||
end
|
||||
|
||||
# Patches
|
||||
require_dependency 'redmine_messenger/patches/issue_patch'
|
||||
require_dependency 'redmine_messenger/patches/wiki_page_patch'
|
||||
Issue.send(:include, RedmineMessenger::Patches::IssuePatch)
|
||||
WikiPage.send(:include, RedmineMessenger::Patches::WikiPagePatch)
|
||||
ProjectsController.send :helper, MessengerProjectsHelper
|
||||
|
||||
require 'redmine_messenger/patches/contact_patch' if RedmineMessenger::REDMINE_CONTACTS_SUPPORT
|
||||
require 'redmine_messenger/patches/db_entry_patch' if RedmineMessenger::REDMINE_DB_SUPPORT
|
||||
require 'redmine_messenger/patches/password_patch' if Redmine::Plugin.installed?('redmine_passwords')
|
||||
Contact.send(:include, RedmineMessenger::Patches::ContactPatch) if RedmineMessenger::REDMINE_CONTACTS_SUPPORT
|
||||
DbEntry.send(:include, RedmineMessenger::Patches::DbEntryPatch) if RedmineMessenger::REDMINE_DB_SUPPORT
|
||||
Password.send(:include, RedmineMessenger::Patches::PasswordPatch) if Redmine::Plugin.installed?('redmine_passwords')
|
||||
|
||||
# Global helpers
|
||||
require_dependency 'redmine_messenger/helpers'
|
||||
ActionView::Base.send :include, RedmineMessenger::Helpers
|
||||
|
||||
# Hooks
|
||||
require_dependency 'redmine_messenger/hooks'
|
||||
|
||||
@@ -15,5 +15,3 @@ module RedmineMessenger
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActionView::Base.send :include, RedmineMessenger::Helpers
|
||||
|
||||
@@ -45,7 +45,3 @@ module RedmineMessenger
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
unless Contact.included_modules.include? RedmineMessenger::Patches::ContactPatch
|
||||
Contact.send(:include, RedmineMessenger::Patches::ContactPatch)
|
||||
end
|
||||
|
||||
@@ -46,7 +46,3 @@ module RedmineMessenger
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
unless DbEntry.included_modules.include? RedmineMessenger::Patches::DbEntryPatch
|
||||
DbEntry.send(:include, RedmineMessenger::Patches::DbEntryPatch)
|
||||
end
|
||||
|
||||
@@ -50,7 +50,3 @@ module RedmineMessenger
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
unless WikiPage.included_modules.include? RedmineMessenger::Patches::WikiPagePatch
|
||||
WikiPage.send(:include, RedmineMessenger::Patches::WikiPagePatch)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user