test_after_commit 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40c71bf3bc55b8c340df384625f7f9ab15e57225
4
- data.tar.gz: 0044b95fb89f5d74f8be34272313e625bc92efc4
3
+ metadata.gz: 30a9eabfded03c293fa14ff97edb56f425d31dbd
4
+ data.tar.gz: 3a7e41278fd92ea6d651ab5f403e9a0f815e78e6
5
5
  SHA512:
6
- metadata.gz: dd8d851b83884d6249a5215a9dd329077d9a33e535eeeb1e0b72e227b83473adf804a7b70733ee0a4340422360fd9befc6c0fabe4fff974817762bc052bc29e6
7
- data.tar.gz: ac79b7d5df71dace8e280b77235d4480d8717ca5a997d60bb934a9d091af8dfd1a2f02bb000268c432181f71564650a3f467b89d9f15eb380040c7a233b38fcc
6
+ metadata.gz: ba3847813fa7faaa404808edd1f37a83ba61b071f7ad190d29f5ae78db3acef1a366e33af11efa449f8342c4667c5b018a62a2dfb34f8c4b038ed09990da3200
7
+ data.tar.gz: 4441dcee58cac193958a6c421d499e1462a6f05fd285176ee25743b8a428fcaa64aa82782d4cb5cfc46f70b3ea55e7820880e0be2504e4126897ad54417a6900
@@ -15,8 +15,12 @@ module TestAfterCommit::DatabaseStatements
15
15
  ensure
16
16
  begin
17
17
  @test_open_transactions -= 1
18
- if TestAfterCommit.enabled && @test_open_transactions == 0 && !rolled_back
19
- test_commit_records
18
+ if @test_open_transactions == 0 && !rolled_back
19
+ if TestAfterCommit.enabled
20
+ test_commit_records
21
+ elsif ActiveRecord::VERSION::MAJOR == 3
22
+ @_current_transaction_records.clear
23
+ end
20
24
  end
21
25
  ensure
22
26
  result
@@ -1,3 +1,3 @@
1
1
  module TestAfterCommit
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_after_commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.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: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord