Skip to content

Commit 35d0c63

Browse files
authored
Prep for v8.0.6 (#5682)
* version bump * add release notes for the `allow_bson5_decimal128` config option * don't use docker due to rate limiting
1 parent aa31dc9 commit 35d0c63

File tree

4 files changed

+40
-3
lines changed

4 files changed

+40
-3
lines changed

.evergreen/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ functions:
282282
DRIVER="${DRIVER}" \
283283
I18N="${I18N}" \
284284
TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \
285-
./egos .evergreen/run-tests-docker.sh
285+
./egos .evergreen/run-tests.sh
286286
287287
"fix absolute paths":
288288
- command: shell.exec

.evergreen/config/commands.yml.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ functions:
256256
DRIVER="${DRIVER}" \
257257
I18N="${I18N}" \
258258
TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \
259-
./egos .evergreen/run-tests-docker.sh
259+
./egos .evergreen/run-tests.sh
260260

261261
"fix absolute paths":
262262
- command: shell.exec

docs/release-notes/mongoid-8.0.txt

+37
Original file line numberDiff line numberDiff line change
@@ -767,3 +767,40 @@ Support for individually caching criteria objects has been dropped in Mongoid 8.
767767

768768
In order to get caching functionality, enable the Mongoid Query Cache. See the
769769
section on :ref:`Query Cache <query-cache>` for more details.
770+
771+
772+
BSON 5 and BSON::Decimal128 Fields
773+
----------------------------------
774+
775+
When BSON 4 or earlier is present, any field declared as BSON::Decimal128 will
776+
return a BSON::Decimal128 value. When BSON 5 is present, however, any field
777+
declared as BSON::Decimal128 will return a BigDecimal value by default.
778+
779+
.. code-block:: ruby
780+
781+
class Model
782+
include Mongoid::Document
783+
784+
field :decimal_field, type: BSON::Decimal128
785+
end
786+
787+
# under BSON <= 4
788+
Model.first.decimal_field.class #=> BSON::Decimal128
789+
790+
# under BSON >= 5
791+
Model.first.decimal_field.class #=> BigDecimal
792+
793+
If you need literal BSON::Decimal128 values with BSON 5, you may instruct
794+
Mongoid to allow literal BSON::Decimal128 fields:
795+
796+
.. code-block:: ruby
797+
798+
Model.first.decimal_field.class #=> BigDecimal
799+
800+
Mongoid.allow_bson5_decimal128 = true
801+
Model.first.decimal_field.class #=> BSON::Decimal128
802+
803+
.. note::
804+
805+
The ``allow_bson5_decimal128`` option only has any effect under
806+
BSON 5 and later. BSON 4 and earlier ignore the setting entirely.

lib/mongoid/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Mongoid
4-
VERSION = "8.0.5"
4+
VERSION = "8.0.6"
55
end

0 commit comments

Comments
 (0)