-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
executable file
·40 lines (25 loc) · 966 Bytes
/
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
27
28
29
30
31
32
33
34
require 'redmine'
Redmine::Plugin.register :redmine_notify do
name 'Redmine Notice plugin'
author 'John Paul '
description 'This plugin allows you to disable the notification of the issue changes'
version '2.2.x'
end
prepare_block = Proc.new do
Journal.send(:include, RedmineNotify::JournalPatch)
JournalObserver.send(:include, RedmineNotify::JournalObserverPatch)
MyController.send(:include, RedmineNotify::MyControllerPatch)
UsersController.send(:include, RedmineNotify::UsersControllerPatch)
#Issue.send(:include, RedmineNotify::IssuePatch)
#Journal.send(:include, RedmineNotify::JournalPatch)
end
if Rails.env.development?
ActionDispatch::Reloader.to_prepare { prepare_block.call }
else
prepare_block.call
end
require 'redmine_notify/my_controller_patch'
require 'redmine_notify/users_controller_patch'
require 'redmine_notify/journal_patch'
require 'redmine_notify/journal_observer_patch'
require 'redmine_notify/view_hooks'