diff --git a/Gemfile b/Gemfile index 08dfd23aa20c0071059d4c7793e074081acd8a7d..4762e2e223f011272dfc78068ad8cba1d7445318 100644 --- a/Gemfile +++ b/Gemfile @@ -125,8 +125,7 @@ gem 'sidetiq', '~> 0.6.3' gem "httparty", '~> 0.13.3' # Colored output to console -gem "colored", '~> 1.2' -gem "colorize", '~> 0.5.8' +gem "colorize", '~> 0.7.0' # GitLab settings gem 'settingslogic', '~> 2.0.9' diff --git a/Gemfile.lock b/Gemfile.lock index 8466e86492e8df6b7f708920108c6fb1bac6cf02..46247dd88e27d3f2bfe35f74e04a9d8e17fe2656 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -123,8 +123,7 @@ GEM coffee-script-source execjs coffee-script-source (1.9.1.1) - colored (1.2) - colorize (0.5.8) + colorize (0.7.7) connection_pool (2.2.0) coveralls (0.8.2) json (~> 1.8) @@ -815,8 +814,7 @@ DEPENDENCIES carrierwave (~> 0.9.0) charlock_holmes (~> 0.7.3) coffee-rails (~> 4.1.0) - colored (~> 1.2) - colorize (~> 0.5.8) + colorize (~> 0.7.0) coveralls (~> 0.8.2) creole (~> 0.5.0) d3_rails (~> 3.5.5) diff --git a/lib/tasks/gitlab/task_helpers.rake b/lib/tasks/gitlab/task_helpers.rake index c95b6540ebc6e2ce4315f2a74b2d3d2cf050b383..efb863a8764b40b5285832e418b79333c8540a46 100644 --- a/lib/tasks/gitlab/task_helpers.rake +++ b/lib/tasks/gitlab/task_helpers.rake @@ -2,16 +2,6 @@ module Gitlab class TaskAbortedByUserError < StandardError; end end -unless STDOUT.isatty - module Colored - extend self - - def colorize(string, options={}) - string - end - end -end - namespace :gitlab do # Ask if the user wants to continue @@ -103,7 +93,7 @@ namespace :gitlab do gitlab_user = Gitlab.config.gitlab.user current_user = run(%W(whoami)).chomp unless current_user == gitlab_user - puts "#{Colored.color(:black)+Colored.color(:on_yellow)} Warning #{Colored.extra(:clear)}" + puts " Warning ".colorize(:black).on_yellow puts " You are running as user #{current_user.magenta}, we hope you know what you are doing." puts " Things may work\/fail for the wrong reasons." puts " For correct results you should run this as user #{gitlab_user.magenta}."