pghero 3.3.3 → 3.3.4
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/CHANGELOG.md +4 -0
- data/lib/pghero/version.rb +1 -1
- data/lib/pghero.rb +7 -2
- 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: 2332e2a4f7b9bd25d972ec1f06635dfc43676412c5be4147e3a7e3dc8effa213
|
|
4
|
+
data.tar.gz: 1a24e423a0d8749d69eb938eaa27db1beed974d1a058e6ae6331badeae9c4d59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b19ca11ceee2f44bbcdec49e14f0653df6efc740e4fbd710700a03254ac8d40db84690409a731c06359d547934d401615925e88df317ccae4137eecefcfe8ddf
|
|
7
|
+
data.tar.gz: b6c0069a0e34ecd66d359aff9226fe678ccc15d55b1ad0e70f421a7fa9b9a2113d7eb31cc30d69364489fa1e10e2b5d6d0e48ada03d15e79aff5ba9dda350659
|
data/CHANGELOG.md
CHANGED
data/lib/pghero/version.rb
CHANGED
data/lib/pghero.rb
CHANGED
|
@@ -121,7 +121,7 @@ module PgHero
|
|
|
121
121
|
|
|
122
122
|
config_file_exists = File.exist?(path)
|
|
123
123
|
|
|
124
|
-
config = YAML.safe_load(ERB.new(File.read(path)).result) if config_file_exists
|
|
124
|
+
config = YAML.safe_load(ERB.new(File.read(path)).result, aliases: true) if config_file_exists
|
|
125
125
|
config ||= {}
|
|
126
126
|
|
|
127
127
|
@file_config =
|
|
@@ -151,7 +151,7 @@ module PgHero
|
|
|
151
151
|
|
|
152
152
|
if databases.empty?
|
|
153
153
|
databases["primary"] = {
|
|
154
|
-
"url" => ENV["PGHERO_DATABASE_URL"] ||
|
|
154
|
+
"url" => ENV["PGHERO_DATABASE_URL"] || default_connection_config
|
|
155
155
|
}
|
|
156
156
|
end
|
|
157
157
|
|
|
@@ -168,6 +168,11 @@ module PgHero
|
|
|
168
168
|
}
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
+
# private
|
|
172
|
+
def default_connection_config
|
|
173
|
+
connection_config(ActiveRecord::Base) if ActiveRecord::VERSION::STRING.to_f < 7.1
|
|
174
|
+
end
|
|
175
|
+
|
|
171
176
|
# ensure we only have one copy of databases
|
|
172
177
|
# so there's only one connection pool per database
|
|
173
178
|
def databases
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pghero
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.3.
|
|
4
|
+
version: 3.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Kane
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-09-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|