fuubar 1.0.0 → 1.1.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.textile CHANGED
@@ -1,7 +1,8 @@
1
- h1. Fuubar "!http://stillmaintained.com/jeffkreeftmeijer/fuubar.png!":http://stillmaintained.com/jeffkreeftmeijer/fuubar
1
+ h1. Fuubar !http://travis-ci.org/jeffkreeftmeijer/fuubar.png!
2
2
 
3
3
  Fuubar is an instafailing "RSpec":http://github.com/rspec formatter that uses a progress bar instead of a string of letters and dots as feedback. Here's "a video of Fuubar in action":http://vimeo.com/16845253.
4
4
 
5
+
5
6
  h2. Installation
6
7
 
7
8
  Installing Fuubar is easy. Just put it in your @Gemfile@ and run your specs like this from now on:
@@ -13,6 +14,13 @@ If you want to use Fuubar as your default formatter, simply put the options in y
13
14
  bc. --format Fuubar
14
15
  --color
15
16
 
17
+ h3. Rspec-1
18
+
19
+ Use the "fuubar-legacy":https://rubygems.org/gems/fuubar-legacy gem:
20
+
21
+ bc. gem 'fuubar-legacy'
22
+
23
+
16
24
  h2. Contributing
17
25
 
18
26
  Found an issue? Have a great idea? Want to help? Great! Create an issue "issue":http://github.com/jeffkreeftmeijer/fuubar/issues for it, "ask":http://github.com/inbox/new/jeffkreeftmeijer, or even better; fork the project and fix the problem yourself. Pull requests are always welcome. :)
data/fuubar.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "fuubar"
5
- s.version = '1.0.0'
5
+ s.version = '1.1.0.rc1'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Nicholas Evans", "Jeff Kreeftmeijer"]
8
8
  s.email = ["jeff@kreeftmeijer.nl"]
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
 
20
20
  s.add_dependency('rspec', ["~> 2.0"])
21
- s.add_dependency('ruby-progressbar', ["~> 0.0.10"])
21
+ s.add_dependency('ruby-progressbar', ["~> 1.0.0rc1"])
22
22
  s.add_dependency('rspec-instafail', ["~> 0.2.0"])
23
23
  end
data/lib/fuubar.rb CHANGED
@@ -1,23 +1,17 @@
1
1
  require 'rspec/core/formatters/base_text_formatter'
2
- require 'progressbar'
2
+ require 'ruby-progressbar'
3
3
  require 'rspec/instafail'
4
4
 
5
5
  class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
6
6
 
7
- attr_reader :example_count, :finished_count
8
-
9
7
  def start(example_count)
10
- @example_count = example_count
11
- @finished_count = 0
12
- @progress_bar = ProgressBar.new(" #{example_count} examples", example_count, output)
13
- @progress_bar.bar_mark = '='
8
+ super
9
+ @progress_bar = ProgressBar.create(:format => ' %c/%C |%w>%i| %e ', :total => example_count, :output => output)
14
10
  end
15
11
 
16
12
  def increment
17
13
  with_color do
18
- @finished_count += 1
19
- @progress_bar.instance_variable_set("@title", " #{finished_count}/#{example_count}")
20
- @progress_bar.inc
14
+ @progress_bar.increment
21
15
  end
22
16
  end
23
17
 
@@ -43,10 +37,6 @@ class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
43
37
  increment
44
38
  end
45
39
 
46
- def start_dump
47
- with_color { @progress_bar.finish }
48
- end
49
-
50
40
  def dump_failures
51
41
  # don't!
52
42
  end
data/spec/fuubar_spec.rb CHANGED
@@ -18,31 +18,23 @@ describe Fuubar do
18
18
  describe 'start' do
19
19
 
20
20
  it 'should create a new ProgressBar' do
21
- progress_bar.should be_instance_of ProgressBar
21
+ progress_bar.should be_instance_of ProgressBar::Base
22
22
  end
23
23
 
24
- it 'should set the title' do
25
- progress_bar.instance_variable_get(:@title).should == ' 2 examples'
24
+ it 'should set the format of the bar' do
25
+ progress_bar.instance_variable_get(:@format_string).should == ' %c/%C |%w>%i| %e '
26
26
  end
27
27
 
28
28
  it 'should set the total amount of specs' do
29
- progress_bar.instance_variable_get(:@total).should == 2
29
+ progress_bar.total.should == 2
30
30
  end
31
31
 
32
32
  it 'should set the output' do
33
- progress_bar.instance_variable_get(:@out).should == formatter.output
34
- end
35
-
36
- it 'should set the example_count' do
37
- formatter.instance_variable_get(:@example_count).should == 2
38
- end
39
-
40
- it 'should set the finished_count to 0' do
41
- formatter.instance_variable_get(:@finished_count).should == 0
33
+ progress_bar.send(:output).should == formatter.output
42
34
  end
43
35
 
44
36
  it 'should set the bar mark to =' do
45
- progress_bar.instance_variable_get(:@bar_mark).should == '='
37
+ progress_bar.instance_variable_get(:@bar).progress_mark.should == '='
46
38
  end
47
39
 
48
40
  end
@@ -110,24 +102,7 @@ describe Fuubar do
110
102
  describe 'increment' do
111
103
 
112
104
  it 'should increment the progress bar' do
113
- progress_bar.should_receive(:inc)
114
- formatter.increment
115
- end
116
-
117
- it 'should change the progress bar title' do
118
- formatter.stub!(:finished_count).and_return(1)
119
- formatter.stub!(:example_count).and_return(2)
120
- formatter.increment
121
- progress_bar.instance_variable_get(:@title).should == ' 1/2'
122
- end
123
-
124
- it 'should increment the finished_count' do
125
- lambda { formatter.increment }.should change(formatter, :finished_count).by(1)
126
- end
127
-
128
- it 'should increment the progress bar before updating the title' do
129
- progress_bar.should_receive(:instance_variable_set).ordered
130
- progress_bar.should_receive(:inc).ordered
105
+ progress_bar.should_receive(:increment)
131
106
  formatter.increment
132
107
  end
133
108
 
@@ -141,15 +116,6 @@ describe Fuubar do
141
116
 
142
117
  end
143
118
 
144
- describe 'start_dump' do
145
-
146
- it 'should finish the progress bar' do
147
- progress_bar.should_receive(:finish)
148
- formatter.start_dump
149
- end
150
-
151
- end
152
-
153
119
  describe 'state' do
154
120
 
155
121
  it 'should be :green by default' do
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuubar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.1.0.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nicholas Evans
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-06 00:00:00.000000000Z
13
+ date: 2012-08-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
- requirement: &70331591522620 !ruby/object:Gem::Requirement
17
+ requirement: &70363317408220 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,21 +22,21 @@ dependencies:
22
22
  version: '2.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70331591522620
25
+ version_requirements: *70363317408220
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: ruby-progressbar
28
- requirement: &70331591517460 !ruby/object:Gem::Requirement
28
+ requirement: &70363317422420 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.10
33
+ version: 1.0.0rc1
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70331591517460
36
+ version_requirements: *70363317422420
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec-instafail
39
- requirement: &70331591516040 !ruby/object:Gem::Requirement
39
+ requirement: &70363317431200 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 0.2.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70331591516040
47
+ version_requirements: *70363317431200
48
48
  description: the instafailing RSpec progress bar formatter
49
49
  email:
50
50
  - jeff@kreeftmeijer.nl
@@ -77,15 +77,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
- - - ! '>='
80
+ - - ! '>'
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 1.3.1
83
83
  requirements: []
84
84
  rubyforge_project: fuubar
85
- rubygems_version: 1.8.6
85
+ rubygems_version: 1.8.10
86
86
  signing_key:
87
87
  specification_version: 3
88
88
  summary: the instafailing RSpec progress bar formatter
89
89
  test_files:
90
90
  - spec/fuubar_spec.rb
91
91
  - spec/spec_helper.rb
92
+ has_rdoc: