pgb_connection_reaper_rb 0.1.1 → 0.1.3

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
  SHA256:
3
- metadata.gz: 572afe18ef474649611a89d55319a6dfd2889c404b5f81be1a8e3319bd1be2a2
4
- data.tar.gz: 89f5fe8ef74bad4c3530a31adb380c9effaac7edbe31c2eeb35524945650b1bc
3
+ metadata.gz: fdb17a5ea51eb80dc3d0aa206a2693ca9ef5f90ed0d37d2c2ce1a4a560e195a5
4
+ data.tar.gz: 7151fd012b7edd7f3d4b9fce6e1ffc30840da40bcb52ac94a47a7f174e70340c
5
5
  SHA512:
6
- metadata.gz: 41ec26720b292406771b9efed8ed88ac9442042caa62f753c763e4079d5864e55f6b5099910255455b96853e9e78839205e1a461fad9f1d42249ef0e299d227a
7
- data.tar.gz: fe22aff3a0c69b48668b30c4bd667de385bd301e25a07cba073cdcc0efc5e6cbe8798f0f2971cbdb030830e7c58a644bc09f5849628c0823093b603da38f1f7e
6
+ metadata.gz: e931b1ff99f27a8894585496abcffda720d672f2245d52f7e46ad9f872d05f59047f6814fd584c63edb1a4fbc1a8856068c970be8b7b36b0239a8c1ce702283f
7
+ data.tar.gz: 6ecf1855b0c6e10a5a0bc7e0bb86d8e3931b7eabfda52f53dbf732f9c946ec355c3c76ff3a39bbda2cee23229da6d12516dc951be507b4f4388a9a09594ccdb1
data/Gemfile.lock CHANGED
@@ -1,28 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pgb_connection_reaper_rb (0.1.0)
4
+ pgb_connection_reaper_rb (0.1.1)
5
5
  activerecord (>= 4.2)
6
6
  activesupport (>= 4.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (7.0.8.2)
12
- activesupport (= 7.0.8.2)
13
- activerecord (7.0.8.2)
14
- activemodel (= 7.0.8.2)
15
- activesupport (= 7.0.8.2)
16
- activesupport (7.0.8.2)
11
+ activemodel (7.0.8.4)
12
+ activesupport (= 7.0.8.4)
13
+ activerecord (7.0.8.4)
14
+ activemodel (= 7.0.8.4)
15
+ activesupport (= 7.0.8.4)
16
+ activesupport (7.0.8.4)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
20
20
  tzinfo (~> 2.0)
21
- concurrent-ruby (1.2.3)
21
+ concurrent-ruby (1.3.4)
22
22
  diff-lcs (1.5.0)
23
- i18n (1.14.5)
23
+ i18n (1.14.6)
24
24
  concurrent-ruby (~> 1.0)
25
- minitest (5.23.1)
25
+ minitest (5.25.1)
26
26
  rake (12.3.3)
27
27
  rspec (3.12.0)
28
28
  rspec-core (~> 3.12.0)
@@ -3,7 +3,15 @@
3
3
  module PgbConnectionReaperRb
4
4
  module PostgreSQLAdapterExtension
5
5
  def reconnect!
6
- @lock.synchronize do
6
+ lock = if defined?(@lock)
7
+ # Rails 6+
8
+ @lock
9
+ else
10
+ # Rails 4.2
11
+ ActiveRecord::Base.connection_pool.instance_variable_get(:@mon_data)
12
+ end
13
+
14
+ lock.synchronize do
7
15
  super
8
16
  disconnect!
9
17
  connect
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgbConnectionReaperRb
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgb_connection_reaper_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Borisov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-20 00:00:00.000000000 Z
11
+ date: 2024-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord