-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinit.rb
26 lines (21 loc) · 1.04 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require_dependency 'redmine_diff_popup/hooks/diff_popup_hook'
require_dependency 'redmine_diff_popup/patches/issues_helper_patch'
require_dependency 'redmine_diff_popup/patches/user_preference_patch'
reloader = defined?(ActiveSupport::Reloader) ? ActiveSupport::Reloader : ActionDispatch::Reloader
reloader.to_prepare do
unless UserPreference.included_modules.include?(RedmineDiffPopup::Patches::UserPreferencePatch)
UserPreference.send :prepend, RedmineDiffPopup::Patches::UserPreferencePatch
end
unless IssuesHelper.included_modules.include?(RedmineDiffPopup::Patches::IssuesHelperPatch)
IssuesHelper.send :include, RedmineDiffPopup::Patches::IssuesHelperPatch
end
end
Redmine::Plugin.register :redmine_diff_popup do
name 'Redmine Diff Popup plugin'
author 'Ryuta Tobita'
description 'This plugin provide on pop-up show feature of diff.'
version '2.2.0'
url 'https://github.com/GEROMAX/redmine_diff_popup'
author_url 'https://github.com/GEROMAX'
permission :wiki_popup, {:wiki_popup => [:wiki_diff]}, :public => true
end