starting_blocks 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,24 @@
1
+ require 'blinky'
2
+
3
+ module StartingBlocks
4
+ module Extensions
5
+ class GreenOnSuccessRedOnFailure
6
+
7
+ def receive_specs_to_run specs
8
+ Blinky.new.light.building!
9
+ end
10
+
11
+ def receive_results results
12
+ if (results[:errors] || 0) > 0
13
+ Blinky.new.light.failure!
14
+ elsif (results[:failures] || 0) > 0
15
+ Blinky.new.light.failure!
16
+ elsif (results[:skips] || 0) > 0
17
+ Blinky.new.light.building!
18
+ else
19
+ Blinky.new.light.success!
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -9,6 +9,7 @@ module StartingBlocks
9
9
 
10
10
  def run_files specs
11
11
  display "Specs to run: #{specs.inspect}"
12
+ StartingBlocks::Publisher.publish_specs_to_run specs
12
13
  results = execute_these_specs specs
13
14
  StartingBlocks::Publisher.publish_results results
14
15
  puts results
@@ -1,3 +1,3 @@
1
1
  module StartingBlocks
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -4,7 +4,9 @@ require_relative 'starting_blocks/runner'
4
4
  require_relative 'starting_blocks/watcher'
5
5
  require_relative 'starting_blocks/result_parser'
6
6
  require_relative 'starting_blocks/publisher'
7
+ require_relative 'extensions/blinky'
7
8
 
8
9
  module StartingBlocks
9
10
  # Your code goes here...
10
11
  end
12
+ StartingBlocks::Publisher.subscribers << StartingBlocks::Extensions::GreenOnSuccessRedOnFailure.new
@@ -12,10 +12,6 @@ describe StartingBlocks::Publisher do
12
12
  StartingBlocks::Publisher.result_parser = result_parser
13
13
  end
14
14
 
15
- it "subscribers should be empty" do
16
- StartingBlocks::Publisher.subscribers.count.must_equal 0
17
- end
18
-
19
15
  describe "#publish_results" do
20
16
  describe "one subscriber" do
21
17
  it "should pass the results to the subscriber" do
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "subtle"
25
25
  spec.add_development_dependency "mocha"
26
26
  spec.add_runtime_dependency 'listen'
27
+ spec.add_runtime_dependency 'blinky'
27
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starting_blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -107,6 +107,22 @@ dependencies:
107
107
  - - ! '>='
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: blinky
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
110
126
  description: Faster minitest TDD.
111
127
  email:
112
128
  - darren@cauthon.com
@@ -121,6 +137,7 @@ files:
121
137
  - README.md
122
138
  - Rakefile
123
139
  - bin/sb
140
+ - lib/extensions/blinky.rb
124
141
  - lib/starting_blocks.rb
125
142
  - lib/starting_blocks/displayable.rb
126
143
  - lib/starting_blocks/publisher.rb
@@ -147,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
164
  version: '0'
148
165
  segments:
149
166
  - 0
150
- hash: -3678462627453505781
167
+ hash: -892516086604135019
151
168
  required_rubygems_version: !ruby/object:Gem::Requirement
152
169
  none: false
153
170
  requirements:
@@ -156,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
173
  version: '0'
157
174
  segments:
158
175
  - 0
159
- hash: -3678462627453505781
176
+ hash: -892516086604135019
160
177
  requirements: []
161
178
  rubyforge_project:
162
179
  rubygems_version: 1.8.24