Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/rainbow gem #168

Merged
merged 4 commits into from
Mar 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.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')
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