diff --git a/deface.gemspec b/deface.gemspec index 45107ea..eb8f13c 100644 --- a/deface.gemspec +++ b/deface.gemspec @@ -17,10 +17,11 @@ Gem::Specification.new do |s| s.add_dependency('nokogiri', '~> 1.6.0') s.add_dependency('rails', '>= 4.1') - s.add_dependency('colorize', '>= 0.5.8') + s.add_dependency('rainbow', '>= 2.1.0') s.add_dependency('polyglot') s.add_development_dependency('appraisal') + s.add_development_dependency('erubis') s.add_development_dependency('rspec', '>= 3.1.0') s.add_development_dependency('haml', '~> 4.0') s.add_development_dependency('slim', '~> 3.0') diff --git a/lib/deface.rb b/lib/deface.rb index 1745e30..b952169 100644 --- a/lib/deface.rb +++ b/lib/deface.rb @@ -36,7 +36,6 @@ require "deface/matchers/range" require "deface/environment" require "deface/precompiler" -require "colorize" module Deface if defined?(Rails) diff --git a/lib/deface/utils/failure_finder.rb b/lib/deface/utils/failure_finder.rb index 761babd..96cadf9 100644 --- a/lib/deface/utils/failure_finder.rb +++ b/lib/deface/utils/failure_finder.rb @@ -1,3 +1,5 @@ +require 'rainbow' + module Deface module Utils module FailureFinder @@ -28,9 +30,9 @@ def output_results_by_virtual_path(virtual_path) fails.each do |override| if override.failure.nil? - puts " '#{override.name}' reported no failures".green + puts Rainbow(" '#{override.name}' reported no failures").green else - puts " '#{override.name}' #{override.failure}".red + puts Rainbow(" '#{override.name}' #{override.failure}").red end end diff --git a/tasks/utils.rake b/tasks/utils.rake index 2e2b950..f669a60 100644 --- a/tasks/utils.rake +++ b/tasks/utils.rake @@ -1,6 +1,6 @@ require 'deface' require 'deface/utils/failure_finder' -require 'colorize' +require 'rainbow' namespace :deface do include Deface::TemplateHelper @@ -68,10 +68,10 @@ namespace :deface do end if fail_count == 0 - puts "\nEverything's looking good!".green + puts Rainbow("\nEverything's looking good!").green exit(0) else - puts "\nYou had a total of #{fail_count} failures.".red + puts Rainbow("\nYou had a total of #{fail_count} failures.").red exit(1) end end