ruby-pg-extras 5.6.16 → 5.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 789f323a6bba1cdf366a6eb53b5102a4a0f3d43ebafb1ea2f3151451bb28bffa
4
- data.tar.gz: 4faaa79f35aa2c32c1b7c9d7def43b9319d43bb67a3933458bec3badceb672b6
3
+ metadata.gz: 743910d2bd970c03a9ca1d79d56de46d40c5742aae37d0e24021d58e5c2883c6
4
+ data.tar.gz: e6a50ce83c92f55f49119feaeddf6796c3035a9b1b1d30a2d2439af4231c744a
5
5
  SHA512:
6
- metadata.gz: 8fe626803b4d7eb880f45571998dac5fd95d0430967c8f111d56ca72891732bc957db2276579bab6063087a8241c13ac2daa28e4059bcb4ac1c6688e6e5af478
7
- data.tar.gz: b849cd97547e4b394dc4fb6a6e0af538e8dc8c51d85653af165b944c341d0e9cf98ecb0df7607a807145a5befb67cf097f7275dde9de9303d694cb28e6e59b99
6
+ metadata.gz: 7c9f78aed2dfbbadbb41e9957b390b1dc4f0effd997515b7fd8679d677c210d0da9a664f14e16a0bb5f5d26016c98c40331acb9db8327073ec9ee3514a3519e8
7
+ data.tar.gz: 73f758201aac10e76af41a531b9e0bf0badec4eba00491174225ac46981d1c92e9cfedaaebba694472b036d7b603197d361948999d1a11a2d4af0d990271db7c
@@ -247,6 +247,8 @@ module RubyPgExtras
247
247
  end
248
248
 
249
249
  def self.database_url=(value)
250
+ @_connection&.close
251
+ @_connection = nil
250
252
  @@database_url = value
251
253
  end
252
254
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyPgExtras
4
- VERSION = "5.6.16"
4
+ VERSION = "5.6.17"
5
5
  end
data/spec/smoke_spec.rb CHANGED
@@ -65,5 +65,17 @@ describe RubyPgExtras do
65
65
  RubyPgExtras.bloat(in_format: :hash)
66
66
  end.not_to raise_error
67
67
  end
68
+
69
+ it "resets the connection when setting database URL" do
70
+ old_connection = RubyPgExtras.connection
71
+ expect(old_connection).not_to be_finished
72
+
73
+ RubyPgExtras.database_url = ENV.fetch("DATABASE_URL")
74
+
75
+ expect(old_connection).to be_finished
76
+ new_connection = RubyPgExtras.connection
77
+ expect(new_connection).not_to eq(old_connection)
78
+ expect(new_connection).not_to be_finished
79
+ end
68
80
  end
69
81
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-pg-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.16
4
+ version: 5.6.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-06 00:00:00.000000000 Z
11
+ date: 2026-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg