Skip to content

Commit 535517c

Browse files
AlexKovynevAlexKovynevcomandeo-mongo
committed
MONGOID-5806 Rails 7.2 Support (mongodb#5852)
Co-authored-by: AlexKovynev <alexkovynev@gmail.com> Co-authored-by: Dmitry Rybakov <dmitry.rybakov@mongodb.com>
1 parent feaa47d commit 535517c

File tree

7 files changed

+45
-19
lines changed

7 files changed

+45
-19
lines changed

.evergreen/config.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ axes:
446446
values:
447447
- id: ubuntu-22.04
448448
display_name: "Ubuntu 22.04"
449-
run_on: ubuntu2004-small
449+
run_on: ubuntu2204-small
450450
variables:
451451
DOCKER_DISTRO: ubuntu2204
452452
- id: debian11
@@ -535,6 +535,10 @@ axes:
535535
display_name: "Rails 7.1"
536536
variables:
537537
RAILS: "7.1"
538+
- id: "7.2"
539+
display_name: "Rails 7.2"
540+
variables:
541+
RAILS: "7.2"
538542

539543
- id: "i18n"
540544
display_name: I18n version
@@ -690,7 +694,7 @@ buildvariants:
690694
driver: ["current"]
691695
mongodb-version: "6.0"
692696
topology: "standalone"
693-
rails: ['7.0', '7.1']
697+
rails: ['7.0', '7.1', '7.2']
694698
os: ubuntu-22.04
695699
fle: helper
696700
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
@@ -776,8 +780,8 @@ buildvariants:
776780
mongodb-version: '6.0'
777781
topology: standalone
778782
app-tests: yes
779-
rails: ['6.0', '6.1', '7.0', '7.1']
780-
os: rhel80
783+
rails: ['6.0', '6.1', '7.0', '7.1', '7.2']
784+
os: ubuntu-22.04
781785
display_name: "app tests ${driver}, ${ruby}, ${rails}"
782786
tasks:
783787
- name: "test"

.evergreen/config/axes.yml.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ axes:
121121
values:
122122
- id: ubuntu-22.04
123123
display_name: "Ubuntu 22.04"
124-
run_on: ubuntu2004-small
124+
run_on: ubuntu2204-small
125125
variables:
126126
DOCKER_DISTRO: ubuntu2204
127127
- id: debian11
@@ -210,6 +210,10 @@ axes:
210210
display_name: "Rails 7.1"
211211
variables:
212212
RAILS: "7.1"
213+
- id: "7.2"
214+
display_name: "Rails 7.2"
215+
variables:
216+
RAILS: "7.2"
213217

214218
- id: "i18n"
215219
display_name: I18n version

.evergreen/config/variants.yml.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ buildvariants:
115115
driver: ["current"]
116116
mongodb-version: "6.0"
117117
topology: "standalone"
118-
rails: ['7.0', '7.1']
118+
rails: ['7.0', '7.1', '7.2']
119119
os: ubuntu-22.04
120120
fle: helper
121121
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
@@ -201,8 +201,8 @@ buildvariants:
201201
mongodb-version: '6.0'
202202
topology: standalone
203203
app-tests: yes
204-
rails: ['6.0', '6.1', '7.0', '7.1']
205-
os: rhel80
204+
rails: ['6.0', '6.1', '7.0', '7.1', '7.2']
205+
os: ubuntu-22.04
206206
display_name: "app tests ${driver}, ${ruby}, ${rails}"
207207
tasks:
208208
- name: "test"

gemfiles/rails-7.2.gemfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# rubocop:todo all
2+
source 'https://rubygems.org'
3+
4+
gem 'actionpack', '~> 7.2'
5+
gem 'activemodel', '~> 7.2'
6+
7+
gemspec path: '..'
8+
9+
require_relative './standard'
10+
11+
standard_dependencies

mongoid.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
3737
# Ruby 3.0 requires ActiveModel 6.0 or higher.
3838
# activemodel 7.0.0 cannot be used due to Class#descendants issue
3939
# See: https://github.com/rails/rails/pull/43951
40-
s.add_dependency("activemodel", ['>=5.1', '<7.2', '!= 7.0.0'])
40+
s.add_dependency("activemodel", ['>=5.1', '<7.3', '!= 7.0.0'])
4141
s.add_dependency("mongo", ['>=2.18.0', '<3.0.0'])
4242
s.add_dependency("concurrent-ruby", ['>= 1.0.5', '< 2.0'])
4343

spec/mongoid/serializable_spec.rb

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,15 @@
510510
end
511511

512512
it "includes the first relation" do
513-
expect(relation_hash[0]).to include
513+
expect(relation_hash[0]).to include(
514514
{ "_id" => "kudamm", "street" => "Kudamm" }
515+
)
515516
end
516517

517518
it "includes the second relation" do
518-
expect(relation_hash[1]).to include
519+
expect(relation_hash[1]).to include(
519520
{ "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
521+
)
520522
end
521523
end
522524

@@ -527,13 +529,15 @@
527529
end
528530

529531
it "includes the first relation" do
530-
expect(relation_hash[0]).to include
532+
expect(relation_hash[0]).to include(
531533
{ "_id" => "kudamm", "street" => "Kudamm" }
534+
)
532535
end
533536

534537
it "includes the second relation" do
535-
expect(relation_hash[1]).to include
538+
expect(relation_hash[1]).to include(
536539
{ "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
540+
)
537541
end
538542
end
539543

@@ -652,8 +656,9 @@
652656
end
653657

654658
it "includes the specified relation" do
655-
expect(relation_hash).to include
656-
{ "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
659+
expect(relation_hash).to include(
660+
{ "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" }
661+
)
657662
end
658663
end
659664

@@ -664,8 +669,9 @@
664669
end
665670

666671
it "includes the specified relation" do
667-
expect(relation_hash).to include
668-
{ "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
672+
expect(relation_hash).to include(
673+
{ "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" }
674+
)
669675
end
670676
end
671677

@@ -676,8 +682,9 @@
676682
end
677683

678684
it "includes the specified relation sans exceptions" do
679-
expect(relation_hash).to include
685+
expect(relation_hash).to include(
680686
{ "first_name" => "Leo", "last_name" => "Marvin" }
687+
)
681688
end
682689
end
683690
end

0 commit comments

Comments
 (0)