From bc95514079f882194794087f009ec4439e512286 Mon Sep 17 00:00:00 2001 From: Daniel Arnold Date: Thu, 2 Oct 2025 16:54:59 -0400 Subject: [PATCH 1/3] update ruby versions in CI and gemfiles for mongoid 7, 8, and 9. test against ruby 3.2 for older versions of mongoid, and test against 3.2, 3.3, and 3.4 for mongoid 9. (ruby 3.1 is EOL) --- .github/workflows/ci.yml | 35 ++++++++---- Gemfile.lock | 45 ++++++++------- gemfiles/mongoid7.gemfile | 2 +- gemfiles/mongoid7.gemfile.lock | 49 ++++++++-------- gemfiles/mongoid8.gemfile | 2 +- gemfiles/mongoid8.gemfile.lock | 101 +++++++++++++++++++++++++++++++++ 6 files changed, 179 insertions(+), 55 deletions(-) create mode 100644 gemfiles/mongoid8.gemfile.lock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5333399..e5069d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,20 +2,35 @@ name: CI on: [push, pull_request] jobs: tests: - name: Tests + name: Ruby ${{ matrix.ruby }} • ${{ matrix.gemfile_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest] - ruby: [ - "3.1", - ] - gemfile: [ - "gemfiles/mongoid7", - "gemfiles/mongoid8", - ] - experimental: [false] + include: + - os: ubuntu-latest + ruby: "3.2" + gemfile: gemfiles/mongoid7.gemfile + gemfile_name: mongoid7 + - os: ubuntu-latest + ruby: "3.2" + gemfile: gemfiles/mongoid8.gemfile + gemfile_name: mongoid8 + - os: ubuntu-latest + ruby: "3.2" + gemfile: Gemfile + gemfile_name: mongoid9 + - os: ubuntu-latest + ruby: "3.3" + gemfile: Gemfile + gemfile_name: mongoid9 + - os: ubuntu-latest + ruby: "3.4" + gemfile: Gemfile + gemfile_name: mongoid9 + + env: + BUNDLE_GEMFILE: ${{ matrix.gemfile }} steps: - name: Checkout code diff --git a/Gemfile.lock b/Gemfile.lock index 7d18e81..b6fd906 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,42 +7,47 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (7.1.3.4) - activesupport (= 7.1.3.4) - activesupport (7.1.3.4) + activemodel (8.0.3) + activesupport (= 8.0.3) + activesupport (8.0.3) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - base64 (0.2.0) - bigdecimal (3.1.8) - bson (5.0.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.3) + bson (5.1.1) byebug (11.1.3) coderay (1.1.3) - concurrent-ruby (1.3.3) - connection_pool (2.4.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) diff-lcs (1.5.1) docile (1.3.2) - drb (2.2.1) + drb (2.2.3) given_core (3.8.2) sorcerer (>= 0.3.7) - i18n (1.14.5) + i18n (1.14.7) concurrent-ruby (~> 1.0) json (2.3.1) + logger (1.7.0) method_source (1.1.0) - minitest (5.24.1) - mongo (2.20.1) + minitest (5.25.5) + mongo (2.21.3) + base64 bson (>= 4.14.1, < 6.0.0) - mongoid (9.0.1) - activemodel (>= 5.1, < 7.2, != 7.0.0) + mongoid (9.0.8) + activemodel (>= 5.1, < 8.1, != 7.0.0) concurrent-ruby (>= 1.0.5, < 2.0) mongo (>= 2.18.0, < 3.0.0) - mutex_m (0.2.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -66,6 +71,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) + securerandom (0.4.1) simplecov (0.17.1) docile (~> 1.1) json (>= 1.8, < 3) @@ -74,6 +80,7 @@ GEM sorcerer (2.0.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + uri (1.0.3) PLATFORMS ruby @@ -88,4 +95,4 @@ DEPENDENCIES simplecov (~> 0.17.0) BUNDLED WITH - 2.3.22 + 2.7.2 diff --git a/gemfiles/mongoid7.gemfile b/gemfiles/mongoid7.gemfile index 9937a39..3d9c080 100644 --- a/gemfiles/mongoid7.gemfile +++ b/gemfiles/mongoid7.gemfile @@ -5,7 +5,7 @@ gemspec path: '..' gem 'bundler' gem 'rake' gem 'pry-byebug' -gem 'mongoid', '~> 7.0.0' +gem 'mongoid', '~> 7.5' group :test do gem 'rspec-given', '~> 3.5' diff --git a/gemfiles/mongoid7.gemfile.lock b/gemfiles/mongoid7.gemfile.lock index 4f38be3..548ec53 100644 --- a/gemfiles/mongoid7.gemfile.lock +++ b/gemfiles/mongoid7.gemfile.lock @@ -1,38 +1,40 @@ PATH remote: .. specs: - mongoid_includes (3.0.0) - mongoid (>= 7.0.10, < 8.0.0) + mongoid_includes (3.0.3) + mongoid (>= 7.0.10, < 10.0.0) GEM remote: https://rubygems.org/ specs: - activemodel (6.0.3.4) - activesupport (= 6.0.3.4) - activesupport (6.0.3.4) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) + activesupport (7.0.8.7) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) - bson (4.11.0) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + base64 (0.3.0) + bson (5.1.1) byebug (11.1.3) coderay (1.1.3) - concurrent-ruby (1.1.7) + concurrent-ruby (1.3.5) diff-lcs (1.4.4) docile (1.3.2) given_core (3.8.1) sorcerer (>= 0.3.7) - i18n (1.8.5) + i18n (1.14.7) concurrent-ruby (~> 1.0) json (2.3.1) method_source (1.0.0) - minitest (5.14.2) - mongo (2.13.1) - bson (>= 4.8.2, < 5.0.0) - mongoid (7.0.10) - activemodel (>= 5.1, < 6.1) - mongo (>= 2.7.0, < 3.0.0) + minitest (5.25.5) + mongo (2.21.3) + base64 + bson (>= 4.14.1, < 6.0.0) + mongoid (7.5.4) + activemodel (>= 5.1, < 7.1, != 7.0.0) + mongo (>= 2.10.5, < 3.0.0) + ruby2_keywords (~> 0.0.5) pry (0.13.1) coderay (~> 1.1) method_source (~> 1.0) @@ -56,23 +58,22 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.4) + ruby2_keywords (0.0.5) simplecov (0.17.1) docile (~> 1.1) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) sorcerer (2.0.1) - thread_safe (0.3.6) - tzinfo (1.2.7) - thread_safe (~> 0.1) - zeitwerk (2.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) PLATFORMS ruby DEPENDENCIES bundler - mongoid (~> 7.0.0) + mongoid (~> 7.5) mongoid_includes! pry-byebug rake @@ -80,4 +81,4 @@ DEPENDENCIES simplecov (~> 0.17.0) BUNDLED WITH - 2.1.4 + 2.6.9 diff --git a/gemfiles/mongoid8.gemfile b/gemfiles/mongoid8.gemfile index e35523e..ac6a252 100644 --- a/gemfiles/mongoid8.gemfile +++ b/gemfiles/mongoid8.gemfile @@ -5,7 +5,7 @@ gemspec path: '..' gem 'bundler' gem 'rake' gem 'pry-byebug' -gem 'mongoid', '~> 8.0.2' +gem 'mongoid', '~> 8.1' group :test do gem 'rspec-given', '~> 3.5' diff --git a/gemfiles/mongoid8.gemfile.lock b/gemfiles/mongoid8.gemfile.lock new file mode 100644 index 0000000..e3895ec --- /dev/null +++ b/gemfiles/mongoid8.gemfile.lock @@ -0,0 +1,101 @@ +PATH + remote: .. + specs: + mongoid_includes (3.0.3) + mongoid (>= 7.0.10, < 10.0.0) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (8.0.3) + activesupport (= 8.0.3) + activesupport (8.0.3) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.3) + bson (5.1.1) + byebug (12.0.0) + coderay (1.1.3) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + diff-lcs (1.6.2) + docile (1.4.1) + drb (2.2.3) + given_core (3.8.2) + sorcerer (>= 0.3.7) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + json (2.15.0) + logger (1.7.0) + method_source (1.1.0) + minitest (5.25.5) + mongo (2.21.3) + base64 + bson (>= 4.14.1, < 6.0.0) + mongoid (8.1.11) + activemodel (>= 5.1, < 8.1, != 7.0.0) + concurrent-ruby (>= 1.0.5, < 2.0) + mongo (>= 2.18.0, < 3.0.0) + ruby2_keywords (~> 0.0.5) + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.11.0) + byebug (~> 12.0) + pry (>= 0.13, < 0.16) + rake (13.3.0) + rspec (3.13.1) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.5) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-given (3.8.2) + given_core (= 3.8.2) + rspec (>= 2.14.0) + rspec-mocks (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.6) + ruby2_keywords (0.0.5) + securerandom (0.4.1) + simplecov (0.17.1) + docile (~> 1.1) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.2) + sorcerer (2.0.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.0.3) + +PLATFORMS + ruby + x86_64-linux + +DEPENDENCIES + bundler + mongoid (~> 8.1) + mongoid_includes! + pry-byebug + rake + rspec-given (~> 3.5) + simplecov (~> 0.17.0) + +BUNDLED WITH + 2.6.9 From 1a9b44fca37659b638393297e84532a93e7d7dde Mon Sep 17 00:00:00 2001 From: Daniel Arnold Date: Thu, 2 Oct 2025 17:00:03 -0400 Subject: [PATCH 2/3] run tests on pushes to master only, and all pull requests --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5069d4..4051166 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,9 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: jobs: tests: name: Ruby ${{ matrix.ruby }} • ${{ matrix.gemfile_name }} From 584d110611ba56dd9e20eee4eaaccd59494a6b1f Mon Sep 17 00:00:00 2001 From: Daniel Arnold Date: Thu, 2 Oct 2025 17:22:55 -0400 Subject: [PATCH 3/3] drop mongoid 7 from CI, update gemspec --- .github/workflows/ci.yml | 4 -- Gemfile.lock | 2 +- gemfiles/mongoid7.gemfile | 13 ------ gemfiles/mongoid7.gemfile.lock | 84 ---------------------------------- gemfiles/mongoid8.gemfile.lock | 2 +- mongoid_includes.gemspec | 2 +- 6 files changed, 3 insertions(+), 104 deletions(-) delete mode 100644 gemfiles/mongoid7.gemfile delete mode 100644 gemfiles/mongoid7.gemfile.lock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4051166..b96c75b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,6 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - ruby: "3.2" - gemfile: gemfiles/mongoid7.gemfile - gemfile_name: mongoid7 - os: ubuntu-latest ruby: "3.2" gemfile: gemfiles/mongoid8.gemfile diff --git a/Gemfile.lock b/Gemfile.lock index b6fd906..8e75dcb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: mongoid_includes (3.0.3) - mongoid (>= 7.0.10, < 10.0.0) + mongoid (>= 8.0.0, < 10.0.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/mongoid7.gemfile b/gemfiles/mongoid7.gemfile deleted file mode 100644 index 3d9c080..0000000 --- a/gemfiles/mongoid7.gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '..' - -gem 'bundler' -gem 'rake' -gem 'pry-byebug' -gem 'mongoid', '~> 7.5' - -group :test do - gem 'rspec-given', '~> 3.5' - gem 'simplecov', '~> 0.17.0', require: false -end diff --git a/gemfiles/mongoid7.gemfile.lock b/gemfiles/mongoid7.gemfile.lock deleted file mode 100644 index 548ec53..0000000 --- a/gemfiles/mongoid7.gemfile.lock +++ /dev/null @@ -1,84 +0,0 @@ -PATH - remote: .. - specs: - mongoid_includes (3.0.3) - mongoid (>= 7.0.10, < 10.0.0) - -GEM - remote: https://rubygems.org/ - specs: - activemodel (7.0.8.7) - activesupport (= 7.0.8.7) - activesupport (7.0.8.7) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - base64 (0.3.0) - bson (5.1.1) - byebug (11.1.3) - coderay (1.1.3) - concurrent-ruby (1.3.5) - diff-lcs (1.4.4) - docile (1.3.2) - given_core (3.8.1) - sorcerer (>= 0.3.7) - i18n (1.14.7) - concurrent-ruby (~> 1.0) - json (2.3.1) - method_source (1.0.0) - minitest (5.25.5) - mongo (2.21.3) - base64 - bson (>= 4.14.1, < 6.0.0) - mongoid (7.5.4) - activemodel (>= 5.1, < 7.1, != 7.0.0) - mongo (>= 2.10.5, < 3.0.0) - ruby2_keywords (~> 0.0.5) - pry (0.13.1) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.9.0) - byebug (~> 11.0) - pry (~> 0.13.0) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.3) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.3) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-given (3.8.1) - given_core (= 3.8.1) - rspec (>= 2.14.0) - rspec-mocks (3.9.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.4) - ruby2_keywords (0.0.5) - simplecov (0.17.1) - docile (~> 1.1) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) - sorcerer (2.0.1) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - -PLATFORMS - ruby - -DEPENDENCIES - bundler - mongoid (~> 7.5) - mongoid_includes! - pry-byebug - rake - rspec-given (~> 3.5) - simplecov (~> 0.17.0) - -BUNDLED WITH - 2.6.9 diff --git a/gemfiles/mongoid8.gemfile.lock b/gemfiles/mongoid8.gemfile.lock index e3895ec..e5bc810 100644 --- a/gemfiles/mongoid8.gemfile.lock +++ b/gemfiles/mongoid8.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: mongoid_includes (3.0.3) - mongoid (>= 7.0.10, < 10.0.0) + mongoid (>= 8.0.0, < 10.0.0) GEM remote: https://rubygems.org/ diff --git a/mongoid_includes.gemspec b/mongoid_includes.gemspec index ec6ef38..1717680 100644 --- a/mongoid_includes.gemspec +++ b/mongoid_includes.gemspec @@ -22,5 +22,5 @@ Gem::Specification.new do |s| s.files = Dir.glob('lib/**/*') + %w(LICENSE.txt README.md Rakefile) s.test_files = Dir.glob('spec/**/*') - s.add_runtime_dependency 'mongoid', ['>= 7.0.10', '< 10.0.0'] + s.add_runtime_dependency 'mongoid', ['>= 8.0.0', '< 10.0.0'] end