diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-08-08 23:14:29 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-08-08 23:14:29 +0800 |
commit | 5d963fccab8732dbd5ee54579d3afbcd47131ca6 (patch) | |
tree | 17c6aea196ecfb2c51eef142201c65579c5a29b8 | |
parent | e26acdb11bef56360247a73c07be56784c52febe (diff) | |
download | gitlab-ce-5d963fccab8732dbd5ee54579d3afbcd47131ca6.tar.gz |
We shouldn't include utility methods everywhere
-rw-r--r-- | lib/tasks/gitlab/task_helpers.rb | 2 | ||||
-rw-r--r-- | spec/tasks/gitlab/shell_rake_spec.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/task_helpers.rb b/lib/tasks/gitlab/task_helpers.rb index 28b2d86eed2..d85b810ac66 100644 --- a/lib/tasks/gitlab/task_helpers.rb +++ b/lib/tasks/gitlab/task_helpers.rb @@ -5,6 +5,8 @@ module Gitlab TaskAbortedByUserError = Class.new(StandardError) module TaskHelpers + extend self + # Ask if the user wants to continue # # Returns "yes" the user chose to continue diff --git a/spec/tasks/gitlab/shell_rake_spec.rb b/spec/tasks/gitlab/shell_rake_spec.rb index ee3614c50f6..65155cb044d 100644 --- a/spec/tasks/gitlab/shell_rake_spec.rb +++ b/spec/tasks/gitlab/shell_rake_spec.rb @@ -22,7 +22,8 @@ describe 'gitlab:shell rake tasks' do describe 'create_hooks task' do it 'calls gitlab-shell bin/create_hooks' do expect_any_instance_of(Object).to receive(:system) - .with("#{Gitlab.config.gitlab_shell.path}/bin/create-hooks", *repository_storage_paths_args) + .with("#{Gitlab.config.gitlab_shell.path}/bin/create-hooks", + *Gitlab::TaskHelpers.repository_storage_paths_args) run_rake_task('gitlab:shell:create_hooks') end |