Skip to content
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

MONGOID-5806 Rails 7.2 Support (#5852) #5860

Merged
merged 1 commit into from
Sep 4, 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
12 changes: 8 additions & 4 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ axes:
values:
- id: ubuntu-22.04
display_name: "Ubuntu 22.04"
run_on: ubuntu2004-small
run_on: ubuntu2204-small
variables:
DOCKER_DISTRO: ubuntu2204
- id: debian11
Expand Down Expand Up @@ -535,6 +535,10 @@ axes:
display_name: "Rails 7.1"
variables:
RAILS: "7.1"
- id: "7.2"
display_name: "Rails 7.2"
variables:
RAILS: "7.2"

- id: "i18n"
display_name: I18n version
Expand Down Expand Up @@ -690,7 +694,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 @@ -776,8 +780,8 @@ buildvariants:
mongodb-version: '6.0'
topology: standalone
app-tests: yes
rails: ['6.0', '6.1', '7.0', '7.1']
os: rhel80
rails: ['6.0', '6.1', '7.0', '7.1', '7.2']
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"
Expand Down
6 changes: 5 additions & 1 deletion .evergreen/config/axes.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ axes:
values:
- id: ubuntu-22.04
display_name: "Ubuntu 22.04"
run_on: ubuntu2004-small
run_on: ubuntu2204-small
variables:
DOCKER_DISTRO: ubuntu2204
- id: debian11
Expand Down 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: "i18n"
display_name: I18n version
Expand Down
6 changes: 3 additions & 3 deletions .evergreen/config/variants.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,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 @@ -201,8 +201,8 @@ buildvariants:
mongodb-version: '6.0'
topology: standalone
app-tests: yes
rails: ['6.0', '6.1', '7.0', '7.1']
os: rhel80
rails: ['6.0', '6.1', '7.0', '7.1', '7.2']
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"
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 @@ -37,7 +37,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 @@ -510,13 +510,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 @@ -527,13 +529,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 @@ -652,8 +656,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 @@ -664,8 +669,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 @@ -676,8 +682,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
2 changes: 1 addition & 1 deletion spec/shared
Loading