toolx 0.2.2 → 0.2.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/toolx/core/operation/flow.rb +8 -7
- data/lib/toolx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab4f3af6bd6512a1a0db4eb3f0d24b0ab12d07b46150bf481862fd7c0b0a76ee
|
4
|
+
data.tar.gz: d1f3c32d678d96285cb683c146372437ae2a00000483019876bec3e0d53cc3a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91a3d2d5726133924461dadcde633c1121b94b694c94f7b27842edf7acbea8bc2549fe1c0232df5484c59a13cfa1687a43eb86b55153a5bb1c9c3f8afd8139af
|
7
|
+
data.tar.gz: 06ac13ddeebfb93c702daf6e809f76a248622ed1d9036561f4927b19439ef9553493c2850bf015a90aa5b265ea2c31402d8150b1db5fcecd0774cec250218e0e
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative '../errors/nested_standard_error'
|
2
|
+
|
1
3
|
module Toolx::Core::Operation::Flow
|
2
4
|
def self.included(base)
|
3
5
|
base.send(:extend, ClassMethods)
|
@@ -15,7 +17,7 @@ module Toolx::Core::Operation::Flow
|
|
15
17
|
end
|
16
18
|
|
17
19
|
class Executor
|
18
|
-
ExecutorError = Class.new(
|
20
|
+
ExecutorError = Class.new(::Toolx::Core::Errors::NestedStandardError)
|
19
21
|
OperationAlreadyInitialized = Class.new(ExecutorError)
|
20
22
|
OperationNotInitialized = Class.new(ExecutorError)
|
21
23
|
|
@@ -192,7 +194,11 @@ module Toolx::Core::Operation::Flow
|
|
192
194
|
action = actions[kind]
|
193
195
|
|
194
196
|
if action.is_a?(Symbol) && bind_object
|
195
|
-
arity =
|
197
|
+
arity = begin
|
198
|
+
bind_object.method(action).arity
|
199
|
+
rescue NameError => e
|
200
|
+
raise ExecutorError, "Action '#{action}' not found in #{bind_object.class.name}. Details: #{e.message}"
|
201
|
+
end
|
196
202
|
case arity
|
197
203
|
when 0 then bind_object.send(action)
|
198
204
|
when 1 then bind_object.send(action, response)
|
@@ -205,11 +211,6 @@ module Toolx::Core::Operation::Flow
|
|
205
211
|
else action.call(response, self)
|
206
212
|
end
|
207
213
|
end
|
208
|
-
|
209
|
-
# bind_object.send(action, self) if action.is_a?(Symbol) && bind_object
|
210
|
-
# action.call(self) if action.is_a?(Proc)
|
211
|
-
rescue NameError => e
|
212
|
-
raise ExecutorError, "Action '#{action}' not found in #{bind_object.class.name}" if bind_object
|
213
214
|
end
|
214
215
|
|
215
216
|
def execute_actions
|
data/lib/toolx/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toolx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pawel Niemczyk
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-06-
|
10
|
+
date: 2025-06-30 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: statesman
|