ridgepole 0.8.1 → 0.8.2
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/README.md +2 -0
- data/lib/ridgepole/cli/config.rb +4 -1
- data/lib/ridgepole/version.rb +1 -1
- data/spec/mysql/cli/config_spec.rb +13 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57ca4e6b9d4ac5f62c434e2cd3116f13b77e308666beb4e7e242def292d25957
|
4
|
+
data.tar.gz: 3cb9d7fb9e6949b9627ddb23219b5dbe7a7e34168e00fcf0cb073fd123b90e36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba1cab03cb73b791fc28bf52985dd7caef619694fad6fc0ab9b22eedc53791da70050d6c77b4017019708dade6387777836c427dc080c9dace6690ac83a1a3b
|
7
|
+
data.tar.gz: 3f8446b608a6bdc86095aa3639bd3e57bcebdf423c858edf3f12613e98a6674be7bf210ec6443d0964189143cae3f5af4223a36cda705e8c0bf3ddaf44026fab
|
data/README.md
CHANGED
@@ -103,6 +103,8 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
|
|
103
103
|
* Support Rails 6.0
|
104
104
|
* `>= 0.8.1`
|
105
105
|
* Drop tables in an order considering foreign key constraints ([pull#284](https://github.com/winebarrel/ridgepole/pull/284))
|
106
|
+
* `>= 0.8.2`
|
107
|
+
* Support `postgres://` schema ([pull#285](https://github.com/winebarrel/ridgepole/pull/285))
|
106
108
|
</details>
|
107
109
|
|
108
110
|
## Installation
|
data/lib/ridgepole/cli/config.rb
CHANGED
@@ -69,8 +69,11 @@ module Ridgepole
|
|
69
69
|
{}
|
70
70
|
end
|
71
71
|
|
72
|
+
adapter = uri.scheme
|
73
|
+
adapter = 'postgresql' if adapter == 'postgres'
|
74
|
+
|
72
75
|
query_hash.merge(
|
73
|
-
'adapter' =>
|
76
|
+
'adapter' => adapter,
|
74
77
|
'username' => CGI.unescape(uri.user),
|
75
78
|
'password' => uri.password ? CGI.unescape(uri.password) : nil,
|
76
79
|
'host' => uri.host,
|
data/lib/ridgepole/version.rb
CHANGED
@@ -125,6 +125,19 @@ describe Ridgepole::Config do
|
|
125
125
|
}
|
126
126
|
end
|
127
127
|
|
128
|
+
context 'when passed Heroku style DATABASE_URL' do
|
129
|
+
let(:config) { 'postgres://root:pass@127.0.0.1:5432/blog' }
|
130
|
+
let(:env) { 'development' }
|
131
|
+
|
132
|
+
it {
|
133
|
+
expect(subject['adapter']).to eq 'postgresql'
|
134
|
+
expect(subject['database']).to eq 'blog'
|
135
|
+
expect(subject['username']).to eq 'root'
|
136
|
+
expect(subject['password']).to eq 'pass'
|
137
|
+
expect(subject['port']).to eq 5432
|
138
|
+
}
|
139
|
+
end
|
140
|
+
|
128
141
|
context 'when passed DATABASE_URL from ENV' do
|
129
142
|
let(:config) { 'env:DATABASE_URL' }
|
130
143
|
let(:env) { 'development' }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridgepole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -442,7 +442,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
442
442
|
- !ruby/object:Gem::Version
|
443
443
|
version: '0'
|
444
444
|
requirements: []
|
445
|
-
rubygems_version: 3.0.
|
445
|
+
rubygems_version: 3.0.4
|
446
446
|
signing_key:
|
447
447
|
specification_version: 4
|
448
448
|
summary: Ridgepole is a tool to manage DB schema.
|