sequential_workflow 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59069b5d84ad67d94e866286f7b3d7e3ece8e9ef
4
- data.tar.gz: 07fc3687a3b58bd9c56eb749e3ec529fcf98c64e
3
+ metadata.gz: 44813cdc0ed419b3cdb33f0bf07bbb5256431506
4
+ data.tar.gz: d6b8161462fa64ae7e24a692485e3c4c27c1bb2b
5
5
  SHA512:
6
- metadata.gz: 19ab3a2c08f94285e9a8f511be12b12f21961141067d419464094b66bdf2a8e96eedf40f0c61a25fec341a938ba5783f2fd646499d702d4a893009497095d61e
7
- data.tar.gz: 85eedbf201a11ebf9624e2a3750f4131f5e5fb3583968bdc715325dc442775d330d4c4093615cf987bd9643c3dde16ff2c151c99c9110850a963ca86e643d79c
6
+ metadata.gz: 2ac844182ad358d44f9aa1ab65b7b3cbc0ebef8d164f0986446d6edf13cc370ddff0b93296ea834cc2b5dd82c6448fa37bf4baf655b8e0c8488df425bb089cde
7
+ data.tar.gz: ae6c0e96f738c6bd8dfb7635fd18371dae54f643e5e810ee0e441ad5505449975771c4500938250110d0464c377c3cdff288edbc6954394c934ab117e4895d51
@@ -1,3 +1,3 @@
1
1
  module SequentialWorkflow
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -12,7 +12,7 @@ module SequentialWorkflow
12
12
  end
13
13
 
14
14
  def catch(catch_with)
15
- method(catch_with).call
15
+ method(catch_with).call(@reason)
16
16
  end
17
17
 
18
18
  def then(on_success, rescue_with)
@@ -39,6 +39,4 @@ module SequentialWorkflow
39
39
  @reason = e
40
40
  self
41
41
  end
42
-
43
- alias_method :end_with, :then
44
42
  end
@@ -22,7 +22,7 @@ RSpec.describe 'SequentialWorkflow' do
22
22
  def handle_previous_error(e)
23
23
  end
24
24
 
25
- def catch_method
25
+ def catch_method(e)
26
26
  end
27
27
  end
28
28
 
@@ -71,7 +71,7 @@ RSpec.describe 'SequentialWorkflow' do
71
71
  describe '#catch' do
72
72
  it 'runs if :rejected' do
73
73
  foo.execute_workflow
74
- expect(foo).not_to receive(:catch_method)
74
+ expect(foo).not_to receive(:catch_method).with(RuntimeError)
75
75
  end
76
76
  end
77
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequential_workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dinshaw