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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bc231be0b27606b26a61653387d91dc44c8639f
4
- data.tar.gz: b03da6a650bb4d89014e7fa3397bce69c53bef10
3
+ metadata.gz: 9563a24f43ab4e6485f7dcf2a982193d40b2f3d7
4
+ data.tar.gz: 3cbcb93b66dbf24b5adcbb50619298b7cd4d91c5
5
5
  SHA512:
6
- metadata.gz: 68ee3cf38c7afe77b0cf5555f321f0adea149bb160312c5b81938357813e15aae10061035907d07afd3fb735cac360bc27f302e5ff49db3d7aa5bae2a392f635
7
- data.tar.gz: db822a2f2ec45137e62cb8ead9811ace9cbe8b09d30163d4929bcce19ca3dfa89ce854c3b17d40250e7951053381c2ee12ad35b3ea18df7e5b8d79543c25ad00
6
+ metadata.gz: a6a5895c8275864216963c72f9581c5831edfa3dcd853f8daf1854c3b0df157450f79b0282b7487b934b3068bc9e5daaa4b83b54a62a44731ea067ee36e835af
7
+ data.tar.gz: efe9eb8197bf330af96c554e00240eb7258486aa627495f8e202a6f19b2d1b6f92dc7de5419ebd55f0af53a85d6afec3ce047588abf0b6a7731dbc8bf90cb657
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.8.0
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: ampel_extase 0.7.2 ruby lib
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.7.2"
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
- case state.last_result
74
- when 'SUCCESS'
73
+ if state.success?
75
74
  @lights.green.on
76
75
  @lights.red.off
77
76
  puts success('LIGHTS SUCCESS')
78
- when 'FAILURE', 'ABORTED'
77
+ else
79
78
  @lights.red.on
80
79
  if state.building?
81
80
  @lights.green.on
@@ -1,6 +1,6 @@
1
1
  module AmpelExtase
2
2
  # AmpelExtase version
3
- VERSION = '0.7.2'
3
+ VERSION = '0.8.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -113,21 +113,18 @@ describe AmpelExtase::Controller do
113
113
  controller.instance_eval { perform }
114
114
  end
115
115
 
116
- let :aux do
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, double('Lights', aux: aux)
121
+ controller.instance_variable_set :@lights, lights
122
122
  end
123
123
 
124
124
  it 'reacts to state changes' do
125
- allow(ampel_semaphore).to receive(:state_changed?).and_return true
126
- expect { |b| ampel_semaphore.on_state_change(&b) }.to yield_with_args(ampel_semaphore.fetch_new_state)
127
- allow(warning_jenkins1).to receive(:state_changed?).and_return true
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ampel_extase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank