diff --git a/History.rdoc b/History.rdoc index 19d79d6..88b9f68 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,12 +3,14 @@ == Changes * Remove unnecessary dependency on database_cleaner-mongo from database_cleaner-mongoid: @botandrose * Enable the :cache_tables option for the mongo truncation strategy, and default to true: https://github.com/DatabaseCleaner/database_cleaner/pull/646" + * Add new :db orm configuration key, for consistency with #db and #db=. https://github.com/DatabaseCleaner/database_cleaner/pull/649 == Deprecations * Deprecate all #orm= setter methods: https://github.com/DatabaseCleaner/database_cleaner/pull/643 * Deprecate non-functional :reset_ids option in ActiveRecord truncation strategy: https://github.com/DatabaseCleaner/database_cleaner/issues/559 * Deprecate mongo truncation's `:cache_tables => true` option in favor of `false`, to prep for caching removal in v2.0: https://github.com/DatabaseCleaner/database_cleaner/pull/646" * Deprecate redis truncation's #url method in favor of #db: @botandrose + * Deprecate :connection and :model configuration options in favor of :db for consistency: https://github.com/DatabaseCleaner/database_cleaner/pull/650 == Bugfixes diff --git a/README.markdown b/README.markdown index 568392f..c172187 100644 --- a/README.markdown +++ b/README.markdown @@ -306,10 +306,10 @@ DatabaseCleaner[:active_record].strategy = :transaction DatabaseCleaner[:mongo_mapper].strategy = :truncation # How to specify particular connections -DatabaseCleaner[:active_record, { :connection => :two }] +DatabaseCleaner[:active_record, { :db => :two }] # You may also pass in the model directly: -DatabaseCleaner[:active_record, { :model => ModelWithDifferentConnection }] +DatabaseCleaner[:active_record, { :db => ModelWithDifferentConnection }] ``` Usage beyond that remains the same with `DatabaseCleaner.start` calling any setup on the different configured connections, and `DatabaseCleaner.clean` executing afterwards. diff --git a/adapters/database_cleaner-mongoid/README.md b/adapters/database_cleaner-mongoid/README.md index 0937dfc..369c09d 100644 --- a/adapters/database_cleaner-mongoid/README.md +++ b/adapters/database_cleaner-mongoid/README.md @@ -47,7 +47,7 @@ end
DatabaseCleaner[:mongoid]
DatabaseCleaner[:mongoid, {:connection => :db_name}]
DatabaseCleaner[:mongoid, {:db => :db_name}]
DatabaseCleaner[:neo4j]
DatabaseCleaner[:neo4j, connection: {type: :server_db, path: 'http://localhost:7475'}].
DatabaseCleaner[:neo4j, db: {type: :server_db, path: 'http://localhost:7475'}].
DatabaseCleaner[:sequel]
DatabaseCleaner[:sequel, {:connection => Sequel.connect(uri)}]
DatabaseCleaner[:sequel, {:db => Sequel.connect(uri)}]