Skip to content

Instantly share code, notes, and snippets.

@ixti
Last active September 3, 2019 13:57
Show Gist options
  • Save ixti/9631df5381a0426d1151d81a4c496db8 to your computer and use it in GitHub Desktop.
Save ixti/9631df5381a0426d1151d81a4c496db8 to your computer and use it in GitHub Desktop.
Build all in one changelog from fucked-up mongoid releases on GitHub
# frozen_string_literal: true
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "http"
end
HTTP.persistent("https://api.github.com") do |http|
%w[
7.0.4
7.0.3
7.0.2
7.0.1
7.0.0
7.0.0.beta
6.4.4
6.4.2
6.4.1
6.4.0
6.3.0
6.2.1
6.2.0
6.1.1
6.1.0
6.1.0.rc0
6.0.3
6.0.2
6.0.1
6.0.0
6.0.0.rc0
6.0.0.beta
5.4.0
].reverse_each do |version|
data = http.get("https://api.github.com/repos/mongodb/mongoid/releases/tags/v#{version}").parse(:json)
puts <<~MARKDOWN
## v#{version}
*Release Notes: #{data.fetch 'html_url'}*
MARKDOWN
puts "\n\n"
puts data.fetch("body").delete("\r")
puts "\n\n"
end
end
@ixti
Copy link
Author

ixti commented Sep 3, 2019

Mongoid Changelog

v5.4.0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v5.4.0

This minor release has the following changes:

  • Drop support for MongoDB server version 2.4
  • Require ruby driver version >= 2.5.1
  • MONGOID-4499 Support $push + $each instead of $pushAll. (@TreyE)

v6.0.0.beta

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta

This is a beta release of Mongoid 6.0, which supports Rails 5.

Mongoid 6.0 has a number of bug fixes, API changes, and improvements:

Bug fixes

  • MONGOID-3243 #find_or_create_by does not respect dynamic collection setting.
  • MONGOID-3551 Fix adding nested documents to nested relation using accepts_nested_attributes_for
  • MONGOID-4228 Fix using $not, $and, $or on embedded document queries. (@jonhyman)
  • MONGOID-4241 Only update timestamp when calling #touch, regardless of what other changes are pending. (@connerfritz)
  • MONGOID-4272 Fix replacing relation when it is already set as an instance variable.

API and behavior changes

Improvements and features

  • MONGOID-4012 Add max_time_ms as an option on Criteria.
  • MONGOID-4261, MONGOID-3887 Assign hash attributes in #first_or_* methods on Criteria.
  • MONGOID-3074 Consider time zones when returning distinct query results
  • MONGOID-3158 DateTime#mongoize and Date#mongoize return nil for invalid strings.
  • MONGOID-3842 Allow cache timestamp format to be changed. (@DouweM)
  • MONGOID-3875 Note in documentation that Mongoid::Attributes::Dynamic is needed when using counter_cache.
  • MONGOID-4129 Close connections opened by calling #with.
  • MONGOID-4218 Support Rails 5
  • MONGOID-4225 Incorporate separate Origin gem into Mongoid's codebase.
  • MONGOID-4266 Support passing multiple contexts to #valid?
  • MONGOID-4267 Support #attr_name_previously_changed? and #attr_name_previous_change
  • Add sorting options to the cache key (@jefmathiot)
  • Don't allow method names containing hyphens (@tdonia)

Closed tickets without fix needed

v6.0.0.rc0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.0.0.rc0

This is the first release candidate of Mongoid 6.0, which supports Rails 5.

The following changes are in rc0, in addition to the changes noted for the 6.0 beta release.

Bug fixes

API and behavior changes

Improvements and features

  • MONGOID-4301 Support $elemMatch in Matchable#matches? (@jonhyman)
  • Make Proxy undef regex more precise (@marshalium)
  • Incorporated Mongoid documentation into repository.
  • MONGOID-4274 Add QueryChache to the docs and take out Origin references
  • Improve test suite performance and ensure that new connections get closed

v6.0.0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.0.0

This is the general release of Mongoid 6.0, which supports Rails 5.
Please see the release notes for version 6.0.0.beta and 6.0.0.rc0 for more details on changes since the 5.x series.

Please note that JRuby 9.0 preforms much slower and uses more memory than we've seen with previous JRuby and Mongoid versions. You may want to put off upgrading to JRuby 9.0 + Mongoid 6.0 until the JRuby team has resolved some performance issues. Here is the relevant github issue with the JRuby project.

This release contains the following changes in addition to those list in the beta and rc0 versions of Mongoid 6.0.0.

  • Require Ruby driver >= 2.3 so that keys can be validated upon insert.
  • MONGOID-3843 Ensure that the output db is queried in mapReduce operations.
  • MONGOID-4173 Fix nested eager loading.
  • MONGOID-4280 Allow both Strings and Symbols to be used when accessing values in the as_document object.
  • MONGOID-4313 Fix nil errors in Eager loading.
  • Avoid NoMethodError when using #nested (@quinn)
  • Update list of tested Ruby versions in Readme (@tricknotes)
  • Documentation updates for 6.0

v6.0.1

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.0.1

This patch level release has the following bug fixes:

  • MONGOID-4315 Eager load objects when criteria docs are enumerated multiple times
  • MONGOID-4350 Fix counter_cache update when foreign_key isn't default (@TheSmartnik)
  • MONGOID-4313, MONGOID-4317 Fix Includes throwing NoMethodError when document is nil
  • MONGOID-3407 Fix setting a hash field with atomic operator
  • MONGOID-4310 Chained $in clauses should be an intersection.
  • Add docs for create/remove indexes called on models (@miguelgraz)
  • Don't fail when doing a localized attribute lookup which has a nil value after object initialization (@nicolasblanco)
  • Add support for clone documents that have nil legacy attributes. (@okoriko)

v6.0.2

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.0.2

This release only has one change but was necessary because of a bug introduced into 6.0.1 by the fix to ticket MONGOID-4310

The bug reports can be found here:

v6.0.3

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.0.3

This patch release has the following fixes:

  • MONGOID-3490 Fix Fields::Localized#lookup to work with boolean.
  • MONGOID-4360 Fix text search used in Aggregation pipeline.
  • MONGOID-4365 Allow partial iteration when eager loading.
  • Allow map_reduce to use read preference of client (@cesar-tonnoir)
  • Prefix Readonly#_loaded? method to avoid namespace pollution (@romanlehnert)
  • Bypass the query cache when reloading a document (@eugeneius)

v6.1.0.rc0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.1.0.rc0

This release candidate includes support for the new features of server version 3.4, among other smaller changes:

v6.1.0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.1.0

This minor release supports version 3.4 of the MongoDB server. It has all the changes listed for version 6.1.0.rc0 as well as the following:

v6.1.1

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.1.1

This patch release has the following changes:

  • Update config template (@ivanovaleksey)
  • MONGOID-3806 use where with delete conditions instead of driver API for #delete_all.
  • Fix YARD doc for Criteria#merge method (@ivanovaleksey)
  • Add support for matching index of an array (@loganyu)
  • Refactor eager preload to avoid stack overflow (@Val)
  • Small improvement to spec for Touchable (@johnnyshields)
  • MONGOID-4415 Ensure that storage options of parent are used for embedded docs when persisting
  • MONGOID-4319 Don't replace relation if new one is identical to existing.
  • Fix sort to id_sort option typos (@hartator)
  • MONGOID-4416 Don't run touch callbacks when #touch is called on an object from a relation's callback
  • MONGOID-4418 Don't allow PersistenceContext method as field names
  • Fix compatibility of Mongoid::Contextual::None with other contexts by adding distinct (@ElMassimo)
  • Update mongoid-queries.txt (@wndfly)
  • Update mongoid-queries.txt with valid ruby (@arbourd)
  • RUBY-1207 Note that username and password are required for most auth mechanisms.
  • MONGOID-4426 Account for nil value in Hash field before setting
  • Allow raw bson regexp query criteria on fields specified as Strings
  • MONGOID-4425 #as_document continues to return BSON::Document, but use internal api method #as_attributes otherwise
  • MONGOID-4431 Avoid use of certain names in Synchronization module so not to interfer with attribute names
  • MONGOID-3678 Change #matches? to #_matches? to avoid relation name clash
  • MONGOID-4435 Don't convert option keys to String from Symbols when cloning criteria
  • Travis and Evergreen improvements
  • API docs available at https://docs.mongodb.com/mongoid/6.1/api/

Tickets that are closed as of this release without changes:

v6.2.0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.2.0

This version of Mongoid supports (and requires at least) Rails 5.1.

v6.2.1

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.2.1

  • MONGOID-4444 Don't include PersistenceContext methods in prohibted field names, include Clients::Options instead
  • MONGOID-4466 Duplicate of MONGOID-4444
  • MONGOID-4453 Ignore attr_readonly when defined on foreign key fields
  • MONGOID-4445 Remove unnecessary extra inverse criterion when retrieving has_many objects
  • MONGOID-4451 Unexpected exception when using a "destructive" field
  • Make _destroy alias flagged_for_destroy? (@danielfarrell)

v6.3.0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.3.0

This release of Mongoid depends on at least Ruby driver version 2.5.0, which supports MongoDB server version 3.6 and which drops supports for MongoDB server version 2.4. This requirement addresses MONGOID-4504.

In other words, this version of Mongoid supports MongoDB server versions 2.6 - 3.6.

The following bug fixes and changes are in this release:

  • MONGOID-3362 Don't allow associations to be a Model field name, as it conflicts with the internal API.
  • MONGOID-4499 Use $push and $each instead of $pushAll
  • MONGOID-4470 Add id_sort :none option to enumerable #first and #last
  • MONGOID-4497 Allow _type to be a Symbol or String. (@pacop)
  • MONGOID-4505 Fix typo in documentation.
  • MONGOID-4503 Support passing array_filters to update methods.
  • Ensure that Persistence Context is cleared, even when error is raised in accessing client. (@benknowles)

v6.4.0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.4.0

This version of Mongoid most notably adds support for sessions.
The full list of changes is as follows:

  • Require at least version 2.5.1 of the Ruby driver
  • MONGOID-4517 Implement sessions support
  • MONGOID-4508 Chained "in" when querying on ids should evolve to ObjectId before the value comparison
  • MONGOID-4477 Ensure that Model.destroy_all returns 0 for unacknowledged write concern

v6.4.1

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.4.1

  • MONGOID-4536 Internal API conflict with relation or attribute named 'session'
  • MONGOID-4525 set modifier method don't persist change with a empty hash
  • MONGOID-4526 Update mongoid.yml to point user to driver client documentation for options

v6.4.2

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.4.2

This patch release has the following minor changes:

v6.4.4

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v6.4.4

This maintenance release in the 6.4.x series contains the following notable improvements:

The following bugs were aso fixed:

6.4.3 release was skipped due to a certificate issue.

v7.0.0.beta

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v7.0.0.beta

This is a beta release of Mongoid 7.0. It's is meant for testing and not for production. The API may also evolve as further betas and release candidates are released. Please report any issues in the jira project for Mongoid.

The release contains a large refactor of the way associations are defined between models. There are some behavior changes but the API is mostly unchanged. Please see the below list for details on bug fixes, behavior changes and API adjustments:

These are the behavior changes:

  • MONGOID-4354 Provide more helpful error message when _type field doesn't correspond to a Class name
  • MONGOID-4455 Make readonly attributes behavior consistent with ActiveRecord
  • MONGOID-3831 Mongoize to a String when Range#mongoize receives a string instead of Range
  • MONGOID-3678 Change #matches? to #_matches? to avoid relation name clash

These are the bug fixes and API/feature additions:

  • Provide all dependent options that ActiveRecord has (documentation here)
  • MONGOID-3261 Objects are built twice when relation is specified in the constructor.
  • MONGOID-3586 Persistence inconsistency.
  • MONGOID-3765 determine_inverse_foreign_key does not observe customized foreign key
  • MONGOID-3797 HABM relations are not saved correctly on both sides if providing just model_ids
  • MONGOID-3809 Duplicate embedded document created on save (repro included)
  • MONGOID-3829 Setting referenced-in relation breaks substitution of the inverse relation.
  • MONGOID-3830 Range field type/extension seems to have a weird bug if given a string
  • MONGOID-3850 Coexisting instances are able to bypass the uniqueness validator on embedded docs
  • MONGOID-3876 delete_all conditions don't work with aliased fields.
  • MONGOID-3893 Adding pointers in embedded document corrupts the pointed document
  • MONGOID-3901 Create the dependent behavior restrict_with_error
  • MONGOID-3917 Create child object with inheritance and nested attributes.
  • MONGOID-4054 (Works as designed) Mongoid localized field not being set in first form submission
  • MONGOID-4100 Ensure that type gets set for first_or methods on polymorphic objects
  • MONGOID-4210 Embedded document unexpected autosave behavior
  • MONGOID-4273 Self-referencing has_and_belongs_to_many not updated properly
  • MONGOID-4282 Foreign key string are not properly evolved to ObjectIds in #where for polymorphic relations
  • MONGOID-4309 Infinite Loop In Callbacks
  • MONGOID-4427 Updating an embedded document triggers an unnecessary unset
  • MONGOID-4435 Cloning Criteria does not preserve read preference
  • MONGOID-4436 Duplicate of MONGOID-2882
  • MONGOID-4442 Missing Mongoid::Relations::Cascading::DeleteAll
  • MONGOID-4444 Field names display and options are on prohibited_methods list
  • MONGOID-4258 Autosave does not cascade unless all items are "dirty"
  • MONGOID-4259 "dependent: :destroy" option destroys out-of-date relation
  • MONGOID-4431 Avoid using synced and syncable internally so as not to clash with potential attribute names
  • MONGOID-4445 Remove unnecessary extra inverse criterion when retrieving has_many objects
  • MONGOID-4447 Support passing a document to $unwind operator in aggregation
  • MONGOID-4448 Add global config option to always create indexes in the background
  • MONGOID-4449 Avoid using #base and #target method names on proxy objects
  • MONGOID-4461 Encourage referring to MongoDB docs for supported map reduce options

v7.0.0

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v7.0.0

This major version of Mongoid has a number of significant refactors, bug fixes, and behavior corrections. Please refer to the list of changes in version 7.0.0.beta and the following list for a complete picture of the changes.

These are the behavior changes:

  • Fixup the falsey logic of nested (@nolaneo)
  • MONGOID-4477 Don't report destroyed count with unacknowledged writes

These are the bug fixes and API/feature additions:

  • Drop support for MongoDB server version 2.4.0 / require at least server version 2.6.0.
  • Require at least Ruby driver version 2.5.1
  • remove warning: instance variable @__parent not initialized (@qbantek)
  • MONGOID-4470 Add id_sort :none option to enumerable #first and #last
  • MONGOID-4485 Remove Ruby 1.9 temporal fix removing Symbol:Size from Ruby's Symbol class (@ColinTheRobot)
  • MONGOID-4487: Fix atomically to support empty updates (@gingerhendrix)
  • Use old value of shar key when calculating Mongoid::Shardableshard_key_selector (@intale)
  • Fix typo in documentation for And.rb (@kattak)
  • add support for using $not in $elemMatch (@loganyu)
  • Ensure the persistence context is unset when invalid (@benknowles)
  • fix cloning document with polymorphic embedded documents with multiple language field (@tomasc)
  • Add support for .inc to contextual (@johnnyshields)
  • Travis test improvements (@johnnyshields)
  • MONGOID-4497 Covert type to String before looking up in attributes hash.
  • Remove QueryCache#read_or_server_selector (@koraktor)
  • MONGOID-4505 Fix typo in tutorial for default_scope
  • MONGOID-4499 Replace uses of pushAll with push and each
  • MONGOID-3362 Don't allow Relations::Marcros methods to be field names
  • MONGOID-4503 Support passing array_filters to update methods
  • MONGOID-4483 Demongoize attribute values when accessing via #read_attribute or #[]
  • MONGOID-2882 Set base relation on has_many enumerable objects
  • MONGOID-4508 Ensure that fields are evolved properly when chaining criterion
  • Fix Mongoid::Errors::UnknownModel (@Fudoshiki)
  • MONGOID-4506 Support sessions
  • fix query date parser with ActiveSupport timezone (@infernalmaster)

v7.0.1

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v7.0.1

This patch release has the following minor changes:

  • fix before_remove and after_remove relation callbacks and add shift relation method
  • MONGOID-4536 Change session accessor name on a model to avoid name clash

v7.0.2

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v7.0.2

This patch release has the following minor changes:

  • MONGOID-4542 embedded_in with polymorphic and touch results in load_missing_constant
  • MONGOID-4543 accepts_nested_attributes_for no longer sets autosave: true
  • MONGOID-4544 Model#touch results in NoMethodError: undefined method `touch'
  • MONGOID-4549 Dependents are tracked incorrectly through sibling documents
  • MONGOID-4559 Setting an embeds_one to nil does not persist
  • MONGOID-4560 Cloning documents with deep embedded documents don't work
  • MONGOID-4608 Add Nor matcher
  • MONGOID-4609 Fix Settable: allow setting a nested value to a non-string (on 7.x)
  • MONGOID-4610 Mongoid::Clients::Factory test is failing with driver_master
  • MONGOID-4612 Map reduce with preference test failure
  • MONGOID-4532 Namespaced models in relations are not found
  • MONGOID-4576 drop_dups: mark deprecated

v7.0.3

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v7.0.3

This maintenance release of the 7.0.x series has the following notable improvements:

The following notable issues have been fixed:

v7.0.4

Release Notes: https://github.com/mongodb/mongoid/releases/tag/v7.0.4

This maintenance release of the 7.0.x series primarily addresses a class loading regression introduced in the 7.0.3 release. The following tickets have been resolved:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment