after_transaction_commit 1.1.1 → 1.1.2

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: 5d37205f04fd9dab8a6f219b2ff9ab0760b953d2
4
- data.tar.gz: '058120cf8588254d3ce383837752aaf0d575d5cc'
3
+ metadata.gz: f1c7c34764bd9e999d94e171a49d5c30770ec7a3
4
+ data.tar.gz: 45fd10cf2ad53b268774ce368fc52131a3161ab6
5
5
  SHA512:
6
- metadata.gz: 692045eb18c6ec174083466cb7d5e02b84a8eeca2c03ddb023238dad14ee4067b70946e5870899f86718577d3efbce1a0801986c2c8d57ce2b991a4db958df3f
7
- data.tar.gz: cb79f79c415901f0b4b2fec1875795fae2f515fe08aed3d015f0e31b277b4b21e57ccccd5f889985c5e9a67e21f1470ed2293c175e2b24500a2a152304b5b960
6
+ metadata.gz: d42d9aa4f572b0883d1093076ca9b806671263b5e6ae4b66e02f6d37b7c9d608b1376da7759b1bdc85601b8cc92e545ef29aa93cd42c0a315651ef92923e8220
7
+ data.tar.gz: 7df1363b174f0848d9b2d40234ec580c6172fa2ae66db672980f81a7d2965994c89cc0190818761a42437f0eac7a9bce153d9e4c64aed80c330ada6f5dacbec2
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency "bump"
25
25
  spec.add_development_dependency "bundler", "~> 1.11"
26
+ spec.add_development_dependency "byebug"
26
27
  spec.add_development_dependency "rake", "~> 11.0"
27
28
  spec.add_development_dependency "rspec"
28
29
  spec.add_development_dependency "sqlite3"
@@ -20,8 +20,6 @@ ActiveRecord::ConnectionAdapters::DatabaseStatements.class_eval do
20
20
  @after_transaction_commit = []
21
21
  callbacks.each { |cb| cb.call() }
22
22
  end
23
- ensure
24
- @after_transaction_commit = [] if @after_transaction_commit
25
23
  end
26
24
 
27
25
  def _remove_after_transaction_commit_callbacks
@@ -1,3 +1,3 @@
1
1
  module AfterTransactionCommit
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -84,4 +84,16 @@ describe AfterTransactionCommit do
84
84
  end
85
85
  expect(a).to eql 1
86
86
  end
87
+
88
+ it "doesn't lose a callback inside a callback inside a nested non-joinable transaction" do
89
+ a = 0
90
+ User.connection.transaction do
91
+ User.connection.transaction(:requires_new => true) do
92
+ User.connection.after_transaction_commit do
93
+ User.connection.after_transaction_commit { puts "inner callback"; a += 1 }
94
+ end
95
+ end
96
+ end
97
+ expect(a).to eql 1
98
+ end
87
99
  end
@@ -9,49 +9,48 @@ GIT
9
9
  PATH
10
10
  remote: ../..
11
11
  specs:
12
- after_transaction_commit (1.1.0)
12
+ after_transaction_commit (1.1.1)
13
13
  activerecord (>= 4.0)
14
14
 
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- activemodel (4.2.7.1)
19
- activesupport (= 4.2.7.1)
18
+ activemodel (4.2.8)
19
+ activesupport (= 4.2.8)
20
20
  builder (~> 3.1)
21
- activerecord (4.2.7.1)
22
- activemodel (= 4.2.7.1)
23
- activesupport (= 4.2.7.1)
21
+ activerecord (4.2.8)
22
+ activemodel (= 4.2.8)
23
+ activesupport (= 4.2.8)
24
24
  arel (~> 6.0)
25
- activesupport (4.2.7.1)
25
+ activesupport (4.2.8)
26
26
  i18n (~> 0.7)
27
- json (~> 1.7, >= 1.7.7)
28
27
  minitest (~> 5.1)
29
28
  thread_safe (~> 0.3, >= 0.3.4)
30
29
  tzinfo (~> 1.1)
31
- arel (6.0.3)
32
- builder (3.2.2)
30
+ arel (6.0.4)
31
+ builder (3.2.3)
33
32
  bump (0.5.3)
34
- diff-lcs (1.2.5)
35
- i18n (0.7.0)
36
- json (1.8.3)
37
- minitest (5.9.1)
33
+ byebug (9.0.6)
34
+ diff-lcs (1.3)
35
+ i18n (0.8.1)
36
+ minitest (5.10.2)
38
37
  rake (11.3.0)
39
- rspec (3.5.0)
40
- rspec-core (~> 3.5.0)
41
- rspec-expectations (~> 3.5.0)
42
- rspec-mocks (~> 3.5.0)
43
- rspec-core (3.5.4)
44
- rspec-support (~> 3.5.0)
45
- rspec-expectations (3.5.0)
38
+ rspec (3.6.0)
39
+ rspec-core (~> 3.6.0)
40
+ rspec-expectations (~> 3.6.0)
41
+ rspec-mocks (~> 3.6.0)
42
+ rspec-core (3.6.0)
43
+ rspec-support (~> 3.6.0)
44
+ rspec-expectations (3.6.0)
46
45
  diff-lcs (>= 1.2.0, < 2.0)
47
- rspec-support (~> 3.5.0)
48
- rspec-mocks (3.5.0)
46
+ rspec-support (~> 3.6.0)
47
+ rspec-mocks (3.6.0)
49
48
  diff-lcs (>= 1.2.0, < 2.0)
50
- rspec-support (~> 3.5.0)
51
- rspec-support (3.5.0)
52
- sqlite3 (1.3.11)
53
- thread_safe (0.3.5)
54
- tzinfo (1.2.2)
49
+ rspec-support (~> 3.6.0)
50
+ rspec-support (3.6.0)
51
+ sqlite3 (1.3.13)
52
+ thread_safe (0.3.6)
53
+ tzinfo (1.2.3)
55
54
  thread_safe (~> 0.1)
56
55
  wwtd (1.3.0)
57
56
 
@@ -63,6 +62,7 @@ DEPENDENCIES
63
62
  after_transaction_commit!
64
63
  bump
65
64
  bundler (~> 1.11)
65
+ byebug
66
66
  rake (~> 11.0)
67
67
  rspec
68
68
  sqlite3
@@ -70,4 +70,4 @@ DEPENDENCIES
70
70
  wwtd
71
71
 
72
72
  BUNDLED WITH
73
- 1.14.3
73
+ 1.14.6
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: after_transaction_commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Palmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2017-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.11'
55
+ - !ruby/object:Gem::Dependency
56
+ name: byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -159,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
173
  version: '0'
160
174
  requirements: []
161
175
  rubyforge_project:
162
- rubygems_version: 2.6.10
176
+ rubygems_version: 2.6.11
163
177
  signing_key:
164
178
  specification_version: 4
165
179
  summary: ActiveRecord::Base.connection.after_transaction_commit { ... }