transaction_changes 2.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -1
- data/README.md +19 -6
- data/lib/transaction_changes/version.rb +1 -1
- data/lib/transaction_changes.rb +1 -0
- data/transaction_changes.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fed12bd13bb6d0513d3eb26237dc3a118c60f52
|
4
|
+
data.tar.gz: 22c7dfc663f82ad59736343a6893a82172498dc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 035145aa0ffd50636c6c716049d9bf37e7eab1f130664ecfced34fc61087a099a4c8d6b85d249cfb3a3a0978b7351d9471e6ac7fd16b5863dff20ea11bb0a3f3
|
7
|
+
data.tar.gz: 40c3b2b0232cc1fd02cad10d3d89c6587eadeb679ec7def959bf93e1a2e55eaf0f140fb733a2c2b6a82012de2c64e5fb70cef34029fc598c95c83033e8179de4
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
transaction_changes (
|
4
|
+
transaction_changes (2.0)
|
5
|
+
activesupport
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
8
9
|
specs:
|
10
|
+
activesupport (4.2.10)
|
11
|
+
i18n (~> 0.7)
|
12
|
+
minitest (~> 5.1)
|
13
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
14
|
+
tzinfo (~> 1.1)
|
15
|
+
concurrent-ruby (1.0.5)
|
9
16
|
diff-lcs (1.3)
|
17
|
+
i18n (0.9.5)
|
18
|
+
concurrent-ruby (~> 1.0)
|
19
|
+
minitest (5.11.3)
|
10
20
|
rake (10.5.0)
|
11
21
|
rspec (3.7.0)
|
12
22
|
rspec-core (~> 3.7.0)
|
@@ -21,6 +31,9 @@ GEM
|
|
21
31
|
diff-lcs (>= 1.2.0, < 2.0)
|
22
32
|
rspec-support (~> 3.7.0)
|
23
33
|
rspec-support (3.7.1)
|
34
|
+
thread_safe (0.3.6)
|
35
|
+
tzinfo (1.2.5)
|
36
|
+
thread_safe (~> 0.1)
|
24
37
|
|
25
38
|
PLATFORMS
|
26
39
|
ruby
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# TransactionChanges
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem stores attribute changes of a model during ActiveRecord Transaction so that they are available in an after_commit callbacks.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,22 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
```ruby
|
24
|
+
class Profile < ActiveRecord::Base
|
25
|
+
|
26
|
+
after_commit :handle_callback
|
27
|
+
|
28
|
+
include TransactionChanges
|
29
|
+
|
30
|
+
def handle_callback
|
31
|
+
puts transaction_changes
|
32
|
+
end
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
## Important Notes
|
37
|
+
|
38
|
+
`include TransactionChanges` should be written after all the after_commit callbacks
|
26
39
|
|
27
40
|
## Development
|
28
41
|
|
@@ -32,7 +45,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
45
|
|
33
46
|
## Contributing
|
34
47
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
48
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Priyanka-Soni-id/transaction_changes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
49
|
|
37
50
|
## License
|
38
51
|
|
@@ -40,4 +53,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
53
|
|
41
54
|
## Code of Conduct
|
42
55
|
|
43
|
-
Everyone interacting in the TransactionChanges project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
56
|
+
Everyone interacting in the TransactionChanges project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Priyanka-Soni-id/transaction_changes/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/transaction_changes.rb
CHANGED
data/transaction_changes.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transaction_changes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Priyanka
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Store attribute changes during ActiveRecord Transaction
|
56
70
|
email:
|
57
71
|
- priyankatrancedi.iitd@gmail.com
|