service_pattern 0.0.5 → 0.0.6
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 +4 -1
- data/lib/service_pattern/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: c422a0eeb31fd82401662b38f5bf20e8842919a61b9c6ac9679d143284142d8b
|
4
|
+
data.tar.gz: 6b4ec9a0abb29917fc473d92ef99e4b8440832afe68e3f2c8387bb8b2a61f70b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bce5fc37731897aca940277f54165521d2fc0dd5b0b827abfc6a4a3b720cd2248f1ad68fd46bf2288907aac842df1f5681378d04695db4bfd9383d2f02e7abe
|
7
|
+
data.tar.gz: 29f21381d0169db901e5e547e1a538207ef57d1a0f580e1572b8a0256e56a4bf424cc72f99254149923a628003ff515407055c29bb86cdd75a86126f8a40d8ab
|
@@ -25,7 +25,10 @@ class ServicePattern::Service
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.execute!(*args, &blk)
|
28
|
-
|
28
|
+
service = new(*args, &blk)
|
29
|
+
can_execute_response = service.can_execute?
|
30
|
+
ServicePattern::Service.fail!(can_execute_response.errors) unless can_execute_response.success?
|
31
|
+
response = service.execute
|
29
32
|
ServicePattern::Service.fail!(response.errors) unless response.success?
|
30
33
|
response.result
|
31
34
|
end
|
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: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ServicePattern for Ruby on Rails.
|
14
14
|
email:
|