action_operation 2.1.0 → 2.1.1
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/README.md +1 -1
- data/lib/action_operation.rb +5 -12
- data/lib/action_operation/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29ca21fd117c2555cea1ce9f8bef22eb17ee0e0d6d0b72b971fb0bd218dd5f3e
|
4
|
+
data.tar.gz: 4c5f1e3f02005956b4664d92c738c956cbc1267193ce2b863cb5d2b54f814450
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8e45d6ac5994b21d95c7f9b81129645b8f5b8ed82f827ca7cb0b1be64ee392ec5e2be795dfa8eb5ee1132fa69c0344bbe0c8b65158a4d6e0507ec430f85f317
|
7
|
+
data.tar.gz: e51b24022609d66ea3b5d08350181f5c38525f63b6c8cc689ca46898125bb2918c5a25d1cd469f97571461bc54bdd232eddc3d1a24b014850e4bf6efb300b7da
|
data/README.md
CHANGED
data/lib/action_operation.rb
CHANGED
@@ -20,20 +20,14 @@ module ActionOperation
|
|
20
20
|
@raw = raw
|
21
21
|
end
|
22
22
|
|
23
|
-
private def callbackings(arounds, &process)
|
24
|
-
arounds.reverse.reduce(process) do |compound, callback|
|
25
|
-
callback.call(&compound).call
|
26
|
-
end.call
|
27
|
-
end
|
28
|
-
|
29
23
|
def call(start: nil, raw: @raw)
|
30
|
-
around_steps do
|
24
|
+
around_steps(raw: raw) do
|
31
25
|
begin
|
32
|
-
around_tasks do
|
26
|
+
around_tasks(raw: raw) do
|
33
27
|
tasks(start, raw)
|
34
28
|
end
|
35
29
|
rescue *left.select(&:exception).map(&:exception).uniq => handled_exception
|
36
|
-
around_catches do
|
30
|
+
around_catches(exception: handled_exception, raw: raw) do
|
37
31
|
catches(handled_exception, raw)
|
38
32
|
end
|
39
33
|
end
|
@@ -53,7 +47,7 @@ module ActionOperation
|
|
53
47
|
# puts "#{step.class}::#{step.receiver}##{step.name}"
|
54
48
|
|
55
49
|
begin
|
56
|
-
value = around_task do
|
50
|
+
value = around_task(state: self.class.schemas.fetch(step.name).new(state), raw: raw, step: step) do
|
57
51
|
public_send(step.name, state: self.class.schemas.fetch(step.name).new(state))
|
58
52
|
end
|
59
53
|
# puts "#{step.class}::#{step.receiver}##{step.name} #{value}"
|
@@ -61,7 +55,6 @@ module ActionOperation
|
|
61
55
|
raise Error::StepSchemaMismatch, step: step, schema: self.class.schemas.fetch(step.name), raw: raw, cause: invalid_property_type_exception
|
62
56
|
end
|
63
57
|
|
64
|
-
|
65
58
|
case value
|
66
59
|
when State then value.raw
|
67
60
|
when Drift then break call(start: right.find_index { |step| step.name == value.to }, raw: state)
|
@@ -79,7 +72,7 @@ module ActionOperation
|
|
79
72
|
# puts "#{step.class}::#{step.receiver}##{step.name}"
|
80
73
|
|
81
74
|
begin
|
82
|
-
value = around_catch do
|
75
|
+
value = around_catch(exception: exception, raw: raw, step: step) do
|
83
76
|
public_send(step.name, exception: exception, state: raw, step: @latest_step)
|
84
77
|
end
|
85
78
|
# puts "#{step.class}::#{step.receiver}##{step.name} #{value}"
|