diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 5132dc9992..b9b92f2411 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -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 @@ -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 @@ -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})" @@ -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" diff --git a/.evergreen/config/axes.yml.erb b/.evergreen/config/axes.yml.erb index 750f1e7f9b..659da7b533 100644 --- a/.evergreen/config/axes.yml.erb +++ b/.evergreen/config/axes.yml.erb @@ -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 @@ -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 diff --git a/.evergreen/config/variants.yml.erb b/.evergreen/config/variants.yml.erb index baa0f7d39c..58b56eb9cd 100644 --- a/.evergreen/config/variants.yml.erb +++ b/.evergreen/config/variants.yml.erb @@ -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})" @@ -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" diff --git a/gemfiles/rails-7.2.gemfile b/gemfiles/rails-7.2.gemfile new file mode 100644 index 0000000000..bdc1062ec6 --- /dev/null +++ b/gemfiles/rails-7.2.gemfile @@ -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 diff --git a/mongoid.gemspec b/mongoid.gemspec index ea4a6185a4..37edf0b496 100644 --- a/mongoid.gemspec +++ b/mongoid.gemspec @@ -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']) diff --git a/spec/mongoid/serializable_spec.rb b/spec/mongoid/serializable_spec.rb index 7629d0de6a..95dcaa56b0 100644 --- a/spec/mongoid/serializable_spec.rb +++ b/spec/mongoid/serializable_spec.rb @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/spec/shared b/spec/shared index 0fdadd7881..5b3115d3df 160000 --- a/spec/shared +++ b/spec/shared @@ -1 +1 @@ -Subproject commit 0fdadd7881fbc2ed4df999015a751de3e7475fda +Subproject commit 5b3115d3df9c26d17ac1b450f5cedacdb857507c