ar_after_transaction 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +6 -4
- data/lib/ar_after_transaction/version.rb +2 -1
- data/lib/ar_after_transaction.rb +4 -6
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d25aea0f7e7ae01175ff26870fec3e5054d51f6dbce9905762cb61ecb161ac5
|
4
|
+
data.tar.gz: 6b1e29b8398fd3f3c7394d499fbedec62f9e5631361fda6a5760ea42af90bde5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2833219046158eefd4dcdcf7d61d763184d1b232ba26e53829620ef04ae46dda49a7704b3cb8e57825298642c39474e2f97157d988812679bd430d6995bffe53
|
7
|
+
data.tar.gz: 2223ea880e4df0648f89ae3117b6d30d27ff4722387c78a86117fd7455fec1d13bd359831f1d9c0378795d4b3ed039f402f73f3437f530736639f87014073e59
|
data/Readme.md
CHANGED
@@ -54,11 +54,12 @@ after_transaction will perform the given block immediately
|
|
54
54
|
after_transaction assumes zero open transactions.<br/>
|
55
55
|
If you use transactional fixtures you should change it in test mode.
|
56
56
|
|
57
|
+
`Rspec:`
|
57
58
|
```ruby
|
58
|
-
#
|
59
|
-
config.
|
60
|
-
|
61
|
-
end
|
59
|
+
# spec/rails_helper.rb
|
60
|
+
config.before(:suite) do
|
61
|
+
ActiveRecord::Base.normally_open_transactions = 1
|
62
|
+
end
|
62
63
|
```
|
63
64
|
|
64
65
|
### Rails 3: after_commit hook can replace the first usage example:
|
@@ -99,6 +100,7 @@ Authors
|
|
99
100
|
- [C.W.](https://github.com/compwron)
|
100
101
|
- [Ben Weintraub](https://github.com/benweint)
|
101
102
|
- [Vladimir Temnikov](https://github.com/vladimirtemnikov)
|
103
|
+
- [Mark Gangl](https://github.com/attack)
|
102
104
|
|
103
105
|
[Michael Grosser](http://grosser.it)<br/>
|
104
106
|
michael@grosser.it<br/>
|
data/lib/ar_after_transaction.rb
CHANGED
@@ -43,12 +43,10 @@ module ARAfterTransactionConnection
|
|
43
43
|
def transaction_with_after(**args)
|
44
44
|
clean = true
|
45
45
|
transaction_without_after(**args) do
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
raise
|
51
|
-
end
|
46
|
+
yield
|
47
|
+
rescue ActiveRecord::Rollback
|
48
|
+
clean = false
|
49
|
+
raise
|
52
50
|
end
|
53
51
|
rescue StandardError
|
54
52
|
clean = false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ar_after_transaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.2.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 5.2.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bump
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,14 +135,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 2.
|
138
|
+
version: 2.6.0
|
139
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
rubygems_version: 3.1.
|
145
|
+
rubygems_version: 3.1.6
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Execute irreversible actions only when transactions are not rolled back
|