Skip to content

Commit

Permalink
Merge pull request #168 from spark-solutions/feature/rainbow-gem
Browse files Browse the repository at this point in the history
Feature/rainbow gem
  • Loading branch information
damianlegawiec authored Mar 14, 2017
2 parents 326c36b + e68f97c commit 912f10b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion deface.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Gem::Specification.new do |s|

s.add_dependency('nokogiri', '~> 1.6')
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')
Expand Down
1 change: 0 additions & 1 deletion lib/deface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
require "deface/matchers/range"
require "deface/environment"
require "deface/precompiler"
require "colorize"

module Deface
if defined?(Rails)
Expand Down
6 changes: 4 additions & 2 deletions lib/deface/utils/failure_finder.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'rainbow'

module Deface
module Utils
module FailureFinder
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions tasks/utils.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'deface'
require 'deface/utils/failure_finder'
require 'colorize'
require 'rainbow'

namespace :deface do
include Deface::TemplateHelper
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 912f10b

Please sign in to comment.