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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 260f2ee697d717537bd14d2fa30261d9270092be1efce392b10baea6c604f996
4
- data.tar.gz: 96c6489521d2f4224d5a9544978c106f4ef698340900b20b60112fbda5465236
3
+ metadata.gz: 1d25aea0f7e7ae01175ff26870fec3e5054d51f6dbce9905762cb61ecb161ac5
4
+ data.tar.gz: 6b1e29b8398fd3f3c7394d499fbedec62f9e5631361fda6a5760ea42af90bde5
5
5
  SHA512:
6
- metadata.gz: 1a03f6148f86af85473b2f709152234a07e38c04e22f366e79582880411e7455ede71a49f454870cbce1d1ce833f410d925fa29a19effc08e77ceec48c9cf539
7
- data.tar.gz: 96f2a7bc147a02f58c8b10597bd559dc86574195f465f9a22db136685951fe6f65def1c273bfb759452c1f07339e67aaaf3f5b90b04f1f44a18fd23fa4fbe530
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
- # config/environments/test.rb
59
- config.after_initialize do
60
- ActiveRecord::Base.normally_open_transactions = 1
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/>
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module ARAfterTransaction
3
- VERSION = Version = '0.7.0'
4
+ VERSION = '0.9.0'
4
5
  end
@@ -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
- begin
47
- yield
48
- rescue ActiveRecord::Rollback
49
- clean = false
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.7.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: 2020-12-25 00:00:00.000000000 Z
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: 4.2.0
19
+ version: 5.2.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.2'
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: 4.2.0
29
+ version: 5.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.2'
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.4.0
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.3
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