service_record 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/service_record/base.rb +7 -0
- data/lib/service_record/failure.rb +11 -0
- data/lib/service_record/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7480968cffcfeaa22303ad0e8e0eefbe9eb5c748a562eb24651e1a0563fdaec
|
4
|
+
data.tar.gz: cd4d145d8bf049e67586a5bc64d1b9c70939815a42996407ffd26744de2e2328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1cf4a2872060a83ac89f578721a9169db038bc4502f31a0382162ac3ea5402aa76effc3cd7f5e66c05b66a160f3148dd094fd3f9ea476d0d0902eea81a01b6e
|
7
|
+
data.tar.gz: 6ea144985aa85012173f7275782e118473f22c5cc2a9a5c85c7ef8d49409f4c68b7a97de4e8fd479a9ae90e58a7e635eb594f191bafec97e29d76e7b7b2cd565
|
data/lib/service_record/base.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'service_record/failure'
|
1
2
|
require 'service_record/callbacks'
|
2
3
|
|
3
4
|
module ServiceRecord
|
@@ -19,6 +20,12 @@ module ServiceRecord
|
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|
23
|
+
def self.perform!(args = {})
|
24
|
+
service = perform(args)
|
25
|
+
|
26
|
+
raise Failure, service if service.failure?
|
27
|
+
end
|
28
|
+
|
22
29
|
attr_accessor :result
|
23
30
|
|
24
31
|
def success?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muhammad Usman
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- lib/service_record.rb
|
42
42
|
- lib/service_record/base.rb
|
43
43
|
- lib/service_record/callbacks.rb
|
44
|
+
- lib/service_record/failure.rb
|
44
45
|
- lib/service_record/version.rb
|
45
46
|
homepage: https://github.com/uxxman/service_record
|
46
47
|
licenses:
|