test_after_commit 0.2.5 → 0.2.6

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
  SHA1:
3
- metadata.gz: ecb5ad1846055c48780400cecd1a21e2399d6862
4
- data.tar.gz: d0abaa5cf7047545e2d4aaafcee3f2d2f6d434d1
3
+ metadata.gz: 061f60c5c03507e7bb1443834af63bb40ee4674c
4
+ data.tar.gz: d70be83e48b77da840d0c7bbc73d510bdb00bda1
5
5
  SHA512:
6
- metadata.gz: e2ef9fe01a46227536a49a0e0190dc63c1566f8a0de333b3357e1761a0c8f5247fd6f0d8b0e302f933ca25b75637abeb4314fb88e965c161909c504b36ab9165
7
- data.tar.gz: 70a4d044459a65829395aa9abb7a114eaedad05d3e29d65d7ab2d2a2d0f20e6c9b49858059d9dadac412416e9578c3a251d47ce37f06e0705b9a2f7784128035
6
+ metadata.gz: 2fb8d811bddd3d4383c96eb61ee769e1d56c1989548c0f1c4b6348ce90b56688bfe1d9fc659c2135e999c78a7940a60fd7d947164ff06765427e184b1a3b75f4
7
+ data.tar.gz: bd1c16a880e3ad107f483532d81f86df217ce61192eaaf5bde653b92ea81579e05d1b36fb7a90331e6eb2896f7076af8b3f21235c2bb4cff0cfe43484a23d543
@@ -28,9 +28,10 @@ ActiveRecord::ConnectionAdapters::DatabaseStatements.class_eval do
28
28
  if ActiveRecord::VERSION::MAJOR == 3
29
29
  commit_transaction_records(false)
30
30
  else
31
- @transaction.commit_records
32
- @transaction.records.clear # prevent duplicate .commit!
33
- @transaction.instance_variable_get(:@state).set_state(nil)
31
+ transaction = @transaction || @transaction_manager.current_transaction
32
+ transaction.commit_records
33
+ transaction.records.clear # prevent duplicate .commit!
34
+ transaction.instance_variable_get(:@state).set_state(nil)
34
35
  end
35
36
  end
36
37
 
@@ -1,3 +1,3 @@
1
1
  module TestAfterCommit
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
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: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-19 00:00:00.000000000 Z
11
+ date: 2014-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord