Skip to content

Commit 84312b6

Browse files
johnnyshieldsp
andauthored
MONGOID-5171 - Make the minimum Ruby version 2.5 (#5058)
* MONGOID-5171 - Make the minimum Ruby version 2.5. Also get rid of the "ruby_version" module, which seems unused/out-of-date. * revert doc change * add 7.4 to compat tables removing Ruby 2.3/2.4 from it Co-authored-by: shields <[email protected]> Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent e2b7765 commit 84312b6

File tree

9 files changed

+42
-73
lines changed

9 files changed

+42
-73
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -404,14 +404,6 @@ axes:
404404
- id: "ruby"
405405
display_name: Ruby Version
406406
values:
407-
- id: "ruby-2.3"
408-
display_name: ruby-2.3
409-
variables:
410-
RVM_RUBY: "ruby-2.3"
411-
- id: "ruby-2.4"
412-
display_name: ruby-2.4
413-
variables:
414-
RVM_RUBY: "ruby-2.4"
415407
- id: "ruby-2.5"
416408
display_name: ruby-2.5
417409
variables:
@@ -599,30 +591,6 @@ buildvariants:
599591
tasks:
600592
- name: "test"
601593

602-
- matrix_name: "ruby-2.4"
603-
matrix_spec:
604-
ruby: ["ruby-2.4"]
605-
driver: ["current"]
606-
topology: ['replica-set', 'sharded-cluster']
607-
mongodb-version: ['3.2', '3.4']
608-
display_name: "${ruby}, ${driver}, ${rails}, ${mongodb-version}, ${topology}"
609-
run_on:
610-
- ubuntu1604-small
611-
tasks:
612-
- name: "test"
613-
614-
- matrix_name: "ruby-2.3"
615-
matrix_spec:
616-
ruby: ["ruby-2.3"]
617-
driver: ["current"]
618-
topology: ['replica-set', 'sharded-cluster']
619-
mongodb-version: ['2.6', '3.0']
620-
display_name: "${ruby}, ${driver}, ${rails}, ${mongodb-version}, ${topology}"
621-
run_on:
622-
- ubuntu1604-small
623-
tasks:
624-
- name: "test"
625-
626594
- matrix_name: "driver-upcoming"
627595
matrix_spec:
628596
driver: [master, stable]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Compatibility
1919

2020
Mongoid supports and is tested against:
2121

22-
- MRI 2.3-3.0
22+
- MRI 2.5-3.0
2323
- JRuby 9.2
2424
- MongoDB server 2.6-4.4
2525

docs/reference/compatibility.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ specified Mongoid versions.
3434
- Driver 2.15-2.10
3535
- Driver 2.9-2.7
3636

37+
* - 7.4
38+
- |checkmark|
39+
-
40+
3741
* - 7.3
3842
- |checkmark|
3943
-
@@ -77,6 +81,16 @@ is deprecated.
7781
- Ruby 2.2
7882
- JRuby 9.2
7983

84+
* - 7.4
85+
- |checkmark|
86+
- |checkmark|
87+
- |checkmark|
88+
- |checkmark|
89+
-
90+
-
91+
-
92+
- |checkmark|
93+
8094
* - 7.3
8195
- |checkmark| [#mongoid-7.3-ruby-3.0]_
8296
- |checkmark|
@@ -165,6 +179,16 @@ for driver compatibility matrices.
165179
- MongoDB 3.0
166180
- MongoDB 2.6
167181

182+
* - 7.4
183+
- |checkmark|
184+
- |checkmark|
185+
- |checkmark|
186+
- |checkmark|
187+
- |checkmark|
188+
- |checkmark|
189+
- |checkmark|
190+
- |checkmark|
191+
168192
* - 7.3
169193
- |checkmark|
170194
- |checkmark|
@@ -237,6 +261,14 @@ are supported by Mongoid.
237261
- Rails 5.0
238262
- Rails 4.2
239263

264+
* - 7.4
265+
- |checkmark|
266+
- |checkmark|
267+
- |checkmark| [#rails-5-ruby-3.0]_
268+
- |checkmark| [#rails-5-ruby-3.0]_
269+
-
270+
-
271+
240272
* - 7.3
241273
- |checkmark|
242274
- |checkmark|

docs/release-notes/mongoid-7.4.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ please consult GitHub releases for detailed release notes and JIRA for
1818
the complete list of issues fixed in each release, including bug fixes.
1919

2020

21+
Ruby Version Support
22+
--------------------
23+
24+
As of version 7.4, Mongoid supports Ruby 2.5+.
25+
Support for Ruby 2.4 and earlier has been dropped.
26+
27+
2128
``===`` Operator Matches Ruby Semantics
2229
---------------------------------------
2330

lib/mongoid.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require "support/ruby_version"
4-
53
require "forwardable"
64
require "time"
75
require "set"

lib/support/ruby_version.rb

Lines changed: 0 additions & 28 deletions
This file was deleted.

mongoid.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
3030
warn "[#{s.name}] Warning: No private key present, creating unsigned gem."
3131
end
3232

33-
s.required_ruby_version = ">= 2.3"
33+
s.required_ruby_version = ">= 2.5"
3434
s.required_rubygems_version = ">= 1.3.6"
3535

3636
if RUBY_VERSION.start_with?('2.')

spec/mongoid/association/referenced/has_many/enumerable_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@
288288
end
289289

290290
context "when an argument is given" do
291-
ruby_version_gte '2.5'
292291

293292
it "returns true when the argument is true" do
294293
expect(enumerable.any?(Post)).to be true
@@ -300,7 +299,6 @@
300299
end
301300

302301
context "when both an argument and a block are given" do
303-
ruby_version_gte '2.5'
304302

305303
it "gives precedence to the pattern" do
306304
expect(
@@ -339,7 +337,6 @@
339337
end
340338

341339
context "when an argument is given" do
342-
ruby_version_gte '2.5'
343340

344341
it "returns true when the argument is true" do
345342
expect(enumerable.any?(Post)).to be true
@@ -351,7 +348,6 @@
351348
end
352349

353350
context "when both an argument and a block are given" do
354-
ruby_version_gte '2.5'
355351

356352
it "gives precedence to the pattern" do
357353
expect(

spec/mongoid/touchable_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,7 @@
330330
end
331331

332332
let(:frozen_error_cls) do
333-
if RUBY_VERSION >= '2.5'
334-
FrozenError
335-
else
336-
RuntimeError
337-
end
333+
FrozenError
338334
end
339335

340336
context "when no attribute is provided" do

0 commit comments

Comments
 (0)