starting_blocks 0.0.27 → 0.0.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module StartingBlocks
2
- VERSION = "0.0.27"
2
+ VERSION = "0.0.28"
3
3
  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.27
4
+ version: 0.0.28
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-19 00:00:00.000000000 Z
12
+ date: 2013-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -121,7 +121,6 @@ files:
121
121
  - README.md
122
122
  - Rakefile
123
123
  - bin/sb
124
- - lib/extensions/blinky.rb
125
124
  - lib/starting_blocks.rb
126
125
  - lib/starting_blocks/displayable.rb
127
126
  - lib/starting_blocks/publisher.rb
@@ -148,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
147
  version: '0'
149
148
  segments:
150
149
  - 0
151
- hash: -418332539225269921
150
+ hash: 3245310780454752377
152
151
  required_rubygems_version: !ruby/object:Gem::Requirement
153
152
  none: false
154
153
  requirements:
@@ -157,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
156
  version: '0'
158
157
  segments:
159
158
  - 0
160
- hash: -418332539225269921
159
+ hash: 3245310780454752377
161
160
  requirements: []
162
161
  rubyforge_project:
163
162
  rubygems_version: 1.8.24
@@ -1,63 +0,0 @@
1
- require 'blinky'
2
-
3
- # fix issue where no light will cause lock-up
4
- module Blinky
5
- class LightFactory
6
- class << self
7
- alias :original_detect_lights :detect_lights
8
- def detect_lights plugins, recipes
9
- original_detect_lights plugins, recipes
10
- rescue
11
- []
12
- end
13
- end
14
- end
15
- end
16
-
17
- module StartingBlocks
18
- module Extensions
19
- class BlinkyLighting
20
-
21
- def initialize
22
- @light = Blinky.new.light
23
- end
24
-
25
- def self.turn_off!
26
- Blinky.new.light.off!
27
- end
28
-
29
- def receive_files_to_run files
30
- @spec_count = files.count
31
- return if files.count == 0
32
- change_color_to :yellow
33
- end
34
-
35
- def receive_results results
36
- return if @spec_count == 0
37
- if (results[:tests] || 0) == 0
38
- change_color_to :red
39
- elsif (results[:errors] || 0) > 0
40
- change_color_to :red
41
- elsif (results[:failures] || 0) > 0
42
- change_color_to :red
43
- elsif (results[:skips] || 0) > 0
44
- change_color_to :yellow
45
- else
46
- change_color_to :green
47
- end
48
- end
49
-
50
- def change_color_to(color)
51
- case color
52
- when :green
53
- @light.success!
54
- when :red
55
- @light.failure!
56
- when :yellow
57
- @light.building!
58
- end
59
- rescue
60
- end
61
- end
62
- end
63
- end