-
Notifications
You must be signed in to change notification settings - Fork 6
/
init.rb
42 lines (36 loc) · 1.43 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
38
39
40
41
42
require 'redmine'
require_dependency 'reminder/view_hook'
Rails.configuration.to_prepare do
require_dependency 'project'
require_dependency 'principal'
require_dependency 'user'
unless User.included_modules.include? Reminder::UserPatch
User.send(:include, Reminder::UserPatch)
end
require_dependency 'issue_category'
unless IssueCategory.included_modules.include? Reminder::IssueCategoryPatch
IssueCategory.send(:include, Reminder::IssueCategoryPatch)
end
require_dependency 'issue'
unless Issue.included_modules.include? Reminder::IssuePatch
Issue.send(:include, Reminder::IssuePatch)
end
require_dependency 'settings_controller'
unless SettingsController.included_modules.include? Reminder::SettingsControllerPatch
SettingsController.send(:include, Reminder::SettingsControllerPatch)
end
require_dependency 'my_controller'
unless MyController.included_modules.include? Reminder::MyControllerPatch
MyController.send(:include, Reminder::MyControllerPatch)
end
end
Redmine::Plugin.register :redmine_reminder do
name 'Due Date Reminder plugin'
author 'Oleg Kandaurov'
description 'Sends notifications about due date'
version '0.4'
url 'https://github.com/f0y/redmine_reminder'
author_url 'http://f0y.me'
requires_redmine :version_or_higher => '2.0.0'
settings :default => {'reminder_notification' => '1,3,5', 'category_reminder_notification' => '1,3,5' }, :partial => 'reminder/settings'
end