Feature #18643 ยป init.rb
1 |
require 'dispatcher' unless Rails::VERSION::MAJOR >= 3 |
---|---|
2 |
|
3 |
if Rails::VERSION::MAJOR >= 3 |
4 |
ActionDispatch::Callbacks.to_prepare do |
5 |
require 'brightgrove_extensions' |
6 |
end
|
7 |
else
|
8 |
Dispatcher.to_prepare do |
9 |
require 'brightgrove_extensions' |
10 |
end
|
11 |
end
|
12 |
|
13 |
require 'redmine' |
14 |
# - hack consists in adding "app/overrides" path of the plugin in Redmine's main #paths
|
15 |
# came from there https://github.com/twinslash/redmine_better_journal/commit/c726266068e3a7ff56ff6947dd244070cbaf6741
|
16 |
Rails.application.paths["app/overrides"] ||= [] |
17 |
Rails.application.paths["app/overrides"] << File.expand_path("../app/overrides", __FILE__) |
18 |
|
19 |
Redmine::Plugin.register :redmine_brightgrove_extensions do |
20 |
name 'Redmine Brightgrove extenstions' |
21 |
author 'Mike Zarechenskiy' |
22 |
description 'Extensions of existing redmine application for the Brightgrove company' |
23 |
version '0.0.1' |
24 |
author_url 'https://github.com/DevMike' |
25 |
|
26 |
requires_redmine :version_or_higher => '2.3.0' |
27 |
end
|