From 92b666f015c6110f022255b2ad76f9bdef8a1824 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 19 Nov 2024 11:23:31 +0100 Subject: [PATCH] Allow Mongoid 9.0.3+ now that the client override isolation bug has been fixed and released (v1.6.1) --- .github/workflows/test.yaml | 2 +- README.md | 17 ++++++++++++++++- gemfiles/rails7-mongoid9 | 2 +- lib/mongoid_rails_migrations/version.rb | 2 +- mongoid_rails_migrations.gemspec | 3 ++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 197c806..ea59aff 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,7 +12,7 @@ jobs: gemfile: - rails6-mongoid7 - rails7-mongoid8 - # - rails7-mongoid9 + - rails7-mongoid9 include: - ruby_version: '2.4' gemfile: rails5-mongoid6 diff --git a/README.md b/README.md index 2c02ca2..0fe14f9 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,12 @@ Global migrations can still be created with the `--no-shards` option. ## Unreleased -[Compare master with 1.6.0](https://github.com/adacosta/mongoid_rails_migrations/compare/v1.6.0...master) +[Compare master with 1.6.1](https://github.com/adacosta/mongoid_rails_migrations/compare/v1.6.1...master) + +## 1.6.1 +_12/09/2024_ +* Allow Mongoid 9.0.3+ now that the client override isolation bug has been fixed and released: https://jira.mongodb.org/browse/MONGOID-5815 +* Add testing gemfile for Rails 7 + Mongoid 9 to the matrix ## 1.6.0 _12/09/2024_ @@ -140,9 +145,19 @@ _18/08/2015_ # Tests ``` +$ bundle install $ bundle exec rake ``` +Test a specific rails/mongoid version gemfile: + +``` +$ BUNDLE_GEMFILE=gemfiles/rails8-mongoid9 bundle install +$ BUNDLE_GEMFILE=gemfiles/rails8-mongoid9 bundle exec rake +``` + +Note: if you already ran the command a while ago, you can use `bundle update` instead of `bundle install` to fetch latest compatible versions. + # Credits to * rails diff --git a/gemfiles/rails7-mongoid9 b/gemfiles/rails7-mongoid9 index 525a1bd..e1aa940 100644 --- a/gemfiles/rails7-mongoid9 +++ b/gemfiles/rails7-mongoid9 @@ -1,4 +1,4 @@ source "https://rubygems.org" gemspec path: ".." -gem 'rails', '~> 7.1' +gem 'rails', '~> 7.2' gem 'mongoid', '~> 9.0' \ No newline at end of file diff --git a/lib/mongoid_rails_migrations/version.rb b/lib/mongoid_rails_migrations/version.rb index b04d3b8..caa8827 100644 --- a/lib/mongoid_rails_migrations/version.rb +++ b/lib/mongoid_rails_migrations/version.rb @@ -1,3 +1,3 @@ module MongoidRailsMigrations #:nodoc: - VERSION = '1.6.0' + VERSION = '1.6.1' end diff --git a/mongoid_rails_migrations.gemspec b/mongoid_rails_migrations.gemspec index f001fb5..dcaf429 100644 --- a/mongoid_rails_migrations.gemspec +++ b/mongoid_rails_migrations.gemspec @@ -20,7 +20,8 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency('bundler', '>= 1.0.0') # 9.0.0 broke client override isolation: https://jira.mongodb.org/browse/MONGOID-5815 - spec.add_runtime_dependency('mongoid', '>= 5.0.0', '< 9.0.0') + # got fixed in 9.0.3 so rejectings versions in between to prevent bad surprises: + spec.add_runtime_dependency('mongoid', '>= 5.0.0', '!= 9.0.0', '!= 9.0.1', '!= 9.0.2') spec.add_runtime_dependency('rails', rails_version) spec.add_runtime_dependency('railties', rails_version) spec.add_runtime_dependency('activesupport', rails_version)