service_pattern 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/service_pattern/service.rb +8 -8
- data/lib/service_pattern/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6127af0c6cf5dff009118b626338c47e85cd92f920a3721b90ff17177b6d2d6f
|
4
|
+
data.tar.gz: f9168398a91ef556e6aeff33f17e72b893e0d0c183d5923874b735278752ed61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55e3cb0164fc764be393f50e5ced27f2ccf698a2459d8416148692fff790317e65af55099150550099ea8a07ccf2e8badab5980d464a832ae7c40bc647f2ec63
|
7
|
+
data.tar.gz: 1f027e60f2e958df5261486e011558b0d9498765832d3f45dd7caebec6d6c1656f5b6c84da8b664ac4612aa2fa0f5c99c69b69da7b3bd72f3629c1d7e20194e3
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class ServicePattern::Service
|
2
2
|
# The same as execute but doesn't catch FailedError so they are passed on to the parent service call
|
3
|
-
def self.chain(*args, &blk)
|
4
|
-
service = new(*args, &blk)
|
3
|
+
def self.chain(*args, **opts, &blk)
|
4
|
+
service = new(*args, **opts, &blk)
|
5
5
|
|
6
6
|
can_execute_response = service.can_execute?
|
7
7
|
ServicePattern::Service.fail!(can_execute_response.errors) unless can_execute_response.success?
|
@@ -9,16 +9,16 @@ class ServicePattern::Service
|
|
9
9
|
service.perform
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.call(*args, &blk)
|
13
|
-
execute(*args, &blk)
|
12
|
+
def self.call(*args, **opts, &blk)
|
13
|
+
execute(*args, **opts, &blk)
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.execute(*args, &blk)
|
17
|
-
new(*args, &blk).execute
|
16
|
+
def self.execute(*args, **opts, &blk)
|
17
|
+
new(*args, **opts, &blk).execute
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.execute!(*args, &blk)
|
21
|
-
new(*args, &blk).execute!
|
20
|
+
def self.execute!(*args, **opts, &blk)
|
21
|
+
new(*args, **opts, &blk).execute!
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.convert_errors(errors)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_pattern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ServicePattern for Ruby on Rails.
|
14
14
|
email:
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
|
-
rubygems_version: 3.
|
49
|
+
rubygems_version: 3.2.32
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: ServicePattern for Ruby on Rails.
|