postgressor 0.2.0 → 0.2.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: e3e6aec99892829719db0dcc79bd3f83937688d8cd6e3ed6a6846deea3171179
4
- data.tar.gz: 9b036d82fdd5bc61d699ea5ee8ba89f6af5561ecd4d892d34deb919be0800beb
3
+ metadata.gz: 628ff431c0d0533d3d8f7f50047cd3642af5a06a1deae6d4bb9ad062526c2149
4
+ data.tar.gz: 9791613e01b0bcb09a4f4fe2fa4bfb54b9a862da7679a9452b38f36511a9c15b
5
5
  SHA512:
6
- metadata.gz: bd90c0e80fbc2d37418232f8c2dbc25ba26171512f79f9c9efb80352fcfaf87cea6cfffd5c878e15e885e71690b02382835fdb97931c7d75c393a75964540e15
7
- data.tar.gz: 7afa9d9b0d2d2fc50fe0d275029f6d56397c876f8939b3127b60e6f8e604e1fbcd21338ac82e7eec4ed0bebf8c4fe429a73d5732e1c39333e92fef7a130f6025
6
+ metadata.gz: 691f5d593c2c871794ea661c36743e71da12cb2bbc5e12d7b32f419b3ae60cf3fb8fd6f3efcb3ade8391191b9afa1b4ceff9b223fbba3296bd196f8b6c926354
7
+ data.tar.gz: da807e4a4f127596e7a93bdfe9ade6b3dda16df41d76c0e83e4562d97559f574f32a9ceb604e00d18bfa64abe1f9f39874c81dae40878b4a1edf9e76b80b955b
@@ -2,6 +2,7 @@ require 'uri'
2
2
  require 'thor'
3
3
  require 'dotenv/load'
4
4
  require 'yaml'
5
+ require 'erb'
5
6
 
6
7
  module Postgressor
7
8
  class CLI < Thor
@@ -135,7 +136,8 @@ module Postgressor
135
136
  if url.nil? || url.strip.empty?
136
137
  # If DATABASE_URL env not present, try to read from config/database.yml (Rails)
137
138
  if File.exist?("config/database.yml")
138
- settings = YAML.load_file("config/database.yml")
139
+ settings = YAML.load(ERB.new(File.read "config/database.yml").result)
140
+
139
141
  # By default, use production config, if RAILS_ENV not provided
140
142
  config = ENV["RAILS_ENV"] ? settings[ENV["RAILS_ENV"]] : settings["production"]
141
143
 
@@ -1,3 +1,3 @@
1
1
  module Postgressor
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgressor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Afanasev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-16 00:00:00.000000000 Z
11
+ date: 2019-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubyforge_project:
125
- rubygems_version: 2.7.6
124
+ rubygems_version: 3.0.3
126
125
  signing_key:
127
126
  specification_version: 4
128
127
  summary: Manage your application Postgres user and database easily using simple CLI