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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9155a4cd82106186e76da35529769fffb623cd797e5f2475835830a4c835655
4
- data.tar.gz: cb4c8e54f4ffc0b163cdb5e9774bb17e5b759600d7e8a79b719f1067aa041783
3
+ metadata.gz: ab4f3af6bd6512a1a0db4eb3f0d24b0ab12d07b46150bf481862fd7c0b0a76ee
4
+ data.tar.gz: d1f3c32d678d96285cb683c146372437ae2a00000483019876bec3e0d53cc3a1
5
5
  SHA512:
6
- metadata.gz: 3e5c3dd888e0962f0f89d7cb14f4e11a2ddc84a3695814ca0a9e4a23ec5ebc63694d2593ad3ef63e3ea9b6e444ac02a4d0b259b71a4ced70b5b8c0557c9795ad
7
- data.tar.gz: a553bd9dc0cdc781153ea8c8d25773900d0448bff3b380c235cb42e2c66b1cee85af7dbfa6a8def379f0cb0c89fb1298eae489dc7d12fb9ec6f44be82da9f92e
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(StandardError)
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 = bind_object.method(action).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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Toolx
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
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.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-29 00:00:00.000000000 Z
10
+ date: 2025-06-30 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: statesman