action_operation 2.1.0 → 2.1.1

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
  SHA256:
3
- metadata.gz: df39296baae3026a586088215fec2ab3b0bd6630141beb4c67167d38f61ae663
4
- data.tar.gz: c767f034411fc574752a5a8d43d94a7fab54ad9ff4c6f57bcb2da96722709bf9
3
+ metadata.gz: 29ca21fd117c2555cea1ce9f8bef22eb17ee0e0d6d0b72b971fb0bd218dd5f3e
4
+ data.tar.gz: 4c5f1e3f02005956b4664d92c738c956cbc1267193ce2b863cb5d2b54f814450
5
5
  SHA512:
6
- metadata.gz: 9ceab9d1a6fd7d8202fd82e07cebcc03a01716ceb4c49a53bc20a4453155475893b2b968e104d840107bd0f81d72d75ec80c1cb4e627dd416e0bc31cae78cbbc
7
- data.tar.gz: fdfb512b613d99eeeef8903051547dc60285676cb7d2eb95967f5abe2d601716e01048cafb10cf88e0aaf024773fa52688359c49456238b544593c3aa80ad4cd
6
+ metadata.gz: e8e45d6ac5994b21d95c7f9b81129645b8f5b8ed82f827ca7cb0b1be64ee392ec5e2be795dfa8eb5ee1132fa69c0344bbe0c8b65158a4d6e0507ec430f85f317
7
+ data.tar.gz: e51b24022609d66ea3b5d08350181f5c38525f63b6c8cc689ca46898125bb2918c5a25d1cd469f97571461bc54bdd232eddc3d1a24b014850e4bf6efb300b7da
data/README.md CHANGED
@@ -296,7 +296,7 @@ end
296
296
 
297
297
  Add this line to your application's Gemfile:
298
298
 
299
- gem "action_operation", "2.1.0"
299
+ gem "action_operation", "2.1.1"
300
300
 
301
301
  And then execute:
302
302
 
@@ -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}"
@@ -1,3 +1,3 @@
1
1
  module ActionOperation
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurtis Rainbolt-Greene