From 501f048846bad9a66583bb73d448564eca752905 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Thu, 20 Dec 2012 19:38:44 +0100 Subject: [PATCH] Rename gitlab:app:enable_automerge to gitlab:enable_automerge --- doc/raketasks/features.md | 2 +- lib/tasks/gitlab/check.rake | 2 +- lib/tasks/gitlab/enable_automerge.rake | 20 +++++++++----------- lib/tasks/gitlab/setup.rake | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/doc/raketasks/features.md b/doc/raketasks/features.md index 9dc6a4ef..7a2a4b66 100644 --- a/doc/raketasks/features.md +++ b/doc/raketasks/features.md @@ -22,7 +22,7 @@ bundle exec rake gitlab:enable_namespaces This command will enable the auto merge feature. After this you will be able to **merge a merge request** via GitLab and use the **online editor**. ``` -bundle exec rake gitlab:app:enable_automerge +bundle exec rake gitlab:enable_automerge ``` Example output: diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index d1f81408..20d65e6e 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -192,7 +192,7 @@ namespace :gitlab do else puts "no".red try_fixing_it( - "sudo -u gitlab -H bundle exec rake gitlab:app:enable_automerge" + "sudo -u gitlab -H bundle exec rake gitlab:enable_automerge" ) for_more_information( "doc/raketasks/maintenance.md " diff --git a/lib/tasks/gitlab/enable_automerge.rake b/lib/tasks/gitlab/enable_automerge.rake index 13b4bab6..a543a8a7 100644 --- a/lib/tasks/gitlab/enable_automerge.rake +++ b/lib/tasks/gitlab/enable_automerge.rake @@ -1,17 +1,15 @@ namespace :gitlab do - namespace :app do - desc "GITLAB | Enable auto merge" - task :enable_automerge => :environment do - Gitlab::Gitolite.new.enable_automerge + desc "GITLAB | Enable auto merge" + task :enable_automerge => :environment do + Gitlab::Gitolite.new.enable_automerge - Project.find_each do |project| - if project.repo_exists? && !project.satellite.exists? - puts "Creating satellite for #{project.name}...".green - project.satellite.create - end + Project.find_each do |project| + if project.repo_exists? && !project.satellite.exists? + puts "Creating satellite for #{project.name}...".green + project.satellite.create end - - puts "Done!".green end + + puts "Done!".green end end diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake index 08f35c7e..572a22aa 100644 --- a/lib/tasks/gitlab/setup.rake +++ b/lib/tasks/gitlab/setup.rake @@ -4,7 +4,7 @@ namespace :gitlab do task :setup => [ 'db:setup', 'db:seed_fu', - 'gitlab:app:enable_automerge' + 'gitlab:enable_automerge' ] end end