Hello, everyone, and Happy New Year!
We have just released a preview version of DatabaseCleaner: version 1.8.0.beta. I'm writing about this here, because this is a rather big deal for project's evolution, and we need your help to make sure the transition is as smooth as possible!
The plan is to make two releases in the very near future:
1.8.0: a transition release focused on smoothing the upgrade to 2.0.0
2.0.0: a major release only supporting ActiveRecord, while extracting all other supported ORMs into adapter gems (like Mongoid, Sequel, and Redis, to name a few)
The main takeaway here is this:
If you only use DatabaseCleaner with ActiveRecord, you should be able to upgrade to 1.8.0 with no deprecation warnings, and then later to 2.0.0 with no changes whatsoever.
If you use DatabaseCleaner with other ORM(s), then when you upgrade to 1.8.0 and run your tests, you will receive a deprecation warning instructing you to install the DatabaseCleaner adapter gem for that particular ORM. For example, if you use Sequel, you should see the following:
The Sequel adapter has been extracted to its own gem: database_cleaner-sequel, and will be removed from database_cleaner in 2.0. To silence this message, please replace `gem "database_cleaner"` with `gem "database_cleaner-sequel"` in your Gemfile.
After switching your Gemfile over to the new adapter gem and running bundle install, you should be good to go, and ready for DatabaseCleaner 2.0 with no further changes!
If you are using DatabaseCleaner with multiple ORMs, then you will need to install an adapter gem for each ORM.
Finally, note that in 2.0, the database_cleaner gem will simply be an alias for the database_cleaner-active_record adapter gem. This is to ensure that the majority of folks can upgrade to 2.0 without any changes whatsoever.
Finally, help is wanted! Would you all please try to upgrade your apps to use DatabaseCleaner version 1.8.0.beta, and let us know if you have any issues? You can do this by specifying the version in Gemfile like:
gem "database_cleaner", "1.8.0.beta"
or
gem "database_cleaner-sequel", "1.8.0.beta"
and so on.
Thank you, everyone, and happy database cleaning!