forked from freedomofpress/due_date_reminder
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
37 lines (32 loc) · 1.24 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 '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'
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 :due_date_reminder do
name 'Due Date Reminder plugin'
author 'Oleg Kandaurov & Igor Petrov'
description 'Sends notifications about due date to email or Slack'
version '0.3.2'
url 'https://github.com/f0y/due_date_reminder'
author_url 'http://f0y.me'
requires_redmine :version_or_higher => '2.0.0'
settings :default => {'reminder_notification' => '1,3,5'}, :partial => 'reminder/settings'
end