ar_after_transaction 0.7.0 → 0.8.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: 0cc72b7f26b842b9adfedb004133d2cc0748e0783b0fdfeb0aebe9e4c52f8b3a
4
+ data.tar.gz: c61ca0e181cc2a4eaacdb45b63aab20dc77bd7af72dcb066735adce2f989944b
5
5
  SHA512:
6
- metadata.gz: 1a03f6148f86af85473b2f709152234a07e38c04e22f366e79582880411e7455ede71a49f454870cbce1d1ce833f410d925fa29a19effc08e77ceec48c9cf539
7
- data.tar.gz: 96f2a7bc147a02f58c8b10597bd559dc86574195f465f9a22db136685951fe6f65def1c273bfb759452c1f07339e67aaaf3f5b90b04f1f44a18fd23fa4fbe530
6
+ metadata.gz: a5402cb5c03bbf9d67a8a2da4e30dde24c191e8ec403a8f4a0084d95a5d6d46f9d658cf3903f21f2947e51113df2a13eae51393bf6e8a9730e3bd8126a93cabc
7
+ data.tar.gz: 4e6556949152666f978bf152ac5c4c830dfbbaa4cb3a36da6004a4ec8a2273a989476116377ec81c3f58e4710265da911eaf2debf5565ca21718c6443c3904ca
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:
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module ARAfterTransaction
3
- VERSION = Version = '0.7.0'
4
+ VERSION = '0.8.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.8.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: 2022-01-12 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.1'
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.1'
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