forked from drewkeller/redmine_better_gantt_chart
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinit.rb
executable file
·35 lines (30 loc) · 1.29 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
require 'redmine'
require 'dispatcher' unless Rails::VERSION::MAJOR >= 3
if Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do
require_dependency 'redmine_better_gantt_chart/patches'
unless ActiveRecord::Base.included_modules.include?(RedmineBetterGanttChart::ActiveRecord::CallbackExtensionsForRails3)
ActiveRecord::Base.send(:include, RedmineBetterGanttChart::ActiveRecord::CallbackExtensionsForRails3)
end
end
else
Dispatcher.to_prepare :redmine_better_gantt_chart do
unless ActiveRecord::Base.included_modules.include?(RedmineBetterGanttChart::ActiveRecord::CallbackExtensionsForRails2)
ActiveRecord::Base.send(:include, RedmineBetterGanttChart::ActiveRecord::CallbackExtensionsForRails2)
end
require_dependency 'redmine_better_gantt_chart/patches'
end
end
Redmine::Plugin.register :redmine_better_gantt_chart do
name 'Redmine Better Gantt Chart plugin'
author 'Alexey Kuleshov'
description 'This plugin improves Redmine Gantt Chart'
version '0.7.0'
url 'https://github.com/kulesa/redmine_better_gantt_chart'
author_url 'http://github.com/kulesa'
requires_redmine :version_or_higher => '1.1.0'
settings(:default => {
'work_on_weekends' => true,
'smart_sorting' => true
}, :partial => "better_gantt_chart_settings")
end