Skip to content

Commit a111ac8

Browse files
author
root
committed
Allow to load plugin settings file from Redmine root (should ease deployment)
1 parent 2d592f5 commit a111ac8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: lib/redmine_git_hosting/redmine_plugin_loader.rb

+11-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ def authors_file
3333

3434

3535
def settings
36-
default_settings.merge(local_settings)
36+
default_settings.merge(global_settings).merge(local_settings)
37+
end
38+
39+
40+
def global_settings
41+
load_setting_file(global_settings_file)
3742
end
3843

3944

@@ -52,6 +57,11 @@ def default_settings_file
5257
end
5358

5459

60+
def global_settings_file
61+
Rails.root.join("#{plugin_name}.yml")
62+
end
63+
64+
5565
def local_settings_file
5666
plugin_dir('settings.yml')
5767
end

0 commit comments

Comments
 (0)