1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/application
Eileen Uchitelle 6b5df90fb5 Drop load_database_yaml and fix test
We originally did the whole `load_database_yaml` thing because this test
wasn't cooperating and we needed to finish the namespaced rake tasks for
multiple databases.

However, it turns out that YAML can't eval ERB if you don't tell it it's
ERB so you get Pysch parse errors if you're using multi-line ERB or
ERB with conditionals. It's a hot mess.

After trying a few things and thinking it over we decided that it wasn't
worth bandaiding over, the test needed to be improved. The test was
added in #31135 to test that the env is loaded in these tasks. But it
was blowing up because we were trying to read a database name out of the
configuration - however that's not the purpose of this change. We want
to read environment files in the rake tasks, but not in the config
file.

In this PR we changed the test to test what the PR was actually fixing.
We've also deleted the `load_database_yaml` because it caused more
problems than it was worth. This should fix the issues described in
https://github.com/rails/rails/pull/32274#issuecomment-384161057. We
also had these problems at GitHub.

Co-authored-by: alimi <aibrahim2k2@gmail.com>
2018-08-29 10:26:44 -04:00
..
bootstrap.rb [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
configuration.rb Drop load_database_yaml and fix test 2018-08-29 10:26:44 -04:00
default_middleware_stack.rb Multipart file uploads are very rare in API only apps so don't include Rack::TemfileReaper in default middleware stack for API only apps 2018-02-17 15:52:41 -05:00
finisher.rb Only execute route updater once on app boot 2018-06-19 16:25:39 -05:00
routes_reloader.rb Only execute route updater once on app boot 2018-06-19 16:25:39 -05:00