replica_pools 2.4.0 → 2.4.1
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 +4 -4
- data/lib/replica_pools/pools.rb +5 -2
- data/lib/replica_pools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab90e26beb7efb6b13dd59a067a1507207d657659cac075ee91d1364a652e476
|
|
4
|
+
data.tar.gz: 166edf9e559cc696d837f32c8558e31fc69e1b24708e4d6a543210317f7af5e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf7ec04c450f7338bb5aac3bb41784dd88b2d3e069423fc5fdfbe8f9d13657eb3e35180c5a52e18099a608effd6c57073c5b20af2150e2b20a6710a8eac4388b
|
|
7
|
+
data.tar.gz: 4dfb218fbf9136d536b218072c2bba6a06ccd2412403461b9bc19184e9ac1767b8d1af64b5c025532f08651dd3b2fb4d04beea3e6202ea0f901a856f2a8396db
|
data/lib/replica_pools/pools.rb
CHANGED
|
@@ -34,11 +34,14 @@ module ReplicaPools
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def config_hash
|
|
37
|
-
if ActiveRecord::VERSION::MAJOR
|
|
38
|
-
# in Rails
|
|
37
|
+
if ActiveRecord::VERSION::MAJOR > 6
|
|
38
|
+
# in Rails = 7, ActiveRecord::Base.configurations.to_h has been deprecated
|
|
39
39
|
ActiveRecord::Base.configurations.configs_for.map do |c|
|
|
40
40
|
[c.env_name, c.configuration_hash.transform_keys(&:to_s)]
|
|
41
41
|
end.to_h
|
|
42
|
+
elsif ActiveRecord::VERSION::MAJOR == 6
|
|
43
|
+
# in Rails = 6, `configurations` is an instance of ActiveRecord::DatabaseConfigurations
|
|
44
|
+
ActiveRecord::Base.configurations.to_h
|
|
42
45
|
else
|
|
43
46
|
# in Rails < 6, it's just a hash
|
|
44
47
|
ActiveRecord::Base.configurations
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: replica_pools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Drabik
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2023-02-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activerecord
|