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 +4 -4
- data/lib/sequential_workflow/version.rb +1 -1
- data/lib/sequential_workflow.rb +1 -3
- data/spec/sequential_workflow_spec.rb +2 -2
- 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: 44813cdc0ed419b3cdb33f0bf07bbb5256431506
|
4
|
+
data.tar.gz: d6b8161462fa64ae7e24a692485e3c4c27c1bb2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ac844182ad358d44f9aa1ab65b7b3cbc0ebef8d164f0986446d6edf13cc370ddff0b93296ea834cc2b5dd82c6448fa37bf4baf655b8e0c8488df425bb089cde
|
7
|
+
data.tar.gz: ae6c0e96f738c6bd8dfb7635fd18371dae54f643e5e810ee0e441ad5505449975771c4500938250110d0464c377c3cdff288edbc6954394c934ab117e4895d51
|
data/lib/sequential_workflow.rb
CHANGED
@@ -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
|