Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-07-07 16:12:06 +0400
committerMarin Jankovski <marin@gitlab.com>2014-07-07 16:12:06 +0400
commit4c68d2387e51632e9808ed3a0db9f6dc14e25b31 (patch)
treeb692e09d312de35f746256311e19bef9032ded0f /lib/tasks
parentd5a8f9ccca0b206c6a111c81a9c1ac2340974e1a (diff)
Add sanitize option to gitlab check rake task.
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/check.rake29
1 files changed, 26 insertions, 3 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 34116568e99..84f0cf8ef21 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -216,7 +216,12 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
- print "#{project.name_with_namespace.yellow} ... "
+ message = if sanitize
+ "#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
+ else
+ "#{project.name_with_namespace.yellow} ... "
+ end
+ print message
if project.satellite.exists?
puts "yes".green
@@ -525,7 +530,12 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
- print "#{project.name_with_namespace.yellow} ... "
+ message = if sanitize
+ "#{project.id.to_s.yellow} ... "
+ else
+ "#{project.name_with_namespace.yellow} ... "
+ end
+ print message
if project.empty_repo?
puts "repository is empty".magenta
@@ -588,7 +598,12 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
- print "#{project.name_with_namespace.yellow} ... "
+ message = if sanitize
+ "#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
+ else
+ "#{project.name_with_namespace.yellow} ... "
+ end
+ print message
if project.namespace
puts "yes".green
@@ -837,4 +852,12 @@ namespace :gitlab do
def omnibus_gitlab?
Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails'
end
+
+ def sanitize
+ if ENV['SANITIZE'] == "true"
+ true
+ else
+ false
+ end
+ end
end