service_record 1.2.4 → 1.2.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_record/base.rb +2 -3
- data/lib/service_record/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: 80db737dbe49a441e3251b0faeceb6db67a15753c93c78c10f9776998bc603dc
|
4
|
+
data.tar.gz: 3ca3fc2e542f90c8746f7cb44051a997a2699f4bec5cf495fc92bd8d0935044b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0bacfb35fcc85561eb394015ad19da6bf87302d06feaec3bc45cea4cbade4c7b3964aa65596c401b98a6e359e0998eece7f0b3c0c543df3edd54d23cdffb67d
|
7
|
+
data.tar.gz: 8b8e9f0df76338b09edf0bdef80be173af9dd01f83ddcb0be53a3f45d1df96b4963907a6253264b24e052c435284322c41879d63e7ab4813b08703476c659196
|
data/lib/service_record/base.rb
CHANGED
@@ -8,6 +8,8 @@ module ServiceRecord
|
|
8
8
|
include ActiveModel::Validations
|
9
9
|
include ActiveModel::AttributeAssignment
|
10
10
|
|
11
|
+
attr_accessor :result
|
12
|
+
|
11
13
|
def self.perform(args = {})
|
12
14
|
new.tap do |service|
|
13
15
|
service.attributes = args
|
@@ -15,7 +17,6 @@ module ServiceRecord
|
|
15
17
|
|
16
18
|
service.run_callbacks :perform do
|
17
19
|
service.result = service.perform
|
18
|
-
service.result = nil if service.failure?
|
19
20
|
end
|
20
21
|
end
|
21
22
|
end
|
@@ -27,8 +28,6 @@ module ServiceRecord
|
|
27
28
|
raise Failure, service
|
28
29
|
end
|
29
30
|
|
30
|
-
attr_accessor :result
|
31
|
-
|
32
31
|
def success?
|
33
32
|
errors.empty?
|
34
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muhammad Usman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|