Commit e26acdb1 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Just extend main, rather than include to Kernel

Unfortunately rake doesn't have nested context,
everything just runs on a main rake object.
This is probably due to compatibility issue,
but anyway, we could just extend the object.
parent fafd6a0a
...@@ -41,8 +41,6 @@ namespace :gitlab do ...@@ -41,8 +41,6 @@ namespace :gitlab do
end end
namespace :gitlab_shell do namespace :gitlab_shell do
include SystemCheck::Helpers
desc "GitLab | Check the configuration of GitLab Shell" desc "GitLab | Check the configuration of GitLab Shell"
task check: :environment do task check: :environment do
warn_user_is_not_gitlab warn_user_is_not_gitlab
...@@ -249,8 +247,6 @@ namespace :gitlab do ...@@ -249,8 +247,6 @@ namespace :gitlab do
end end
namespace :sidekiq do namespace :sidekiq do
include SystemCheck::Helpers
desc "GitLab | Check the configuration of Sidekiq" desc "GitLab | Check the configuration of Sidekiq"
task check: :environment do task check: :environment do
warn_user_is_not_gitlab warn_user_is_not_gitlab
...@@ -309,8 +305,6 @@ namespace :gitlab do ...@@ -309,8 +305,6 @@ namespace :gitlab do
end end
namespace :incoming_email do namespace :incoming_email do
include SystemCheck::Helpers
desc "GitLab | Check the configuration of Reply by email" desc "GitLab | Check the configuration of Reply by email"
task check: :environment do task check: :environment do
warn_user_is_not_gitlab warn_user_is_not_gitlab
...@@ -444,8 +438,6 @@ namespace :gitlab do ...@@ -444,8 +438,6 @@ namespace :gitlab do
end end
namespace :ldap do namespace :ldap do
include SystemCheck::Helpers
task :check, [:limit] => :environment do |_, args| task :check, [:limit] => :environment do |_, args|
# Only show up to 100 results because LDAP directories can be very big. # Only show up to 100 results because LDAP directories can be very big.
# This setting only affects the `rake gitlab:check` script. # This setting only affects the `rake gitlab:check` script.
...@@ -501,8 +493,6 @@ namespace :gitlab do ...@@ -501,8 +493,6 @@ namespace :gitlab do
end end
namespace :repo do namespace :repo do
include SystemCheck::Helpers
desc "GitLab | Check the integrity of the repositories managed by GitLab" desc "GitLab | Check the integrity of the repositories managed by GitLab"
task check: :environment do task check: :environment do
Gitlab.config.repositories.storages.each do |name, repository_storage| Gitlab.config.repositories.storages.each do |name, repository_storage|
...@@ -517,8 +507,6 @@ namespace :gitlab do ...@@ -517,8 +507,6 @@ namespace :gitlab do
end end
namespace :user do namespace :user do
include SystemCheck::Helpers
desc "GitLab | Check the integrity of a specific user's repositories" desc "GitLab | Check the integrity of a specific user's repositories"
task :check_repos, [:username] => :environment do |t, args| task :check_repos, [:username] => :environment do |t, args|
username = args[:username] || prompt("Check repository integrity for fsername? ".color(:blue)) username = args[:username] || prompt("Check repository integrity for fsername? ".color(:blue))
......
...@@ -4,5 +4,5 @@ require 'tasks/gitlab/task_helpers' ...@@ -4,5 +4,5 @@ require 'tasks/gitlab/task_helpers'
StateMachines::Machine.ignore_method_conflicts = true if ENV['CRON'] StateMachines::Machine.ignore_method_conflicts = true if ENV['CRON']
namespace :gitlab do namespace :gitlab do
include Gitlab::TaskHelpers extend SystemCheck::Helpers
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment