rails-default-database 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails-default-database.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d72d1d4ef93a5c98e0f741089c29b4195de1eb28
|
4
|
+
data.tar.gz: 5dee966e6266ff990a478d699bb7e5bf94946ca1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9172ce466d38ec1e53d32ec962aa254717966a54c774c609f41268910fd25f35ca1f482eef20c5640e2690ff2161ee338d8a82ae6c59bb614d76c512cedd49be
|
7
|
+
data.tar.gz: b44276ce8e87926821f15ca9f7486ee12db9a2d70c4ef28477bfbd58958b7fe76a30bae8529238cf73676806622be21b6e0d1b8284e973ac24eb7bf5b3f1d294
|
@@ -17,7 +17,7 @@ Rails::Application::Configuration.class_eval do
|
|
17
17
|
if url = ENV['DATABASE_URL'].presence
|
18
18
|
(environments_for_database_configuration | config.keys).each do |k|
|
19
19
|
config[k] = {'url' => url.gsub('%s', k)}
|
20
|
-
if k == 'test'
|
20
|
+
if k == 'test' && ENV['TEST_DATABASE_URL'] != 'default'
|
21
21
|
config[k]['url'] =
|
22
22
|
config[k]['url'].sub(/(?:_(?:#{environments_for_database_configuration.join('|')})(?:\d*|%i))?(?=\?|$)/, "_test")
|
23
23
|
end
|
@@ -26,8 +26,9 @@ Rails::Application::Configuration.class_eval do
|
|
26
26
|
else
|
27
27
|
default_database_configuration.merge(config)
|
28
28
|
end.tap do |c|
|
29
|
-
|
30
|
-
|
29
|
+
url = ENV['TEST_DATABASE_URL'].presence
|
30
|
+
if url && url != 'default'
|
31
|
+
c['test'] = {'url' => url}
|
31
32
|
end
|
32
33
|
%w(url database).each do |key|
|
33
34
|
if value = c['test'] && c['test'][key]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-default-database
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pope
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|