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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7916d1e6a73deee6ce9dddf92550452365db224960d08d4171db0581bc67fde
4
- data.tar.gz: 57d614b6361e6643890c88730100fe33b490c109962d66e4dae241a985bf9e42
3
+ metadata.gz: 80db737dbe49a441e3251b0faeceb6db67a15753c93c78c10f9776998bc603dc
4
+ data.tar.gz: 3ca3fc2e542f90c8746f7cb44051a997a2699f4bec5cf495fc92bd8d0935044b
5
5
  SHA512:
6
- metadata.gz: 4e4807fa30e0d3b053dd769078c8d3938eb02ad7de3f14812fa3bf9a6442f38652a317bff66ac4765c273b1b29c24697ae71cc857040263de03df4361869f4cd
7
- data.tar.gz: '0488df45e2d0177e24db8f1f88077ccc94b1e8c91e7612a6176ad70f99802561fe0f774e61a73eaccaf0a0c1ce9cfaf4b6223a0cbe1a4743877305e389924e8f'
6
+ metadata.gz: d0bacfb35fcc85561eb394015ad19da6bf87302d06feaec3bc45cea4cbade4c7b3964aa65596c401b98a6e359e0998eece7f0b3c0c543df3edd54d23cdffb67d
7
+ data.tar.gz: 8b8e9f0df76338b09edf0bdef80be173af9dd01f83ddcb0be53a3f45d1df96b4963907a6253264b24e052c435284322c41879d63e7ab4813b08703476c659196
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ServiceRecord
2
- VERSION = '1.2.4'.freeze
2
+ VERSION = '1.2.5'.freeze
3
3
  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
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-20 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel