From bab0836cdfdfaec07d92f73a7ad45e07e1013c95 Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Fri, 3 Feb 2017 09:39:10 -0800 Subject: [PATCH] Revert to old colored gem Introduced many regressions --- credentials_manager/lib/credentials_manager.rb | 2 +- fastlane.gemspec | 2 +- fastlane_core/lib/fastlane_core.rb | 2 +- fastlane_core/lib/fastlane_core/helper.rb | 2 +- fastlane_core/lib/fastlane_core/ui/disable_colors.rb | 8 ++++---- frameit/frames_generator/Rakefile | 2 +- pilot/spec/tester_manager_spec.rb | 2 +- rakelib/issue_stats.rake | 2 +- rakelib/release_stats.rake | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/credentials_manager/lib/credentials_manager.rb b/credentials_manager/lib/credentials_manager.rb index 152da3a9439..00219b5306f 100644 --- a/credentials_manager/lib/credentials_manager.rb +++ b/credentials_manager/lib/credentials_manager.rb @@ -4,7 +4,7 @@ require 'credentials_manager/appfile_config' # Third Party code -require 'colored2' +require 'colored' require 'security' require 'highline/import' # to hide the entered password diff --git a/fastlane.gemspec b/fastlane.gemspec index e58dbad365d..ef97a48a114 100644 --- a/fastlane.gemspec +++ b/fastlane.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'word_wrap', '~> 1.0.0' # to add line breaks for tables with long strings spec.add_dependency 'babosa', '>= 1.0.2', "< 2.0.0" - spec.add_dependency 'colored2', '>= 3.1.1', "< 4.0.0" # coloured terminal output + spec.add_dependency 'colored' # coloured terminal output spec.add_dependency 'commander', '>= 4.4.0', '< 5.0.0' # CLI parser spec.add_dependency 'excon', '>= 0.45.0', '< 1.0.0' # Great HTTP Client spec.add_dependency 'faraday-cookie_jar', '~> 0.0.6' diff --git a/fastlane_core/lib/fastlane_core.rb b/fastlane_core/lib/fastlane_core.rb index 0b80eaa9668..d79f0eabdf5 100644 --- a/fastlane_core/lib/fastlane_core.rb +++ b/fastlane_core/lib/fastlane_core.rb @@ -31,7 +31,7 @@ require 'fastlane_core/swag' # Third Party code -require 'colored2' +require 'colored' require 'commander' # after commander import diff --git a/fastlane_core/lib/fastlane_core/helper.rb b/fastlane_core/lib/fastlane_core/helper.rb index 27a7741aa89..642ba3c7614 100644 --- a/fastlane_core/lib/fastlane_core/helper.rb +++ b/fastlane_core/lib/fastlane_core/helper.rb @@ -1,5 +1,5 @@ require 'logger' -require 'colored2' +require 'colored' module FastlaneCore module Helper diff --git a/fastlane_core/lib/fastlane_core/ui/disable_colors.rb b/fastlane_core/lib/fastlane_core/ui/disable_colors.rb index f1225cea847..19582c097d3 100644 --- a/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +++ b/fastlane_core/lib/fastlane_core/ui/disable_colors.rb @@ -1,15 +1,15 @@ # This code overwrites the methods from the colored gem -# via https://github.com/kigster/colored2/blob/aa274018906641ffb07aaa3015081a174d169dfe/lib/colored2.rb +# via https://github.com/defunkt/colored/blob/master/lib/colored.rb -require 'colored2' +require 'colored' class String - Colored2::COLORS.keys.each do |color| + Colored::COLORS.keys.each do |color| define_method(color) do self # do nothing with the string, but return it end end - Colored2::EFFECTS.keys.each do |extra| + Colored::EXTRAS.keys.each do |extra| define_method(extra) do self # do nothing with the string, but return it end diff --git a/frameit/frames_generator/Rakefile b/frameit/frames_generator/Rakefile index c7f96e55def..ca86d10c418 100644 --- a/frameit/frames_generator/Rakefile +++ b/frameit/frames_generator/Rakefile @@ -1,4 +1,4 @@ -require 'colored2' +require 'colored' require 'mini_magick' require 'json' diff --git a/pilot/spec/tester_manager_spec.rb b/pilot/spec/tester_manager_spec.rb index a2eb042b0c5..53f20a35018 100644 --- a/pilot/spec/tester_manager_spec.rb +++ b/pilot/spec/tester_manager_spec.rb @@ -1,4 +1,4 @@ -require 'colored2' +require 'colored' require 'ostruct' describe Pilot::TesterManager do diff --git a/rakelib/issue_stats.rake b/rakelib/issue_stats.rake index 026b71f32cd..b8fc7f923c1 100644 --- a/rakelib/issue_stats.rake +++ b/rakelib/issue_stats.rake @@ -51,7 +51,7 @@ task :issue_stats do require 'json' require 'faraday' require 'terminal-table' - require 'colored2' + require 'colored' raise "Please set GITHUB_SCRIPT_TOKEN in your environment with a GitHub personal access token value".red if GITHUB_TOKEN.to_s.empty? diff --git a/rakelib/release_stats.rake b/rakelib/release_stats.rake index 7c8fa6113d3..2caa237c932 100644 --- a/rakelib/release_stats.rake +++ b/rakelib/release_stats.rake @@ -23,7 +23,7 @@ desc 'Print stats about how much time has passed and work has happened since the task :release_stats do require 'date' require 'terminal-table' - require 'colored2' + require 'colored' require 'shellwords' `git pull --tags`