action_subscriber 4.2.1 → 4.2.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: c531b1ce648c0d3f3057e7b9f9620fa605399fa9
4
- data.tar.gz: 6134d0333d3689787c0bb0508cacb918fd82602d
3
+ metadata.gz: 594de0a5e663d38d4e62b13f79397aaa0cfe3ac9
4
+ data.tar.gz: 6197131691887782ba9954c4b14e28d32e34bfca
5
5
  SHA512:
6
- metadata.gz: 1263da405d3719b7eaadacdd8bd67436b43bb8eb5cc68be20c543fa41fa74072ee3895b4bf3857bc50d8ed2dc3cf135dd444f061385c8f1bc77caf298e24d6e8
7
- data.tar.gz: c9f2eac5ef35772f65be8abf90c110af9ecc8df9fbdb6b4f26ca86dbfc595b36fd666288de4c15c9fa377f628eb700154affec2591f7d7c687c7a21b25063dda
6
+ metadata.gz: f562a6485494250754c8accab507d1a7734461b889bfefd6fda4f51fe02cbdfe58bc26b344a11eaf86804e10cbdfdcbc3ed474755d2b7ad2d7cbe210ebada5b8
7
+ data.tar.gz: 00921c4ac4c2c366e05b975486609fec0645fb0e60b6fa974154d7c3b6782d00dac4277256e3c3d183e09088ae220b547e0eda73bcd024ab167d86973792d793
@@ -39,7 +39,9 @@ module ActionSubscriber
39
39
 
40
40
  def call(env)
41
41
  def call(env)
42
- @app.call(env)
42
+ ::ActiveRecord::Base.connection_pool.with_connection do
43
+ @app.call(env)
44
+ end
43
45
  end
44
46
 
45
47
  self.class.start_timed_task!
@@ -1,3 +1,3 @@
1
1
  module ActionSubscriber
2
- VERSION = "4.2.1"
2
+ VERSION = "4.2.2"
3
3
  end
@@ -3,7 +3,12 @@ require 'action_subscriber/middleware/active_record/connection_management'
3
3
  describe ActionSubscriber::Middleware::ActiveRecord::ConnectionManagement do
4
4
  include_context 'action subscriber middleware env'
5
5
 
6
- before { allow(ActiveRecord::Base).to receive(:clear_active_connections!) }
6
+ before {
7
+ pool = double("pool")
8
+ allow(pool).to receive(:with_connection).and_yield
9
+ allow(ActiveRecord::Base).to receive(:clear_active_connections!)
10
+ allow(ActiveRecord::Base).to receive(:connection_pool).and_return(pool)
11
+ }
7
12
 
8
13
  subject { described_class.new(app) }
9
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_subscriber
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1
4
+ version: 4.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Stien
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2017-03-11 00:00:00.000000000 Z
15
+ date: 2017-04-20 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport