ridgepole 0.7.6 → 0.7.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2271671a770bf65b2503ba193108875f5892f697e37853097a0eb105024276c4
4
- data.tar.gz: fb6b7f6eb304dabff71858c5029cfe92ce565c7e28612be4319b53bca669c706
3
+ metadata.gz: ccc0e3aba24f15cbe231cda77afbb12ee6b76578a569add69dc59597a0bdfeda
4
+ data.tar.gz: a24d8667ffcef19f3b520479df779795781a6fbf6d49926abf4396af21f1cfd4
5
5
  SHA512:
6
- metadata.gz: 1f46efedeb45729023425090ee220c2c18ffd447ef34450d17b7f70b5c374cdaf830a9996034d1104be0f5cb8ac14aaf943edc8e0d1a936c8e9ac62fb28222b8
7
- data.tar.gz: d4c338561c39f60407db3e82984f021aefe40b728bd168de046e4cd56020dfa95a97ef0a2a9d3949c2fc6cb6d2af03e10dd41b97e291b9c6e1dc397e10db9051
6
+ metadata.gz: 6f90360bac6042f0715dae4ba8292461d708c0155bfa200125dea16a945908247d99db8031f20ef88499924678b4e55762609522e0a62e44e7ddd26ee327be12
7
+ data.tar.gz: 4f29137ad9cc8a81f6ccb456d9137567080cb7a1dcc5ef1ffdad911a66bf82deb3c0c116408d317d93ba1e1ad4c235e3320d11cff420c348fe9635579bb074cd
data/README.md CHANGED
@@ -97,6 +97,8 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
97
97
  * `>= 0.7.6`
98
98
  * Fix database url check ([pull#266](https://github.com/winebarrel/ridgepole/pull/266))
99
99
  * Add ignore option ([pull#267](https://github.com/winebarrel/ridgepole/pull/267))
100
+ * `>= 0.7.7`
101
+ * Support URI query string ([pull#273](https://github.com/winebarrel/ridgepole/pull/273))
100
102
  </details>
101
103
 
102
104
  ## Installation
@@ -117,7 +119,7 @@ Or install it yourself as:
117
119
 
118
120
  see https://github.com/winebarrel/ridgepole/releases.
119
121
 
120
- ### Install from rpm
122
+ ### Install from deb
121
123
 
122
124
  ```sh
123
125
  sudo dpkg -i ridgepole_x.x.x+xxx-x_amd64.deb
@@ -60,14 +60,21 @@ module Ridgepole
60
60
  end
61
61
  end
62
62
 
63
- {
63
+ query_hash =
64
+ if uri.query
65
+ uri.query.split('&').map { |pair| pair.split('=') }.to_h
66
+ else
67
+ {}
68
+ end
69
+
70
+ query_hash.merge(
64
71
  'adapter' => uri.scheme,
65
72
  'username' => CGI.unescape(uri.user),
66
73
  'password' => uri.password ? CGI.unescape(uri.password) : nil,
67
74
  'host' => uri.host,
68
75
  'port' => uri.port,
69
- 'database' => CGI.unescape(uri.path.sub(%r{\A/}, '')),
70
- }
76
+ 'database' => CGI.unescape(uri.path.sub(%r{\A/}, ''))
77
+ )
71
78
  end
72
79
  end
73
80
  end
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.7.6'.freeze
2
+ VERSION = '0.7.7'.freeze
3
3
  end
@@ -109,7 +109,7 @@ describe Ridgepole::Config do
109
109
  end
110
110
 
111
111
  context 'when passed DATABASE_URL' do
112
- let(:config) { 'mysql2://root:pass@127.0.0.1:3307/blog' }
112
+ let(:config) { 'mysql2://root:pass@127.0.0.1:3307/blog?pool=5&reaping_frequency=2' }
113
113
  let(:env) { 'development' }
114
114
 
115
115
  it {
@@ -118,6 +118,8 @@ describe Ridgepole::Config do
118
118
  expect(subject['username']).to eq 'root'
119
119
  expect(subject['password']).to eq 'pass'
120
120
  expect(subject['port']).to eq 3307
121
+ expect(subject['pool']).to eq '5'
122
+ expect(subject['reaping_frequency']).to eq '2'
121
123
  }
122
124
  end
123
125
 
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.7.6
4
+ version: 0.7.7
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-01-12 00:00:00.000000000 Z
11
+ date: 2019-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord