omniauth-identity
omniauth-identity copied to clipboard
Update mongoid requirement from ~> 7 to ~> 9
Updates the requirements on mongoid to permit the latest version.
Release notes
Sourced from mongoid's releases.
Mongoid 9.0 is a new major update to the Mongoid ODM. It includes many bug fixes, updates, improvements, and new features.
Significant new features include the following:
- You can now create and manage Atlas search indexes directly from Mongoid, by specifying your search index definitions directly on the relevant models. (MONGOID-5601)
- You can now declare a transaction with a block, using syntax that should be familiar to Rails programmers. (You must still be using a MongoDB topology that supports transactions, like a replica-set or sharded topology.) Along with this new syntax, support has also been added for
after_commit
andafter_rollback
callbacks. (MONGOID-5530, MONGOID-5531 and MONGOID-5708)- Around callbacks on embedded documents are now disabled by default, for performance reasons. If a parent document has a large number (hundreds) of embedded documents, it is possible for the stack to be exhausted while processing "around" callbacks for those embedded documents. If you need around callbacks for your embedded documents, and you are confident that you will not have large numbers of embedded documents in a single parent, you can enable around callbacks with the
Mongoid.around_embedded_document_callbacks
configuration option. (MONGOID-5658)- A new serializer has been added to allow
BSON::ObjectId
instances to be serialized and deserialized by ActiveJob. (MONGOID-5611)- If you specify custom storage options when loading a model (e.g. overriding its collection name, database name, or the named client), you will not need to explicitly specify those same options when saving the model. The model will remember the storage options that were active when it was loaded. (MONGOID-5472)
- Support for "sandbox mode" in the Rails console has been added. As long as you are using a supported topology (replica-set or sharded, for example), when you specify
--sandbox
when starting the Rails console, your console session will be wrapped in a transaction. (MONGOID-4901)- You can now enjoy Client-Side Field Level Encryption (CSFLE) in Mongoid with supported database server versions. Declare your CSFLE schemas in your documents, configure your encryption in
mongoid.yml
orconfig.rb
, and generate new data keys viarake
. (MONGOID-5585, MONGOID-5587, MONGOID-5589, MONGOID-5592, MONGOID-5613, MONGOID-5615.)Many other changes are included as well, including the following:
- Support for Rails 2.6 and Rails 5 have been dropped. (MONGOID-5574)
- Support has been added for JRuby 9.4, and BSON 5. (MONGOID-5575, MONGOID-5739, RUBY-2846)
- Added
Mongoid.reconnect_clients
in conjunction with improving documentation about working with forking webservers. (MONGOID-5758)- Saving a model in a session other than the one that loaded it will now result in a warning message (as this is generally considered a bug.) (MONGOID-5552)
- Eager loading now works with embedded associations. These associations cannot actually be eager loaded, but this allows you to chain eager loading through embedded associations, for example with has-and-belongs-to-many associations. (MONGOID-5052)
- For embedded associations, the default is now
touch: true
. This means that when you update an embedded document, its parent is automatically touched (or saved, with the timestamps updated) as well. (MONGOID-5016)- You can now prevent Mongoid from type-casting a given value in a query by wrapping it with
Mongoid::RawValue
. This makes it easier to deal with legacy data that does not conform to an expected type. (MONGOID-5408)- The Rails generator for Mongoid (
rails g mongoid:config
) now additionally generates a defaultconfig/initializers/mongoid.rb
. (MONGOID-5439)- When calling
#touch
on a model, Mongoid now clears the 'changed' state of the model. Previously,#touch
left the model in a 'changed' state, even though it had been persisted by the touch operation. (MONGOID-5504)- Mongoid's
db:mongoid:create_indexes
rake task was not always loading all models before creating the indexes, resulting in some missing indexes. This is now fixed. (MONGOID-5547)- Added support for
$min
,$max
, and$mul
operators (viaset_min
,set_max
, andmul
), as well as$setOnInsert
when doing an upsert (via a new:set_on_insert
option to#upsert
). (MONGOID-5442)- A timezone configured in your app (via
Time.zone=
) will now be used when typecasting dates for time-valued fields. (MONGOID-5488)- Typecasting strings for numeric fields now correctly converts the strings into
BigDecimal
values. (MONGOID-5484)- Field aliases are now honored in index specifications. (MONGOID-5314)
- Fixed an issue where an empty list in a HABTM association needed special handling (instead of blindly using an empty list with
$in
). (MONGOID-5164)- Attempting to call
estimated_count
when a default scope is active on a collection now raises a dedicated exception (Mongoid::Errors::InvalidEstimatedCountScoping
) (MONGOID-4960)- Mongoid now raises
Mongoid::Errors:AttributeNotLoaded
when a program attempts to access a field that is defined on the model, but which was excluded by the query's projection. Previously,ActiveModel::MissingAttributeError
was raised in this situation. (MONGOID-5467)- When assigning an array of Hashes to a field, the hashes are always converted to a
BSON::Document
. This makes the behavior consistent with how those fields are loaded from the database. (MONGOID-5410)Additionally, a number of methods that were monkey-patched onto core modules have been deprecated, including the following:
Array#multi_arged?
(MONGOID-5669)BigDecimal#__to_inc__
(MONGOID-5662)Hash#__consolidate__
(MONGOID-5654)Hash#__mongoid_unsatisfiable_criteria?
(MONGOID-5671)Hash#__nested__
(MONGOID-5653)Hash#delete_id
(MONGOID-5670)Hash#extract_id
(MONGOID-5670)Hash#to_criteria
(MONGOID-5677)Integer#unconvertable_to_bson?
Object#__find_args__
(MONGOID-5665)Object#__mongoize_fk__
(MONGOID-5675)Object#__setter__
(MONGOID-5664)Object#__sortable__
(MONGOID-5663)Object#__to_inc__
(MONGOID-5662)Object#blank_criteria?
(MONGOID-5671)Object#do_or_do_not
(MONGOID-5673)
... (truncated)
Changelog
Sourced from mongoid's changelog.
Overview
For instructions on upgrading to newer versions, visit mongoid.org.
As of version 5.0.2, please refer to the github releases for change logs.
5.0.1
Resolved Issues
- MONGOID-3020 Test added to show it's no longer an issue.
- MONGOID-3025 Test added to show it's no longer an issue.
- MONGOID-3061 No longer an issue.
- MONGOID-3073 Test added to show it's no longer an issue.
- MONGOID-3085 Test added to show it's no longer an issue.
- MONGOID-3101 No longer an issue.
- MONGOID-3160 No longer an issue.
- MONGOID-3176 No longer an issue.
- MONGOID-3214 Test added to show it's no longer an issue.
- MONGOID-3296 Add update callback for counter_cache.
- MONGOID-3326 Test added to show it's no longer an issue.
- MONGOID-3361 No longer an issue.
- MONGOID-3365 Test added to show it's no longer an issue.
- MONGOID-3402 Apply persistence options to parent.
- MONGOID-3524 No longer an issue.
- MONGOID-3529 Test exists already showing it's not an issue.
- MONGOID-3543 Test exists already showing it's not an issue.
- MONGOID-3611 Test added to show it's no longer an issue.
- MONGOID-3650 No longer an issue.
- MONGOID-3826, MONGOID-4109 Fix Timelessness leaks.
- MONGOID-3946 Test added to show it's no longer an issue.
- MONGOID-3969 Test added to show it's no longer an issue.
- MONGOID-3971 Not an issue.
- MONGOID-3979 Not an issue, tests exist already.
- MONGOID-3985 Not an issue.
- MONGOID-4078 Behavior is intended.
- MONGOID-4079 Not an issue.
- MONGOID-4088 Account for sub-document dot notation with #pluck results.
- MONGOID-4098 Fixed by a change to the Ruby driver. See RUBY-1029.
- MONGOID-4101 Not an issue.
- MONGOID-4106 Not an issue.
- MONGOID-4110 Not an issue.
- MONGOID-4119 Ensure that criteria selector becomes pipeline operator value.
- MONGOID-4121 Not an issue.
- MONGOID-4123 Fixed as a result of MONGOID-4159.
- MONGOID-4125 Make sure none scopes referenced in procs are applied.
- MONGOID-4132 Not an issue.
- MONGOID-4157 Fixed by version 2.1.2 of the Ruby driver.
- MONGOID-4162 Adapt index option mappings to new driver. (
@Nielsomat
)
... (truncated)
Commits
88f4b1a
bump version number(s) (#5813)ff4c317
Add pretty print support (#5810)a35d481
MONGOID-5760 Update feature flags defaults and remove deprecations (#5811)aef7114
MONGOID-5758: Add Mongoid.reconnect_clients and improve forking webserver doc...ca3e02e
Remove deprecated Document#as_json hack (#5755)3963eba
MONGOID-5754 Making sure Mongoid works right with latest driver (#5806)7d752dc
docs: fix typos in comment (#5807)85de452
Add code of conduct (#5804)5bdb998
DOCSP-37326: fix formatting (#5799)c4fed24
MONGOID-5739 Support BSON 5 (#5801)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)