postgressor 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/lib/postgressor/cli.rb +9 -1
- data/lib/postgressor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5db914feef51c18372b3e98b10d8527c2b318803420e385a2f0b261c53a3dd9
|
4
|
+
data.tar.gz: c8d13ee8eeb2251f2fb73c9cd6d487aa33dbcd64db8f0130666ee1ca6fb1961a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cf59679ad744bfa1b4beaaab44dbbd8e3536fd40eac7dcfd6581b09bd0fca440f6bf454728308e397fc35c79f3086a01a4fa15ecf6958ff2a91cbeda26e1d84
|
7
|
+
data.tar.gz: bac52256eaf78eb5e734d45f1b31297cbad0a0f443119d348987fd6ff073c621921a99bbbb15b04872fa1dbfa631809219d8dbb70bf97f0126c564d1091707b3
|
data/CHANGELOG.md
CHANGED
data/lib/postgressor/cli.rb
CHANGED
@@ -99,6 +99,13 @@ module Postgressor
|
|
99
99
|
puts VERSION
|
100
100
|
end
|
101
101
|
|
102
|
+
desc "print_database_url", "Print current database url"
|
103
|
+
def print_db_url
|
104
|
+
preload!
|
105
|
+
|
106
|
+
puts @conf[:url]
|
107
|
+
end
|
108
|
+
|
102
109
|
private
|
103
110
|
|
104
111
|
def set_user_to_superuser
|
@@ -174,13 +181,14 @@ module Postgressor
|
|
174
181
|
raise "DB adapter is not postgres" unless config["adapter"].include?("postgres")
|
175
182
|
|
176
183
|
@conf = {
|
177
|
-
url: nil,
|
178
184
|
db: config["database"],
|
179
185
|
host: config["host"],
|
180
186
|
port: config["port"],
|
181
187
|
user: config["username"],
|
182
188
|
password: config["password"]
|
183
189
|
}
|
190
|
+
|
191
|
+
@conf[:url] = "postgres://#{@conf[:user]}:#{@conf[:password]}@#{@conf[:host]}/#{@conf[:db]}"
|
184
192
|
end
|
185
193
|
end
|
186
194
|
end
|
data/lib/postgressor/version.rb
CHANGED