[HELP] DatabaseCleaner 1.8.0.beta release, prep for 2.0.0!

28 views
Skip to first unread message

Micah Geisel

unread,
Jan 21, 2020, 2:08:02 PM1/21/20
to database_cleaner
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!

Micah Geisel

unread,
Jan 29, 2020, 6:55:27 PM1/29/20
to database_cleaner
All right! With 660 downloads and zero complaints, I'm feeling pretty good about v1.8.0.beta, so I'm going to rerelease it as v1.8.0, presently. A v2.0.0.beta release will follow very shortly after that!

A big thank you to everyone who tried out the beta!
Reply all
Reply to author
Forward
0 new messages