1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/test/commands
eileencodes ce9b197cc9 Use symbols everywhere for database configurations
Previously in some places we used symbol keys, and in some places we used
string keys. That made it pretty confusing to figure out in a particular
place what type of configuration object you were working with.

Now internally, all configuration hashes are keyed by symbols and
converted to such on the way in.

A few exceptions:

- `DatabaseConfigurations#to_h` still returns strings for backward compatibility
- Same for `legacy_hash`
- `default_hash` previously could return strings, but the associated
  comment mentions it returns symbol-key `Hash` and now it always does

Because this is a change in behavior, a few method renames have happened:

- `DatabaseConfig#config` is now `DatabaseConfig#configuration_hash` and returns a symbol-key `Hash`
- `ConnectionSpecification#config` is now `ConnectionSpecification#underlying_configuration_hash` and returns the `Hash` of the underlying `DatabaseConfig`
- `DatabaseConfig#config` was added back, returns `String`-keys for backward compatibility, and is deprecated in favor of the new `configuration_hash`

Co-authored-by: eileencodes <eileencodes@gmail.com>
2019-09-13 08:53:22 -04:00
..
console_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
credentials_test.rb Revise flow to what was described in 03e44f9 2019-08-04 02:19:55 +02:00
db_system_change_test.rb Revise wording on invalid database error messages 2019-01-09 14:23:29 -05:00
dbconsole_test.rb Use symbols everywhere for database configurations 2019-09-13 08:53:22 -04:00
dev_test.rb Adds Rails:Command for dev:cache that has the same behaviour as the rake task 2018-08-13 11:27:01 -04:00
encrypted_test.rb Recommend use of rails over bin/rails 2018-07-06 22:46:35 +02:00
initializers_test.rb Add -e/--environment option to rails initializers 2019-03-16 10:02:06 +09:00
notes_test.rb Adds register_tags 2019-04-12 08:55:42 +02:00
routes_test.rb Allow tests to run without a TTY 2019-08-14 10:52:21 -07:00
secrets_test.rb Deprecate encrypted secrets in favor of credentials. 2017-11-12 17:50:09 +01:00
server_test.rb Allow using env var to specify pidfile 2019-06-19 14:06:38 +01:00