From 9749e0efbfc22f8b0525357024ec362b01b80209 Mon Sep 17 00:00:00 2001 From: schneems Date: Wed, 1 Jan 2014 14:21:56 -0500 Subject: Move default production database to URL sub key By using the URL sub key in the `database.yml` by default we are exposing the ability to set other attributes such as `pool` or `reap_frequency` without need of modifying the URL to contain non-connection specific information. --- railties/test/application/rake/dbs_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'railties/test/application/rake') diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index 0f4f01df1b..9868707570 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -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 -- cgit v1.2.3