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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f90d52092727be87d95e3bc549871a60f3d1058e
4
- data.tar.gz: 9253ba1b2ecfa937e25c9292a6a1285173080c1c
3
+ metadata.gz: d72d1d4ef93a5c98e0f741089c29b4195de1eb28
4
+ data.tar.gz: 5dee966e6266ff990a478d699bb7e5bf94946ca1
5
5
  SHA512:
6
- metadata.gz: 56c33a78428a9049739153dc5e54116be58d33cf079d237fa2b9005f6df6ff51d0a077fbdc92d80a2004d80edf2a8e2bb76cd9f4a0624286521f96bebf4cab54
7
- data.tar.gz: 9fdd61a51444933c5a76f63a6073658124b05d4be949847495edfd159f79ab60ff15b6c56a1e9bebf6945554ab369ca7e616ffc9772fcf3cd0efa0c2e6d1dd1e
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
- if ENV['TEST_DATABASE_URL'].present?
30
- c['test'] = {'url' => ENV['TEST_DATABASE_URL']}
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.0
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-03-29 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties