mongoid 7.5.4 → 7.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,39 +1,15 @@
1
1
  # When changing, also update the hash in share/Dockerfile.
2
- TOOLCHAIN_VERSION=219833abad4d9d3bf43c0fef101a8ca082ac4ae9
2
+ JDK_VERSION=jdk21
3
3
 
4
4
  set_env_java() {
5
5
  ls -l /opt || true
6
6
  ls -l /usr/lib/jvm || true
7
7
 
8
8
  # Use toolchain java if it exists
9
- if [ -f /opt/java/jdk8/bin/java ]; then
10
- export JAVACMD=/opt/java/jdk8/bin/java
11
- #export PATH=$PATH:/opt/java/jdk8/bin
12
- fi
13
-
14
- # ppc64le has it in a different place
15
- if test -z "$JAVACMD" && [ -f /usr/lib/jvm/java-1.8.0/bin/java ]; then
16
- export JAVACMD=/usr/lib/jvm/java-1.8.0/bin/java
17
- #export PATH=$PATH:/usr/lib/jvm/java-1.8.0/bin
18
- fi
19
-
20
- if true; then
21
- # newer
22
- # rhel71-ppc, https://jira.mongodb.org/browse/BUILD-9231
23
- if test -z "$JAVACMD" &&
24
- (ls /opt/java || true) |grep -q java-1.8.0-openjdk-1.8.0 &&
25
- test -f /opt/java/java-1.8.0-openjdk-1.8.0*/bin/java;
26
- then
27
- path=$(cd /opt/java && ls -d java-1.8.0-openjdk-1.8.0* |head -n 1)
28
- export JAVACMD=/opt/java/"$path"/bin/java
29
- fi
9
+ if [ -f /opt/java/$JDK_VERSION/bin/java ]; then
10
+ export JAVACMD=/opt/java/$JDK_VERSION/bin/java
30
11
  else
31
- # older
32
- # rhel71-ppc seems to have an /opt/java/jdk8/bin/java but it doesn't work
33
- if test -n "$JAVACMD" && ! exec $JAVACMD -version; then
34
- JAVACMD=
35
- # we will try the /usr/lib/jvm then
36
- fi
12
+ echo Could not find $JDK_VERSION in /opt/java
37
13
  fi
38
14
 
39
15
  if test -n "$JAVACMD"; then
@@ -53,7 +29,7 @@ set_env_python() {
53
29
  curl -fL --retry 3 https://github.com/p-mongodb/deps/raw/main/"$arch"-python37.tar.xz | \
54
30
  tar xfJ - -C /opt
55
31
  fi
56
-
32
+
57
33
  if test -d /opt/python/3.7/bin; then
58
34
  # Most Evergreen configurations.
59
35
  export PATH=/opt/python/3.7/bin:$PATH
@@ -61,7 +37,7 @@ set_env_python() {
61
37
  # Configurations that use Docker in Evergreen - these don't preload.
62
38
  export PATH=/opt/python37/bin:$PATH
63
39
  fi
64
-
40
+
65
41
  python3 -V
66
42
  fi
67
43
  }
@@ -78,7 +54,7 @@ set_env_node() {
78
54
  # Node from toolchain in Evergreen
79
55
  export PATH=/opt/node/bin:$PATH
80
56
  fi
81
-
57
+
82
58
  node -v
83
59
  }
84
60
 
@@ -113,34 +89,13 @@ set_env_ruby() {
113
89
  if test "$USE_OPT_TOOLCHAIN" = 1; then
114
90
  # Nothing, also PATH is already set
115
91
  :
116
- elif true; then
117
-
118
- # For testing toolchains:
119
- #toolchain_url=https://s3.amazonaws.com//mciuploads/mongo-ruby-toolchain/`host_distro`/f11598d091441ffc8d746aacfdc6c26741a3e629/mongo_ruby_driver_toolchain_`host_distro |tr - _`_patch_f11598d091441ffc8d746aacfdc6c26741a3e629_5e46f2793e8e866f36eda2c5_20_02_14_19_18_18.tar.gz
120
- toolchain_url=http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-driver/$TOOLCHAIN_VERSION/`host_distro`/$RVM_RUBY.tar.xz
121
- curl --retry 3 -fL $toolchain_url |tar Jxf -
122
- export PATH=`pwd`/rubies/$RVM_RUBY/bin:$PATH
123
- #export PATH=`pwd`/rubies/python/3/bin:$PATH
124
-
125
- # Attempt to get bundler to report all errors - so far unsuccessful
126
- #curl --retry 3 -o bundler-openssl.diff https://github.com/bundler/bundler/compare/v2.0.1...p-mongo:report-errors.diff
127
- #find . -path \*/lib/bundler/fetcher.rb -exec patch {} bundler-openssl.diff \;
128
-
129
92
  else
93
+ # For testing unpublished builds:
94
+ #build_url=https://s3.amazonaws.com/mciuploads/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz
130
95
 
131
- # Normal operation
132
- if ! test -d $HOME/.rubies/$RVM_RUBY/bin; then
133
- echo "Ruby directory does not exist: $HOME/.rubies/$RVM_RUBY/bin" 1>&2
134
- echo "Contents of /opt:" 1>&2
135
- ls -l /opt 1>&2 || true
136
- echo ".rubies symlink:" 1>&2
137
- ls -ld $HOME/.rubies 1>&2 || true
138
- echo "Our rubies:" 1>&2
139
- ls -l $HOME/.rubies 1>&2 || true
140
- exit 2
141
- fi
142
- export PATH=$HOME/.rubies/$RVM_RUBY/bin:$PATH
143
-
96
+ build_url=http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz
97
+ curl --retry 3 -fL $build_url |tar Jxf -
98
+ export PATH=`pwd`/rubies/$RVM_RUBY/bin:$PATH
144
99
  fi
145
100
 
146
101
  ruby --version
@@ -151,19 +106,5 @@ set_env_ruby() {
151
106
 
152
107
  ruby -v |fgrep $ruby_name
153
108
  ruby -v |fgrep $ruby_version
154
-
155
- # We shouldn't need to update rubygems, and there is value in
156
- # testing on whatever rubygems came with each supported ruby version
157
- #echo 'updating rubygems'
158
- #gem update --system
159
-
160
- # Only install bundler when not using ruby-head.
161
- # ruby-head comes with bundler and gem complains
162
- # because installing bundler would overwrite the bundler binary.
163
- # We now install bundler in the toolchain, hence nothing needs to be done
164
- # in the tests.
165
- if false && echo "$RVM_RUBY" |grep -q jruby; then
166
- gem install bundler -v '<2'
167
- fi
168
109
  fi
169
110
  }
@@ -2,27 +2,30 @@
2
2
 
3
3
  module Mongoid
4
4
  module Expectations
5
-
6
- def connection_class
7
- if defined?(Mongo::Server::ConnectionBase)
8
- Mongo::Server::ConnectionBase
9
- else
10
- # Pre-2.8 drivers
11
- Mongo::Server::Connection
5
+ # Previously this method used RSpec::Mocks with .exactly.times(n).and_call_original,
6
+ # which stopped working reliably in Ruby 3.3. Now we directly wrap the target method.
7
+ def expect_query(number)
8
+ if %i[ sharded load-balanced ].include?(ClusterConfig.instance.topology) && number > 0
9
+ skip 'This spec requires replica set or standalone topology'
12
10
  end
13
- end
14
11
 
15
- def expect_query(number)
16
- rv = nil
17
- RSpec::Mocks.with_temporary_scope do
18
- if number > 0
19
- expect_any_instance_of(connection_class).to receive(:command_started).exactly(number).times.and_call_original
20
- else
21
- expect_any_instance_of(connection_class).not_to receive(:command_started)
12
+ klass = Mongo::Server::ConnectionBase
13
+ original_method = klass.instance_method(:command_started)
14
+ query_count = 0
15
+
16
+ begin
17
+ klass.define_method(:command_started) do |*args, **kwargs|
18
+ query_count += 1
19
+ original_method.bind_call(self, *args, **kwargs)
22
20
  end
23
- rv = yield
21
+
22
+ result = yield
23
+ expect(query_count).to eq(number)
24
+ result
25
+ ensure
26
+ klass.remove_method(:command_started)
27
+ klass.define_method(:command_started, original_method)
24
28
  end
25
- rv
26
29
  end
27
30
 
28
31
  def expect_no_queries(&block)
metadata CHANGED
@@ -1,41 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.5.4
4
+ version: 7.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The MongoDB Ruby Team
8
- autorequire:
9
8
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMREwDwYDVQQDDAhkYngt
14
- cnVieTEXMBUGCgmSJomT8ixkARkWB21vbmdvZGIxEzARBgoJkiaJk/IsZAEZFgNj
15
- b20wHhcNMjMwMTMxMTE1NjM1WhcNMjQwMTMxMTE1NjM1WjBBMREwDwYDVQQDDAhk
16
- YngtcnVieTEXMBUGCgmSJomT8ixkARkWB21vbmdvZGIxEzARBgoJkiaJk/IsZAEZ
17
- FgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC0/Veq9l47cTf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p0B/SkKXIrRGJ7FBzupoORNRXHviS2OC3ty
34
- 4lwUzOlLTF/yO0wwYYfmtQOALQwKnW838vbYthMXvTjxB0EgVZ5PKto99WbjsXzy
35
- wkeAWhd5b+5JS0zgDL4SvGB8/W2IY+y0zELkojBMgJPyrpAWHL/WSsSBMuhyI2Pv
36
- xxaBVLklnJJ/qCCOZ3lG2MyVc/Nb0Mmq8ygWNsfwHmKKYuuWcviit0D0Tek=
37
- -----END CERTIFICATE-----
38
- date: 2023-08-24 00:00:00.000000000 Z
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
39
11
  dependencies:
40
12
  - !ruby/object:Gem::Dependency
41
13
  name: activemodel
@@ -106,7 +78,7 @@ dependencies:
106
78
  version: 4.9.4
107
79
  - - "<"
108
80
  - !ruby/object:Gem::Version
109
- version: 5.0.0
81
+ version: 6.0.0
110
82
  type: :development
111
83
  prerelease: false
112
84
  version_requirements: !ruby/object:Gem::Requirement
@@ -116,7 +88,7 @@ dependencies:
116
88
  version: 4.9.4
117
89
  - - "<"
118
90
  - !ruby/object:Gem::Version
119
- version: 5.0.0
91
+ version: 6.0.0
120
92
  description: Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written
121
93
  in Ruby.
122
94
  email: dbx-ruby@mongodb.com
@@ -841,6 +813,7 @@ files:
841
813
  - spec/mongoid_spec.rb
842
814
  - spec/rails/controller_extension/controller_runtime_spec.rb
843
815
  - spec/rails/mongoid_spec.rb
816
+ - spec/shared/CANDIDATE.md
844
817
  - spec/shared/LICENSE
845
818
  - spec/shared/bin/get-mongodb-download-url
846
819
  - spec/shared/bin/s3-copy
@@ -852,11 +825,14 @@ files:
852
825
  - spec/shared/lib/mrss/eg_config_utils.rb
853
826
  - spec/shared/lib/mrss/event_subscriber.rb
854
827
  - spec/shared/lib/mrss/lite_constraints.rb
828
+ - spec/shared/lib/mrss/release/candidate.rb
829
+ - spec/shared/lib/mrss/release/product_data.rb
855
830
  - spec/shared/lib/mrss/server_version_registry.rb
856
831
  - spec/shared/lib/mrss/session_registry.rb
857
832
  - spec/shared/lib/mrss/session_registry_legacy.rb
858
833
  - spec/shared/lib/mrss/spec_organizer.rb
859
834
  - spec/shared/lib/mrss/utils.rb
835
+ - spec/shared/lib/tasks/candidate.rake
860
836
  - spec/shared/share/Dockerfile.erb
861
837
  - spec/shared/share/haproxy-1.conf
862
838
  - spec/shared/share/haproxy-2.conf
@@ -1140,7 +1116,6 @@ metadata:
1140
1116
  documentation_uri: https://docs.mongodb.com/mongoid/
1141
1117
  homepage_uri: https://mongoid.org/
1142
1118
  source_code_uri: https://github.com/mongodb/mongoid
1143
- post_install_message:
1144
1119
  rdoc_options: []
1145
1120
  require_paths:
1146
1121
  - lib
@@ -1155,8 +1130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1155
1130
  - !ruby/object:Gem::Version
1156
1131
  version: 1.3.6
1157
1132
  requirements: []
1158
- rubygems_version: 3.4.17
1159
- signing_key:
1133
+ rubygems_version: 4.0.4
1160
1134
  specification_version: 4
1161
1135
  summary: Elegant Persistence in Ruby for MongoDB.
1162
1136
  test_files:
@@ -1537,6 +1511,7 @@ test_files:
1537
1511
  - spec/mongoid_spec.rb
1538
1512
  - spec/rails/controller_extension/controller_runtime_spec.rb
1539
1513
  - spec/rails/mongoid_spec.rb
1514
+ - spec/shared/CANDIDATE.md
1540
1515
  - spec/shared/LICENSE
1541
1516
  - spec/shared/bin/get-mongodb-download-url
1542
1517
  - spec/shared/bin/s3-copy
@@ -1548,11 +1523,14 @@ test_files:
1548
1523
  - spec/shared/lib/mrss/eg_config_utils.rb
1549
1524
  - spec/shared/lib/mrss/event_subscriber.rb
1550
1525
  - spec/shared/lib/mrss/lite_constraints.rb
1526
+ - spec/shared/lib/mrss/release/candidate.rb
1527
+ - spec/shared/lib/mrss/release/product_data.rb
1551
1528
  - spec/shared/lib/mrss/server_version_registry.rb
1552
1529
  - spec/shared/lib/mrss/session_registry.rb
1553
1530
  - spec/shared/lib/mrss/session_registry_legacy.rb
1554
1531
  - spec/shared/lib/mrss/spec_organizer.rb
1555
1532
  - spec/shared/lib/mrss/utils.rb
1533
+ - spec/shared/lib/tasks/candidate.rake
1556
1534
  - spec/shared/share/Dockerfile.erb
1557
1535
  - spec/shared/share/haproxy-1.conf
1558
1536
  - spec/shared/share/haproxy-2.conf
@@ -1618,8 +1596,8 @@ test_files:
1618
1596
  - spec/support/models/circuit.rb
1619
1597
  - spec/support/models/circus.rb
1620
1598
  - spec/support/models/code.rb
1621
- - spec/support/models/coding/pull_request.rb
1622
1599
  - spec/support/models/coding.rb
1600
+ - spec/support/models/coding/pull_request.rb
1623
1601
  - spec/support/models/comment.rb
1624
1602
  - spec/support/models/company.rb
1625
1603
  - spec/support/models/consumption_period.rb
@@ -1739,9 +1717,9 @@ test_files:
1739
1717
  - spec/support/models/profile.rb
1740
1718
  - spec/support/models/pronunciation.rb
1741
1719
  - spec/support/models/pub.rb
1720
+ - spec/support/models/publication.rb
1742
1721
  - spec/support/models/publication/encyclopedia.rb
1743
1722
  - spec/support/models/publication/review.rb
1744
- - spec/support/models/publication.rb
1745
1723
  - spec/support/models/purchase.rb
1746
1724
  - spec/support/models/purchased_item.rb
1747
1725
  - spec/support/models/question.rb
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1,3 +0,0 @@
1
- ~ ʅۙ���:����\��Ѹ�����=4��b�+�.��+�r���[7>��AU��IV���L��wl�c+��pd���亩F��*83���"��~��f�`K�߁�~A�p\�as���a��h����('_- :ph�7M��i&L�E����y��4��qS1�j*�[���_o��<B]�9g_�vn�TáZ����l�'�X�0i�n��I��z( [Y�
2
- �����?�U�x �P�7P{v�\x�C��9Ϗ���s�r��b�l��k2p͈�.� ��5Ι5�`�u��8��:z׆ޭ��F��t8ê�C2�-ӫ��
3
- c_8)���R���C$�\4(�T�;)��|̃��h���t�qK]