simple-interactors 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hanami/interactor.rb +8 -3
- data/lib/simple-interactors/version.rb +1 -1
- data/simple-interactors.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dc7117303fcc83c2f08a927ed495f154779ccc7da9605a685b21cd62410f055
|
4
|
+
data.tar.gz: e8a5efea5537bc8b8551f5ab7143fe0ab8a78b34ffad005e22fb6bc110354b1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d2101d188e9f9f6270f0106785b1f4a63c7586eab65689634af9d52b0aa6fe606e2d18b90837e8d4651931f090decd83596bd7e2e5dda0372695c3243e964f6
|
7
|
+
data.tar.gz: 115dc1974c820e611eb5964686788f86517309b97379e2c2d1cae55c423afdf2b4f8c1b04f27a4d04ac81737676564ba080afd3300ad9121b70db9b9cdcbc1fd
|
data/lib/hanami/interactor.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
433
|
+
raise AbortExecution
|
429
434
|
end
|
430
435
|
|
431
436
|
# Logs an error without interrupting the flow.
|
data/simple-interactors.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
spec.required_ruby_version = ">= 3.0"
|
20
20
|
|
21
|
-
spec.add_dependency "hanami-utils"
|
21
|
+
spec.add_dependency "hanami-utils", '2.0.0.beta1'
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler"
|
24
24
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-interactors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
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:
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hanami-utils
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0.beta1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.0.0.beta1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.
|
101
|
+
rubygems_version: 3.5.21
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: Interactors for Ruby on Rails applications
|