This new major release of the Ruby BSON gem is now available. Install it as usual via Rubygems:
$ gem install bson
Or add it to your Gemfile
:
gem 'bson'
The following changes are included:
- https://jira.mongodb.org/browse/RUBY-1114 “JRuby Driver and Java Driver Libraries are incompatible” – JRuby package name changed to org.bson_ruby (implementation detail – JRuby programs should be using ‘require “bson”’ instead of importing these packages directly)
- https://jira.mongodb.org/browse/RUBY-1410 “Implement ObjectID spec” – brings bson-ruby into full spec compliance with ObjectID generation
- https://jira.mongodb.org/browse/RUBY-1806 “Create an exception hierarchy” – errors raised by the library are now descended from BSON::Error
- https://jira.mongodb.org/browse/RUBY-2056 “Allow all subtype values in BSON::Binary” – BSON::Binary now accepts both symbols and integers as subtypes
- https://jira.mongodb.org/browse/RUBY-2783 “Return a String without ‘$oid’ from BSON::ObjectId#as_json and #to_json”
- https://jira.mongodb.org/browse/RUBY-2810 “Make as_json serializations user-friendly for numeric types”
- https://jira.mongodb.org/browse/RUBY-2846 “Add _bson_to_i method to ActiveSupport::TimeWithZone class.”
- https://jira.mongodb.org/browse/RUBY-2867 “Change Decimal128 to deserialize to BigDecimal by default”
- https://jira.mongodb.org/browse/RUBY-3101 “Prohibit integer options in BSON::Regexp::Raw constructor” – BSON::Regexp::Raw no longer accepts integers as options
- https://jira.mongodb.org/browse/RUBY-3109 “Remove all references to dots and dollars in BSON” – removes “validating_keys” from the API
- https://jira.mongodb.org/browse/RUBY-3116 “Investigate leftover code for Rexgexp integer options”
- https://jira.mongodb.org/browse/RUBY-3137 “Use SecureRandom to initialize ObjectId counter”
- https://jira.mongodb.org/browse/RUBY-3140 “BSON::Decimal128 should support #to_d”
- https://jira.mongodb.org/browse/RUBY-3306 “Investigate using Ruby’s internal random utility instead of rand for ObjectId’s” – now using SecureRandom internally to generate the random portions of BSON::ObjectID’s.
- https://jira.mongodb.org/browse/RUBY-3309 “Add BSON Binary Data subtype Sensitive”
The following minor/internal changes are also included:
- https://jira.mongodb.org/browse/RUBY-1168 “Correct BSON corpus Decimal128 test failures”
- https://jira.mongodb.org/browse/RUBY-2655 “Set up build pipeline for outside contributors”
- https://jira.mongodb.org/browse/RUBY-2777 “Regex decoding error tests in top.json have unexpected, invalid syntax”
- https://jira.mongodb.org/browse/RUBY-2942 “Update docs.mongodb.com links in source, API & Reference documentation”
- https://jira.mongodb.org/browse/RUBY-3139 “Update Gem::Specification with MongoDB Ruby Team Info”
- https://jira.mongodb.org/browse/RUBY-3228 “[BSON] Various warnings”