File tree Expand file tree Collapse file tree 7 files changed +55
-160
lines changed Expand file tree Collapse file tree 7 files changed +55
-160
lines changed Original file line number Diff line number Diff line change @@ -347,22 +347,6 @@ axes:
347
347
display_name : " MongoDB 3.6"
348
348
variables :
349
349
VERSION : " 3.6"
350
- - id : " 3.4"
351
- display_name : " MongoDB 3.4"
352
- variables :
353
- VERSION : " 3.4"
354
- - id : " 3.2"
355
- display_name : " MongoDB 3.2"
356
- variables :
357
- VERSION : " 3.2"
358
- - id : " 3.0"
359
- display_name : " MongoDB 3.0"
360
- variables :
361
- VERSION : " 3.0"
362
- - id : " 2.6"
363
- display_name : " MongoDB 2.6"
364
- variables :
365
- VERSION : " 2.6"
366
350
- id : " topology"
367
351
display_name : Topology
368
352
values :
Original file line number Diff line number Diff line change @@ -85,6 +85,17 @@ is deprecated.
85
85
- Ruby 2.2
86
86
- JRuby 9.2
87
87
88
+ * - 8.0
89
+ - |checkmark|
90
+ - |checkmark|
91
+ - |checkmark|
92
+ - |checkmark|
93
+ - |checkmark|
94
+ -
95
+ -
96
+ -
97
+ - |checkmark|
98
+
88
99
* - 7.4
89
100
- |checkmark|
90
101
- |checkmark|
@@ -193,6 +204,17 @@ and will be removed in a next version.
193
204
- MongoDB 3.0
194
205
- MongoDB 2.6
195
206
207
+ * - 8.0
208
+ - |checkmark|
209
+ - |checkmark|
210
+ - |checkmark|
211
+ - |checkmark|
212
+ - |checkmark|
213
+ -
214
+ -
215
+ -
216
+ -
217
+
196
218
* - 7.4
197
219
- |checkmark|
198
220
- |checkmark|
@@ -279,116 +301,55 @@ are supported by Mongoid.
279
301
- Rails 6.0
280
302
- Rails 5.2
281
303
- Rails 5.1
282
- - Rails 5.0
283
- - Rails 4.2
304
+
305
+ * - 8.0
306
+ - |checkmark|
307
+ - |checkmark|
308
+ - |checkmark|
309
+ - |checkmark| [#rails-5-ruby-3.0]_
310
+ - |checkmark| [#rails-5-ruby-3.0]_
284
311
285
312
* - 7.4
286
313
- |checkmark|
287
314
- |checkmark|
288
315
- |checkmark|
289
316
- |checkmark| [#rails-5-ruby-3.0]_
290
317
- |checkmark| [#rails-5-ruby-3.0]_
291
- -
292
- -
293
318
294
319
* - 7.3
295
320
- |checkmark| [#rails-7-Mongoid-7.3]_
296
321
- |checkmark|
297
322
- |checkmark|
298
323
- |checkmark| [#rails-5-ruby-3.0]_
299
324
- |checkmark| [#rails-5-ruby-3.0]_
300
- -
301
- -
302
325
303
326
* - 7.2
304
327
-
305
328
- |checkmark| [#rails-6.1]_
306
329
- |checkmark|
307
330
- |checkmark| [#rails-5-ruby-3.0]_
308
331
- |checkmark| [#rails-5-ruby-3.0]_
309
- -
310
- -
311
332
312
333
* - 7.1
313
334
-
314
335
- |checkmark| [#rails-6.1]_
315
336
- |checkmark|
316
337
- |checkmark|
317
338
- |checkmark|
318
- -
319
- -
320
339
321
340
* - 7.0
322
341
-
323
342
- |checkmark| [#rails-6.1]_
324
343
- |checkmark| [#rails-6]_
325
344
- |checkmark|
326
345
- |checkmark|
327
- -
328
- -
329
346
330
347
* - 6.4
331
348
-
332
349
-
333
350
-
334
351
- |checkmark|
335
352
- |checkmark|
336
- -
337
- -
338
-
339
- * - 6.3
340
- -
341
- -
342
- -
343
- - |checkmark|
344
- - |checkmark|
345
- -
346
- -
347
-
348
- * - 6.2
349
- -
350
- -
351
- -
352
- - |checkmark|
353
- - |checkmark|
354
- -
355
- -
356
-
357
- * - 6.1
358
- -
359
- -
360
- -
361
- -
362
- -
363
- - |checkmark|
364
- -
365
-
366
- * - 6.0
367
- -
368
- -
369
- -
370
- -
371
- -
372
- - |checkmark|
373
- -
374
-
375
- * - 5.4
376
- -
377
- -
378
- -
379
- -
380
- -
381
- -
382
- - |checkmark|
383
-
384
- * - 5.2
385
- -
386
- -
387
- -
388
- -
389
- -
390
- -
391
- - |checkmark|
392
353
393
354
.. [#rails-5-ruby-3.0] Using Rails 5.x with Ruby 3 is not supported.
394
355
Original file line number Diff line number Diff line change @@ -29,6 +29,13 @@ As of version 7.4, Mongoid supports Ruby 2.5+.
29
29
Support for Ruby 2.4 and earlier has been dropped.
30
30
31
31
32
+ Support for MongoDB 3.4 and Earlier Servers Deprecated
33
+ ------------------------------------------------------
34
+
35
+ Mongoid 7.4 deprecates support for MongoDB 3.4 and earlier.
36
+ Mongoid 8 will require MongoDB 3.6 or newer.
37
+
38
+
32
39
Change ``===`` Operator To Match Ruby Semantics
33
40
-----------------------------------------------
34
41
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ please consult GitHub releases for detailed release notes and JIRA for
18
18
the complete list of issues fixed in each release, including bug fixes.
19
19
20
20
21
+ Support for MongoDB 3.4 and Earlier Servers Dropped
22
+ ---------------------------------------------------
23
+
24
+ Mongoid 8 requires MongoDB 3.6 or newer. Earlier server versions are not
25
+ supported.
26
+
27
+
21
28
Default Option Values Changed
22
29
-----------------------------
23
30
Original file line number Diff line number Diff line change 166
166
end
167
167
end
168
168
end
169
-
170
- context 'when sessions are not supported' do
171
- max_server_version '3.4'
172
-
173
- let! ( :error ) do
174
- e = nil
175
- begin
176
- Person . with_session { }
177
- rescue => ex
178
- e = ex
179
- end
180
- e
181
- end
182
-
183
- it 'raises a sessions not supported error' do
184
- expect ( error ) . to be_a ( Mongoid ::Errors ::InvalidSessionUse )
185
- expect ( error . message ) . to include ( 'not supported' )
186
- end
187
- end
188
169
end
189
170
190
171
context 'when a session is used on a model instance' do
312
293
end
313
294
end
314
295
end
315
-
316
- context 'when sessions are not supported' do
317
- max_server_version '3.4'
318
-
319
- let! ( :error ) do
320
- e = nil
321
- begin
322
- person . with_session { }
323
- rescue => ex
324
- e = ex
325
- end
326
- e
327
- end
328
-
329
- it 'raises a sessions not supported error' do
330
- expect ( error ) . to be_a ( Mongoid ::Errors ::InvalidSessionUse )
331
- expect ( error . message ) . to include ( 'not supported' )
332
- end
333
- end
334
296
end
335
297
end
Original file line number Diff line number Diff line change 194
194
Band . where ( name : 'DEPECHE MODE' ) . collation ( locale : 'en_US' , strength : 2 )
195
195
end
196
196
197
- context 'when the server supports collations' do
198
- min_server_version '3.4'
199
-
200
- it 'applies the collation' do
201
- expect ( map_reduce . out ( inline : 1 ) . count ) . to eq ( 1 )
202
- end
203
- end
204
-
205
- context 'when the server does not support collations' do
206
- max_server_version '3.2'
207
-
208
- it 'raises an exception' do
209
- expect {
210
- map_reduce . out ( inline : 1 ) . to_a
211
- } . to raise_exception ( Mongo ::Error ::UnsupportedCollation )
212
- end
197
+ it 'applies the collation' do
198
+ expect ( map_reduce . out ( inline : 1 ) . count ) . to eq ( 1 )
213
199
end
214
200
end
215
201
end
Original file line number Diff line number Diff line change 86
86
end
87
87
88
88
context 'Regexp field' do
89
- shared_examples "persists strings as regexp" do |type |
90
- it 'persists strings as regexp' do
91
- mop = Mop . create! ( regexp_field : 'foo' )
92
- expect ( mop . regexp_field ) . to be_a Regexp
93
- expect ( Mop . find ( mop . id ) . regexp_field ) . to be_a BSON ::Regexp ::Raw
94
- expect (
95
- Mop . collection . find (
96
- "_id" => mop . id ,
97
- "regexp_field" => { "$type" => type }
98
- ) . count
99
- ) . to be == 1
100
- end
101
- end
102
-
103
- context "< 3.2" do
104
- max_server_version ( "3.1" )
105
- include_examples "persists strings as regexp" , 11
106
- end
107
-
108
- context ">= 3.2" do
109
- min_server_version ( "3.2" )
110
- it_behaves_like "persists strings as regexp" , "regex"
89
+ it 'persists strings as regexp' do
90
+ mop = Mop . create! ( regexp_field : 'foo' )
91
+ expect ( mop . regexp_field ) . to be_a Regexp
92
+ expect ( Mop . find ( mop . id ) . regexp_field ) . to be_a BSON ::Regexp ::Raw
93
+ expect (
94
+ Mop . collection . find (
95
+ "_id" => mop . id ,
96
+ "regexp_field" => { "$type" => 'regex' }
97
+ ) . count
98
+ ) . to be == 1
111
99
end
112
100
end
113
101
end
You can’t perform that action at this time.
0 commit comments