action_subscriber 4.2.1-java → 4.2.2-java

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: b80aa9c8134cec3a2430e975fde77a0764035c2d
4
- data.tar.gz: 8767dad46211dd3b90d29c40e8a01ecb7e6e2491
3
+ metadata.gz: fb0e1bb132b5d37f98d1d979c76734643a03d5ae
4
+ data.tar.gz: 13fba510e6fc12db47a10cfa8c54c2541e549e92
5
5
  SHA512:
6
- metadata.gz: cabe30d24cc2d4f28f3213f09710b4b60bc84064d328bb64c19b15963d41cf445f0c2022c3e362e2272f3a2e610a0588fa2b4cd83596afae07246d5d96956d68
7
- data.tar.gz: 7187ba4237d77c7e04421211348a65cca19edae2eb740c6c04eabd41efa707e225207a0df624a3e5b583f6e61bce6c470db546a5897ab3f4d5578ac75ad100fa
6
+ metadata.gz: 0a37fc012a189d5d58823bc64b3ae8cf4d6c416d0d8e4ab6166328d4c2e223b48a461f211ef36a265cc5666065bb647b36a2ecee34fe3d229c09ead33e8b9bb1
7
+ data.tar.gz: 3ab5f4dcda21c1543cac0f9aa0b41e02793b3a6d15c17897cd5267e41dff17b093dfba8ebde3cda3944629f248d15d1d376b57da6fb841b4a0058cda9f1cd560
@@ -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: java
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
  requirement: !ruby/object:Gem::Requirement
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  version: '0'
282
282
  requirements: []
283
283
  rubyforge_project:
284
- rubygems_version: 2.6.10
284
+ rubygems_version: 2.6.9
285
285
  signing_key:
286
286
  specification_version: 4
287
287
  summary: ActionSubscriber is a DSL that allows a rails app to consume messages from a RabbitMQ broker.