Skip to content
Browse files

Update cli reporter

  • Loading branch information...
1 parent 50de0ae commit 24d2711a6938b5d5ea43d36253208a3b377ee3ed @txus txus committed
Showing with 28 additions and 40 deletions.
  1. +1 −1 .rvmrc
  2. +0 −11 Gemfile
  3. +2 −2 Gemfile.lock
  4. +3 −3 colorant.gemspec
  5. +20 −21 features/cli.feature
  6. +1 −1 lib/colorant/reporter.rb
  7. +1 −1 lib/colorant/version.rb
View
2 .rvmrc
@@ -1 +1 @@
-rvm --create use ruby-1.9.2@colorist > /dev/null
+rvm --create use ruby-1.9.2@colorant
View
11 Gemfile
@@ -2,14 +2,3 @@ source :rubygems
# Specify your gem's dependencies in colorist.gemspec
gemspec
-# gem "color_namer", :git => 'git://github.com/retro/color-namer.git'
-# gem "bundler"
-# gem "rspec", :git => 'git://github.com/rspec/rspec.git'
-# gem "rspec-expectations", :git => 'git://github.com/rspec/rspec-expectations.git'
-# gem "rspec-mocks", :git => 'git://github.com/rspec/rspec-mocks.git'
-# gem "rspec-core", :git => 'git://github.com/rspec/rspec-core.git'
-#
-# gem "aruba", :git => 'git://github.com/aslakhellesoy/aruba.git'
-# gem "cucumber", :git => 'git://github.com/aslakhellesoy/cucumber.git'
-# gem "watchr"
-# gem "trollop"
View
4 Gemfile.lock
@@ -55,7 +55,7 @@ GIT
PATH
remote: .
specs:
- colorist (0.0.1)
+ colorant (0.1.2)
GEM
remote: http://rubygems.org/
@@ -79,7 +79,7 @@ DEPENDENCIES
aruba!
bundler
color_namer!
- colorist!
+ colorant!
cucumber!
rspec!
rspec-core!
View
6 colorant.gemspec
@@ -14,14 +14,14 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "colorant"
+ s.add_runtime_dependency "color_namer"
+ s.add_runtime_dependency 'trollop'
+
s.add_development_dependency "bundler", ">= 1.0.3"
s.add_development_dependency 'rspec'
s.add_development_dependency 'cucumber'
s.add_development_dependency 'aruba'
- s.add_runtime_dependency 'trollop'
- s.add_runtime_dependency "color_namer"
-
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
s.require_path = 'lib'
View
41 features/cli.feature
@@ -3,28 +3,27 @@ Feature: Command line interpreter
You can use Colorist from the command line as well.
Scenario: get the most relevant colors out of the Arnolfini Portrait
- When I run "colorist arnolfini.jpg --colors 8 --depth 24"
+ When I run "colorant arnolfini.jpg --colors 8 --depth 24"
- Then the exit status should be 0
- And the output should contain "Brown -- 40.54 %"
- And the output should contain "Red -- 17.88 %"
- And the output should contain "Brown -- 12.76 %"
- And the output should contain "Red -- 9.95 %"
- And the output should contain "Brown -- 8.03 %"
- And the output should contain "Brown -- 4.25 %"
- And the output should contain "Red -- 3.55 %"
- And the output should contain "Brown -- 3.03 %"
+ Then the output should match /\tBrown\t\t\t\t\t\t-- 40.54 %/
+ And the output should match /\Red\t\t\t\t\t\t-- 17.88 %/
+ And the output should match /\tBrown\t\t\t\t\t\t-- 12.76 %/
+ And the output should match /\tRed\t\t\t\t\t\t-- 9.95 %/
+ And the output should match /\tBrown\t\t\t\t\t\t-- 8.03 %/
+ And the output should match /\tBrown\t\t\t\t\t\t-- 4.25 %/
+ And the output should match /\tRed\t\t\t\t\t\t-- 3.55 %/
+ And the output should match /\tBrown\t\t\t\t\t\t-- 3.03 %/
+ And the exit status should be 0
Scenario: get an extended report over the Arnolfini Portrait
- When I run "colorist arnolfini.jpg --extended"
+ When I run "colorant arnolfini.jpg --extended"
- Then the exit status should be 0
- And the output should contain "Cocoa Brown -- 40.54 %"
- And the output should contain "Moccaccino Red -- 17.88 %"
- And the output should contain "Rock Brown -- 12.76 %"
- And the output should contain "Mojo Red -- 9.95 %"
- And the output should contain "Brown Derby -- 8.03 %"
- And the output should contain "Dark Tan Brown -- 4.25 %"
- And the output should contain "Brandy Rose Red -- 3.55 %"
- And the output should contain "Vanilla Brown -- 3.03 %"
-
+ Then the output should match /\tCocoa Brown\t\t\t\t\t\t-- 40.54 %/
+ And the output should match /\tMoccaccino Red\t\t\t\t\t\t-- 17.88 %/
+ And the output should match /\tRock Brown\t\t\t\t\t\t-- 12.76 %/
+ And the output should match /\tMojo Red\t\t\t\t\t\t-- 9.95 %/
+ And the output should match /\tBrown Derby\t\t\t\t\t\t-- 8.03 %/
+ And the output should match /\tDark Tan Brown\t\t\t\t\t\t-- 4.25 %/
+ And the output should match /\tBrandy Rose Red\t\t\t\t\t\t-- 3.55 %/
+ And the output should match /\tVanilla Brown\t\t\t\t\t\t-- 3.03 %/
+ And the exit status should be 0
View
2 lib/colorant/reporter.rb
@@ -30,7 +30,7 @@ def ruby_report(array)
def stdout_report(array)
array.each do |line|
- stdout << "\t#{line.first}\t\t-- #{line.last} %\n"
+ stdout << "\t#{line.first}\t\t\t\t\t\t-- #{line.last} %\n"
end
stdout << "\n"
end
View
2 lib/colorant/version.rb
@@ -1,3 +1,3 @@
module Colorant
- VERSION = "0.1.1"
+ VERSION = "0.1.2"
end

0 comments on commit 24d2711

Please sign in to comment.
Something went wrong with that request. Please try again.