Skip to content

MONGOID-5806 Rails 7.2 Support #5852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ axes:
display_name: "Rails 7.1"
variables:
RAILS: "7.1"
- id: "7.2"
display_name: "Rails 7.2"
variables:
RAILS: "7.2"

- id: "test-i18n-fallbacks"
display_name: Test i18n fallbacks
Expand Down Expand Up @@ -717,7 +721,7 @@ buildvariants:
driver: ["current"]
mongodb-version: "6.0"
topology: "standalone"
rails: ['7.0', '7.1']
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
Expand Down Expand Up @@ -778,7 +782,7 @@ buildvariants:
mongodb-version: '6.0'
topology: standalone
app-tests: yes
rails: ['6.1', '7.0', '7.1']
rails: ['6.1', '7.0', '7.1', '7.2']
os: ubuntu-20.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
Expand Down
4 changes: 4 additions & 0 deletions .evergreen/config/axes.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ axes:
display_name: "Rails 7.1"
variables:
RAILS: "7.1"
- id: "7.2"
display_name: "Rails 7.2"
variables:
RAILS: "7.2"

- id: "test-i18n-fallbacks"
display_name: Test i18n fallbacks
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/config/variants.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ buildvariants:
driver: ["current"]
mongodb-version: "6.0"
topology: "standalone"
rails: ['7.0', '7.1']
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
Expand Down Expand Up @@ -165,7 +165,7 @@ buildvariants:
mongodb-version: '6.0'
topology: standalone
app-tests: yes
rails: ['6.1', '7.0', '7.1']
rails: ['6.1', '7.0', '7.1', '7.2']
os: ubuntu-20.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
Expand Down
11 changes: 11 additions & 0 deletions gemfiles/rails-7.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# rubocop:todo all
source 'https://rubygems.org'

gem 'actionpack', '~> 7.2'
gem 'activemodel', '~> 7.2'

gemspec path: '..'

require_relative './standard'

standard_dependencies
2 changes: 1 addition & 1 deletion mongoid.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Gem::Specification.new do |s|
# Ruby 3.0 requires ActiveModel 6.0 or higher.
# activemodel 7.0.0 cannot be used due to Class#descendants issue
# See: https://github.com/rails/rails/pull/43951
s.add_dependency("activemodel", ['>=5.1', '<7.2', '!= 7.0.0'])
s.add_dependency("activemodel", ['>=5.1', '<7.3', '!= 7.0.0'])
s.add_dependency("mongo", ['>=2.18.0', '<3.0.0'])
s.add_dependency("concurrent-ruby", ['>= 1.0.5', '< 2.0'])

Expand Down
25 changes: 16 additions & 9 deletions spec/mongoid/serializable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,15 @@
end

it "includes the first relation" do
expect(relation_hash[0]).to include
expect(relation_hash[0]).to include(
{ "_id" => "kudamm", "street" => "Kudamm" }
)
end

it "includes the second relation" do
expect(relation_hash[1]).to include
expect(relation_hash[1]).to include(
{ "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
)
end
end

Expand All @@ -528,13 +530,15 @@
end

it "includes the first relation" do
expect(relation_hash[0]).to include
expect(relation_hash[0]).to include(
{ "_id" => "kudamm", "street" => "Kudamm" }
)
end

it "includes the second relation" do
expect(relation_hash[1]).to include
expect(relation_hash[1]).to include(
{ "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
)
end
end

Expand Down Expand Up @@ -653,8 +657,9 @@
end

it "includes the specified relation" do
expect(relation_hash).to include
{ "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
expect(relation_hash).to include(
{ "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" }
)
end
end

Expand All @@ -665,8 +670,9 @@
end

it "includes the specified relation" do
expect(relation_hash).to include
{ "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
expect(relation_hash).to include(
{ "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" }
)
end
end

Expand All @@ -677,8 +683,9 @@
end

it "includes the specified relation sans exceptions" do
expect(relation_hash).to include
expect(relation_hash).to include(
{ "first_name" => "Leo", "last_name" => "Marvin" }
)
end
end
end
Expand Down
Loading