protected_record 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: ee3db2399060139dabe4efb989ce1b857ee1e018
4
- data.tar.gz: 34ff5f83cd940b7535ee3a28336295de5a4add6b
3
+ metadata.gz: 392a2700001f26e3809a7e04250e02b76f0fb7a4
4
+ data.tar.gz: db25947c4b358cea76d6ede07c8b28e9d193964d
5
5
  SHA512:
6
- metadata.gz: d3f90dd864df8ae173aaeab384a2d544a3a72d5fc2f37fabea55bcbaf7dccd42824b27cb86b75e72de4c2da55b882460fa709e23c0dc8e2a8bef114ce29e7112
7
- data.tar.gz: 430b1b8b46b7905d8a6179691cb51560c2d5ee931e70964cd108b4199d243d6a021e64d5f659202cb462d48ade9af35a2ec226a750e08989af12036e6f5f334a
6
+ metadata.gz: ac9210b4c284788f8fca81ae49373d86c5f882f08b38427af343809c53126fe984b8a1687d0ad41432e9667a5a330fc75ca10d76cca39e1f5a19e32fb67320a1
7
+ data.tar.gz: b8dfdf841dbf8d99786d3766b6da2335f6760f876999c97ac1dd3823c63888609fe1c9e0d26ac9f73a8e058a3be3de392d97e814b6135bdd496e542d325bab96
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## 0.1.2
2
+ ### 20 May, 2013
3
+
4
+ `ProtectedRecord::UseCase::Update#execute!` now returns a `ChangeRequest::Record` if any were created.
5
+
@@ -20,7 +20,10 @@ module ProtectedRecord
20
20
  # We are successful if all changes have been applied
21
21
  if !@protected_record.changes.present?
22
22
  return PayDirt::Result.new({
23
- data: { updated: @protected_record },
23
+ data: {
24
+ updated: @protected_record,
25
+ change_request: @change_request_record
26
+ },
24
27
  success: true
25
28
  })
26
29
  else
@@ -42,7 +45,8 @@ module ProtectedRecord
42
45
  }).execute!
43
46
 
44
47
  if request_result.successful?
45
- revert_protected_attributes ||
48
+ @change_request_record = request_result.data[:change_request_record]
49
+ revert_protected_attributes
46
50
  save_protected_record
47
51
  end
48
52
  end
@@ -1,3 +1,3 @@
1
1
  module ProtectedRecord
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protected_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tad Hosford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-01 00:00:00.000000000 Z
11
+ date: 2013-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pay_dirt
@@ -77,6 +77,7 @@ files:
77
77
  - .gitignore
78
78
  - .ruby-gemset
79
79
  - .ruby-version
80
+ - CHANGELOG.md
80
81
  - Gemfile
81
82
  - README.md
82
83
  - Rakefile