1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases
schneems 5b96027ef6 Allow "url" sub key in database.yml configuration
Currently a developer can pass in a YAML configuration that fully specifies connection information:

```
production:
  database: triage_production
  adapter: password
  pool: 5
```

They can also pass in a string that specifies a connection URL directly to an environment key:

```
production: postgresql://localhost/foo
```

This PR allows the use of both a connection url and specifying connection attributes via YAML through the use of the "url" sub key:

```
production:
  url: postgresql://localhost/foo
  pool: 3
```

This will allow developers to inherit Active Record options such as `pool` from `&defaults` and still use a secure connection url such as `<%= ENV['DATABASE_URL'] %>`. The URL is expanded into a hash and then merged back into the YAML hash. If there are any conflicts, the values from the connection URL are preferred. 

Talked this over with @josevalim
2013-12-30 12:21:14 -05:00
..
adapters used user-defined configurations for running tests that might depend on user's system configuration 2013-12-29 13:57:52 +05:30
associations On destroying do not touch destroyed belongs to association. 2013-12-23 15:44:48 +02:00
attribute_methods
coders
connection_adapters
connection_specification Allow "url" sub key in database.yml configuration 2013-12-30 12:21:14 -05:00
fixture_set Introduce a context for rendering fixtures ERB. 2013-12-03 02:52:26 -05:00
migration Change all MiniTest to Minitest since, MiniTest namespace has been renamed to Minitest 2013-12-18 14:39:50 +05:30
relation raise ArgumentError exception if Model.where.not is called with nil argument 2013-12-30 01:53:02 +05:30
scoping Fix bad usage of #select with hash 2013-12-03 10:45:40 -02:00
tasks Fix failure introduced from #13488 2013-12-25 18:45:26 -05:00
validations Merge pull request #13061 from laurocaetano/fix-uniqueness-validation-for-aliased-attribute 2013-11-26 20:54:19 -02:00
adapter_test.rb using symbol instead of string in establish_connection 2013-12-25 15:24:25 +05:30
aggregations_test.rb
ar_schema_test.rb
associations_test.rb
attribute_methods_test.rb
autosave_association_test.rb
base_test.rb test case for #limit added - picking latest value from limit 2013-12-17 03:50:34 +05:30
batches_test.rb
binary_test.rb
bind_parameter_test.rb log bind variables after they were type casted. 2013-11-09 11:23:34 +01:00
calculations_test.rb Fix type cast on group sum with custom expression 2013-12-10 14:30:12 +02:00
callbacks_test.rb
clone_test.rb
column_alias_test.rb
column_definition_test.rb
column_test.rb
connection_management_test.rb Don't skip tests if we don't need to. 2013-11-08 13:59:07 -02:00
connection_pool_test.rb
core_test.rb
counter_cache_test.rb
custom_locking_test.rb
database_statements_test.rb
date_time_test.rb
defaults_test.rb
dirty_test.rb Add integration test for #12459 2013-12-05 21:32:51 -02:00
disconnected_test.rb Don't skip tests if we don't need to. 2013-11-08 13:59:07 -02:00
dup_test.rb
enum_test.rb bring back constant to expose the enum mapping as HWIA. 2013-11-06 15:27:33 +01:00
explain_subscriber_test.rb
explain_test.rb
finder_respond_to_test.rb
finder_test.rb Fix mysql to support duplicated column names 2013-12-13 11:55:13 -02:00
fixtures_test.rb Fix bad test order dependency between LoadAllFixturesTest#test_all_there and FoxyFixturesTest#test_ignores_belongs_to_symbols_if_association_and_foreign_key_are_named_the_same 2013-11-16 00:22:05 -08:00
forbidden_attributes_protection_test.rb
habtm_destroy_order_test.rb
helper.rb Disable available locales checks to avoid warnings running the tests 2013-12-17 09:05:41 -02:00
hot_compatibility_test.rb
i18n_test.rb
inheritance_test.rb
integration_test.rb set encoding UTF-8 for accepting multibyte character 2013-12-19 11:00:38 +05:30
invalid_connection_test.rb Changed message for Model.inspect 2013-11-09 20:57:09 +01:00
invalid_date_test.rb
invertible_migration_test.rb
json_serialization_test.rb
locking_test.rb
log_subscriber_test.rb Don't skip tests if we don't need to. 2013-11-08 13:59:07 -02:00
migration_test.rb support creating temporary tables from queries 2013-12-14 07:07:10 -07:00
migrator_test.rb Revert "Used Yield instead of block.call" -- this causes all of atom_feed_helper_test.rb to fail with "SystemStackError: stack level too deep". 2013-11-14 15:31:27 -08:00
mixin_test.rb replace custom Time stubbing with travel and travel_to. 2013-11-21 17:29:53 +01:00
modules_test.rb
multiparameter_attributes_test.rb Don't skip tests if we don't need to. 2013-11-08 13:59:07 -02:00
multiple_db_test.rb Deprecate use of string in establish_connection as connection lookup 2013-12-24 10:18:54 +01:00
nested_attributes_test.rb
nested_attributes_with_callbacks_test.rb
persistence_test.rb Copy changed_attributes across to newly become'd records 2013-12-27 15:54:06 +00:00
pooled_connections_test.rb
primary_keys_test.rb Remove more skip 2013-11-08 14:18:54 -02:00
query_cache_test.rb Currently, we clear query_cache in cache block finish, even if we may already have cache true. 2013-12-03 17:48:14 +05:30
quoting_test.rb
readonly_test.rb
reaper_test.rb
reflection_test.rb
relation_test.rb
relations_test.rb fix default select when from is used 2013-12-19 14:40:13 -07:00
reload_models_test.rb
result_test.rb
sanitize_test.rb
schema_dumper_test.rb Don't skip tests if we don't need to. 2013-11-08 13:59:07 -02:00
serialization_test.rb
serialized_attribute_test.rb
statement_cache_test.rb
store_test.rb
test_case.rb Do not count query for all_constraints and all_tab_cols in Oracle 2013-11-18 11:59:36 +09:00
timestamp_test.rb polymorphic belongs_to association with touch: true updates old record correctly 2013-12-05 16:03:07 +01:00
transaction_callbacks_test.rb
transaction_isolation_test.rb Deprecate use of string in establish_connection as connection lookup 2013-12-24 10:18:54 +01:00
transactions_test.rb Ensure that a column added in a test is being removed after all 2013-11-13 19:21:40 +09:00
unconnected_test.rb
validations_repair_helper.rb
validations_test.rb Prefer assert_raise instead of flunk + rescue to test for exceptions 2013-12-19 09:20:51 -02:00
xml_serialization_test.rb
yaml_serialization_test.rb Add test for ActiveRecord::Relation YAML serialization, for #5303 issue 2013-11-03 21:35:44 +07:00