simple-interactors 0.0.2 → 0.0.3

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: 7d8470fda4651d5f6fe18afa7d0841cf3a865a98d76e091713a6e75ecab2ee84
4
- data.tar.gz: 4a6b5c65c9530f7ca0dd525889f823dbb50c39d8238167825744fbc15d8f6ab0
3
+ metadata.gz: 2dc7117303fcc83c2f08a927ed495f154779ccc7da9605a685b21cd62410f055
4
+ data.tar.gz: e8a5efea5537bc8b8551f5ab7143fe0ab8a78b34ffad005e22fb6bc110354b1c
5
5
  SHA512:
6
- metadata.gz: 35f2ab518c825a7d0f59b57a8740e776536dee602dd3ac0d57954bdfc5b04b4390eb2f0bacc4575a92b71f62a82bb46ed4b26beafda08d22559cca7e20d70ec1
7
- data.tar.gz: 123e06d3ee76ecfdd4d0dd447f1dee2f283e63c13a6707dfe41eafd37d34d55918245f29726dd0389c1c578a15a022c277c9a0006aa389611b18560d1cbb2901
6
+ metadata.gz: 6d2101d188e9f9f6270f0106785b1f4a63c7586eab65689634af9d52b0aa6fe606e2d18b90837e8d4651931f090decd83596bd7e2e5dda0372695c3243e964f6
7
+ data.tar.gz: 115dc1974c820e611eb5964686788f86517309b97379e2c2d1cae55c423afdf2b4f8c1b04f27a4d04ac81737676564ba080afd3300ad9121b70db9b9cdcbc1fd
@@ -6,6 +6,9 @@ module Hanami
6
6
  # Hanami Interactor
7
7
  #
8
8
  # @since 0.3.5
9
+
10
+ class AbortExecution < Exception; end;
11
+
9
12
  module Interactor
10
13
  # Result of an operation
11
14
  #
@@ -267,9 +270,10 @@ module Hanami
267
270
  # @since 0.3.5
268
271
  # @api private
269
272
  def _call
270
- catch :fail do
273
+ begin
271
274
  validate!
272
275
  yield
276
+ rescue AbortExecution
273
277
  end
274
278
 
275
279
  _prepare!
@@ -361,9 +365,10 @@ module Hanami
361
365
  # @api private
362
366
  # @since 1.1.0
363
367
  def _call(*args, **kwargs)
364
- catch :fail do
368
+ begin
365
369
  validate!(*args, **kwargs)
366
370
  yield
371
+ rescue AbortExecution
367
372
  end
368
373
 
369
374
  _prepare!
@@ -425,7 +430,7 @@ module Hanami
425
430
  # result.successful? # => false
426
431
  def fail!
427
432
  @__result.fail!
428
- throw :fail
433
+ raise AbortExecution
429
434
  end
430
435
 
431
436
  # Logs an error without interrupting the flow.
@@ -1,3 +1,3 @@
1
1
  module SimpleInteractors
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-interactors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Rodríguez-Baltanás Díaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-15 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hanami-utils
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.3.22
101
+ rubygems_version: 3.5.21
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Interactors for Ruby on Rails applications