Permalink
Browse files

Use DATABASE_URL by default

See #13463 (comment) for full conversation.
  • Loading branch information...
1 parent 96288e8 commit f642b18c0e05359fe2b0098108741963e6b04328 @schneems schneems committed Jan 2, 2014
@@ -26,4 +26,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -64,4 +64,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -56,4 +56,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -28,4 +28,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production: <%%= ENV["DATABASE_URL"] %>
@@ -45,4 +45,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -21,4 +21,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -39,4 +39,4 @@ test:
# mysql2://myuser:mypass@localhost/somedatabase
#
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -35,4 +35,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -66,4 +66,4 @@ test:
# postgres://myuser:mypass@localhost/somedatabase
#
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -27,4 +27,4 @@ test:
# sqlite3://myuser:mypass@localhost/full/path/to/somedatabase
#
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -45,4 +45,4 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production:
- url: <%%= ENV["RAILS_DATABASE_URL"] %>
+ url: <%%= ENV["DATABASE_URL"] %>
@@ -21,16 +21,9 @@ def database_url_db_name
end
def set_database_url
- ENV['RAILS_DATABASE_URL'] = File.join("sqlite3://:@localhost", database_url_db_name)
+ ENV['DATABASE_URL'] = File.join("sqlite3://:@localhost", database_url_db_name)
# 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|
- yaml = <<-YAML.strip_heredoc
- #{ENV['RAILS_ENV']}:
- url: <%= ENV['RAILS_DATABASE_URL'] %>
- YAML
- f << yaml
- end
end
def expected

0 comments on commit f642b18

Please sign in to comment.