end_state 1.1.1 → 1.1.2

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: 5b3e18cd51ed06158bb7ed2b08c54bc8bfc9e46d
4
- data.tar.gz: 160cda6e0637500fc5335ef0249d2803cf1991cb
3
+ metadata.gz: cea33d2599a01b2e2a1849e18ce89606dd884577
4
+ data.tar.gz: 8cf3d052502eaae9b7ea7b3fc932dca9c2f97f30
5
5
  SHA512:
6
- metadata.gz: 0c44b0fbfaedf0bf7061d8204a93f25b0b08166a7e1e057a969d685a34130fb95939706d5e87d1af4a3f98fb33300b1a728c4378bb529115834bef9be6664fa5
7
- data.tar.gz: c107d7cfd7a474d528b4c0295e6e806de98477d6860fd9e82c91e6a324724fc0623701472799b7383184bf2816a6e95a3f0d8b9965ae63f6a7470dccc501b570
6
+ metadata.gz: 74d3571600173f5fb01c25436f6802efb685fb0c77a48632d6c33e7720aa16a568f90aa420d0aa524e5d78d3c996e2d50d4f47556d24ef9699d94a4cbfa08740
7
+ data.tar.gz: f561fe882b2e239062f195414303262df153e1c79bbd257eb2f7ee2483130e63e261022dc92867076caa71011c360c57a10fad1db0aec496900a81baf75b865e
@@ -55,8 +55,8 @@ module EndState
55
55
  end
56
56
 
57
57
  def rollback(concluded, params)
58
- concluded.reverse_each { |concluder| concluder.new(object, state, params).rollback }
59
58
  action.new(object, previous_state).rollback
59
+ concluded.reverse_each { |concluder| concluder.new(object, state, params).rollback }
60
60
  false
61
61
  end
62
62
 
@@ -1,3 +1,3 @@
1
1
  module EndState
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
@@ -146,10 +146,10 @@ module EndState
146
146
  let(:mode) { :soft }
147
147
 
148
148
  it 'returns false and rolls back the completed concluders and the action' do
149
+ expect(action_instance).to receive(:rollback).ordered
149
150
  expect(concluder3_instance).to_not receive(:rollback)
150
151
  expect(concluder2_instance).to receive(:rollback).ordered
151
152
  expect(concluder1_instance).to receive(:rollback).ordered
152
- expect(action_instance).to receive(:rollback).ordered
153
153
 
154
154
  expect(transition.call).to be false
155
155
  end
@@ -159,10 +159,10 @@ module EndState
159
159
  let(:mode) { :hard }
160
160
 
161
161
  it 'raises ConcluderFailed and rolls back the completed concluders and the action' do
162
+ expect(action_instance).to receive(:rollback).ordered
162
163
  expect(concluder3_instance).to_not receive(:rollback)
163
164
  expect(concluder2_instance).to receive(:rollback).ordered
164
165
  expect(concluder1_instance).to receive(:rollback).ordered
165
- expect(action_instance).to receive(:rollback).ordered
166
166
 
167
167
  expect{transition.call}.to raise_error(ConcluderFailed, 'The transition to b was rolled back: service failure')
168
168
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: end_state
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexpeachey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-01 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 2.4.8
152
+ rubygems_version: 2.5.1
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: A State Machine implementation