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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 263f317f37f9a03b530c367d7338a6a729c73a079405dde88c8a0dcf6d7ef598
4
- data.tar.gz: e638c31d20825afb58073e39f4cb5c1c4532f80e90719ebb87600ac2bd787808
3
+ metadata.gz: b5db914feef51c18372b3e98b10d8527c2b318803420e385a2f0b261c53a3dd9
4
+ data.tar.gz: c8d13ee8eeb2251f2fb73c9cd6d487aa33dbcd64db8f0130666ee1ca6fb1961a
5
5
  SHA512:
6
- metadata.gz: 05df1a9d89da3d1287b58f890f37c94fc5e9fd3e5f32201c05fdd57553599abad7dcb083609944804b8b59b445edecc4c9f13a5dc184f2a5606726c1ac70de24
7
- data.tar.gz: dae905bd24365a3da682036037ce20c9865a944be4d48ba004db3abbab762f700cbf7beee47d2aab1b79139c3b9eca39cc7fb55dc9b569ee86ade393b15d8127
6
+ metadata.gz: 9cf59679ad744bfa1b4beaaab44dbbd8e3536fd40eac7dcfd6581b09bd0fca440f6bf454728308e397fc35c79f3086a01a4fa15ecf6958ff2a91cbeda26e1d84
7
+ data.tar.gz: bac52256eaf78eb5e734d45f1b31297cbad0a0f443119d348987fd6ff073c621921a99bbbb15b04872fa1dbfa631809219d8dbb70bf97f0126c564d1091707b3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
1
  # CHANGELOG
2
+ ## 0.3.1
3
+ * Add command `print_db_url`
4
+
2
5
  ## 0.3.0
3
- * Added optional `dump_file_path` parameter to `dumpdb` command
6
+ * Add optional `dump_file_path` parameter to `dumpdb` command
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Postgressor
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgressor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Afanasev