ampel_extase 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/ampel_extase.gemspec +2 -2
- data/lib/ampel_extase/controller.rb +2 -3
- data/lib/ampel_extase/version.rb +1 -1
- data/spec/ampel_extase/controller_spec.rb +6 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9563a24f43ab4e6485f7dcf2a982193d40b2f3d7
|
4
|
+
data.tar.gz: 3cbcb93b66dbf24b5adcbb50619298b7cd4d91c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6a5895c8275864216963c72f9581c5831edfa3dcd853f8daf1854c3b0df157450f79b0282b7487b934b3068bc9e5daaa4b83b54a62a44731ea067ee36e835af
|
7
|
+
data.tar.gz: efe9eb8197bf330af96c554e00240eb7258486aa627495f8e202a6f19b2d1b6f92dc7de5419ebd55f0af53a85d6afec3ce047588abf0b6a7731dbc8bf90cb657
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
data/ampel_extase.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: ampel_extase 0.
|
2
|
+
# stub: ampel_extase 0.8.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "ampel_extase".freeze
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.8.0"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
@@ -70,12 +70,11 @@ class AmpelExtase::Controller
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def perform_lights_switch(state)
|
73
|
-
|
74
|
-
when 'SUCCESS'
|
73
|
+
if state.success?
|
75
74
|
@lights.green.on
|
76
75
|
@lights.red.off
|
77
76
|
puts success('LIGHTS SUCCESS')
|
78
|
-
|
77
|
+
else
|
79
78
|
@lights.red.on
|
80
79
|
if state.building?
|
81
80
|
@lights.green.on
|
data/lib/ampel_extase/version.rb
CHANGED
@@ -113,21 +113,18 @@ describe AmpelExtase::Controller do
|
|
113
113
|
controller.instance_eval { perform }
|
114
114
|
end
|
115
115
|
|
116
|
-
let :
|
117
|
-
double('Device', on: true)
|
116
|
+
let :lights do
|
117
|
+
double('Lights', aux: double('Device', on: true, off: true))
|
118
118
|
end
|
119
119
|
|
120
120
|
before do
|
121
|
-
controller.instance_variable_set :@lights,
|
121
|
+
controller.instance_variable_set :@lights, lights
|
122
122
|
end
|
123
123
|
|
124
124
|
it 'reacts to state changes' do
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
state = AmpelExtase::BuildState.for [ 'FAILURE', false ]
|
129
|
-
allow(warning_jenkins1).to receive(:fetch_new_state).and_return state
|
130
|
-
expect { |b| warning_jenkins.on_state_change(60, &b) }.to yield_with_args(state)
|
125
|
+
state = AmpelExtase::BuildState.for [ 'passed', false ]
|
126
|
+
allow(ampel_semaphore).to receive(:fetch_new_state).and_return state
|
127
|
+
expect { |b| ampel_semaphore.on_state_change(&b) }.to yield_with_args(state)
|
131
128
|
perform
|
132
129
|
end
|
133
130
|
end
|