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 +4 -4
- data/lib/postgressor/cli.rb +3 -1
- data/lib/postgressor/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 628ff431c0d0533d3d8f7f50047cd3642af5a06a1deae6d4bb9ad062526c2149
|
4
|
+
data.tar.gz: 9791613e01b0bcb09a4f4fe2fa4bfb54b9a862da7679a9452b38f36511a9c15b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 691f5d593c2c871794ea661c36743e71da12cb2bbc5e12d7b32f419b3ae60cf3fb8fd6f3efcb3ade8391191b9afa1b4ceff9b223fbba3296bd196f8b6c926354
|
7
|
+
data.tar.gz: da807e4a4f127596e7a93bdfe9ade6b3dda16df41d76c0e83e4562d97559f574f32a9ceb604e00d18bfa64abe1f9f39874c81dae40878b4a1edf9e76b80b955b
|
data/lib/postgressor/cli.rb
CHANGED
@@ -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.
|
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
|
|
data/lib/postgressor/version.rb
CHANGED
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.
|
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-
|
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
|
-
|
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
|