forked from eaxdev/redmine_watcher_groups
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.rb
37 lines (28 loc) · 1.19 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
27
28
29
30
31
32
33
34
35
36
37
require 'redmine'
require_dependency 'watcher_groups/views_issues_hook'
require_dependency 'watcher_groups_helper'
require_dependency 'watcher_groups_issue_hook'
require_dependency 'watchers_list_override'
Rails.logger.info 'Starting Watcher Groups plugin for Redmine'
Rails.configuration.to_prepare do
unless WatchersHelper.included_modules.include?(WatchersListOverride)
WatchersHelper.send(:prepend, WatchersListOverride)
end
unless WatcherGroupsHelper.included_modules.include?(WatchersHelper)
WatcherGroupsHelper.send(:include, WatchersHelper)
end
unless Issue.included_modules.include?(WatcherGroupsIssuePatch)
Issue.send(:include, WatcherGroupsIssuePatch)
end
unless IssuesController.included_modules.include?(WatcherGroupsIssuesControllerPatch)
IssuesController.send(:include, WatcherGroupsIssuesControllerPatch)
end
end
Redmine::Plugin.register :redmine_watcher_groups do
name 'Redmine Watcher Groups plugin'
author 'Kamen Ferdinandov, Massimo Rossello'
description 'This is a plugin for Redmine to add watcher groups functionality'
version '1.0.0'
url 'https://github.com/maxrossello/redmine_watcher_groups'
author_url 'https://github.com/maxrossello'
end