Bring back Mongoid official support #5568
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Devise hasn't been tested with Mongoid since Rails version 5, only 4.x was still running those tests.
This enables the tests again on all currently supported Rails versions, with their respective mongoid supported versions. There were a couple of minor tweaks to make it happen, namely:
purge!
which appears to work fine. We used to callMongoid.purge!
but that changed in Fix mongoid test failed problem #4686.I also had to lock the sqlite3 gem on Rails 6 versions to 1.5.x, due to it dropping support to Ruby 2.6 on v1.6+ now, and those Rails 6 versions need to support that Ruby version.
Finally, I locked mongoid to v7.5+ but not allowing v8+ yet, there seems to be some change to dirty attributes that I need to look into which is making a handful of tests fail. For now, this should hopefully get us to green as step 1.I got Mongoid v8.0 working with a couple of tweaks to dirty tracking, hopefully that's all that's needed.