Merge pull request #13569 from schneems/schneems/default-url-sub-key

Move default production database to URL sub key
This commit is contained in:
Rafael Mendonça França 2014-01-01 17:16:56 -08:00
commit 55dc36b227
11 changed files with 26 additions and 12 deletions

View File

@ -25,4 +25,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -63,4 +63,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -55,4 +55,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -44,4 +44,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -20,4 +20,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -38,4 +38,5 @@ test:
# Example:
# mysql2://myuser:mypass@localhost/somedatabase
#
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -34,4 +34,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -65,4 +65,5 @@ test:
# Example:
# postgres://myuser:mypass@localhost/somedatabase
#
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -24,6 +24,7 @@ test:
# instead read the configuration from the environment.
#
# Example:
# sqlite3://myuser:mypass@localhost/somedatabase
# sqlite3://myuser:mypass@localhost/full/path/to/somedatabase
#
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -44,4 +44,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["RAILS_DATABASE_URL"] %>
production:
url: <%%= ENV["RAILS_DATABASE_URL"] %>

View File

@ -24,7 +24,11 @@ module ApplicationTests
# ensure it's using the DATABASE_URL
FileUtils.rm_rf("#{app_path}/config/database.yml")
File.open("#{app_path}/config/database.yml", 'w') do |f|
f << {ENV['RAILS_ENV'] => %Q{<%= ENV['RAILS_DATABASE_URL'] %>}}.to_yaml
yaml = <<-YAML.strip_heredoc
#{ENV['RAILS_ENV']}:
url: <%= ENV['RAILS_DATABASE_URL'] %>
YAML
f << yaml
end
end