Skip to content

Commit 509f18b

Browse files
author
root
committed
Rename redmine_git_hosting:restore_defaults task to redmine_git_hosting:update_settings
Add deprecation warning
1 parent e9b489e commit 509f18b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/tasks/redmine_git_hosting.rake

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
namespace :redmine_git_hosting do
22

3-
desc 'Reload defaults from init.rb into the redmine_git_hosting settings.'
4-
task restore_default_settings: [:environment] do
3+
desc 'Update plugin settings in database (This will read settings from `<redmine_root>/redmine_git_hosting.yml` and `<plugin_root>/settings.yml`)'
4+
task update_settings: [:environment] do
55
RedmineGitHosting::ConsoleLogger.title('Reloading defaults from init.rb from command line') do
66
RedmineGitHosting::Config.reload_from_file!
77
end
88
end
9-
task restore_defaults: [:restore_default_settings]
9+
10+
task :restore_defaults do
11+
ActiveSupport::Deprecation.warn('redmine_git_hosting:restore_defaults is deprecated. Use redmine_git_hosting:update_settings instead.')
12+
Rake::Task['redmine_git_hosting:update_settings'].invoke
13+
end
14+
15+
task :restore_default_settings do
16+
ActiveSupport::Deprecation.warn('redmine_git_hosting:restore_default_settings is deprecated. Use redmine_git_hosting:update_settings instead.')
17+
Rake::Task['redmine_git_hosting:update_settings'].invoke
18+
end
1019

1120

1221
desc 'Purge expired repositories from Recycle Bin'

0 commit comments

Comments
 (0)