From 843f4c4618ef66b7e662a7eb701681a2fd54c035 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Tue, 11 Jun 2024 19:02:24 -0700 Subject: [PATCH 01/21] Add support for mongoid 9 --- Gemfile | 4 +++- lib/mongoid/compatibility/version.rb | 2 +- spec/config/mongoid9.yml | 8 ++++++++ spec/mongoid/compatibility/version_spec.rb | 4 ++-- spec/support/mongoid.rb | 2 ++ 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 spec/config/mongoid9.yml diff --git a/Gemfile b/Gemfile index 9508cbe..eeb0724 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,11 @@ source 'http://rubygems.org' gemspec -case version = ENV['MONGOID_VERSION'] || '8.0.2' +case version = ENV['MONGOID_VERSION'] || '9.0.0' when 'HEAD' gem 'mongoid', github: 'mongodb/mongoid' +when /^9/ + gem 'mongoid', '~> 9.0' when /^8/ gem 'mongoid', '~> 8.0' when /^7/ diff --git a/lib/mongoid/compatibility/version.rb b/lib/mongoid/compatibility/version.rb index eeebf9a..9577e13 100644 --- a/lib/mongoid/compatibility/version.rb +++ b/lib/mongoid/compatibility/version.rb @@ -2,7 +2,7 @@ module Mongoid module Compatibility module Version module ClassMethods - (2..8).each do |v| + (2..9).each do |v| const_set "V#{v}", Mongoid::VERSION =~ Regexp.new("^#{v}\.") define_method "mongoid#{v}?" do diff --git a/spec/config/mongoid9.yml b/spec/config/mongoid9.yml new file mode 100644 index 0000000..c7385b7 --- /dev/null +++ b/spec/config/mongoid9.yml @@ -0,0 +1,8 @@ +test: + clients: + default: + database: mongoid-compatibility + hosts: + - localhost:27017 + options: + raise_not_found_error: false diff --git a/spec/mongoid/compatibility/version_spec.rb b/spec/mongoid/compatibility/version_spec.rb index a9d3737..1f54fa1 100644 --- a/spec/mongoid/compatibility/version_spec.rb +++ b/spec/mongoid/compatibility/version_spec.rb @@ -3,7 +3,7 @@ describe Mongoid::Compatibility::Version do context 'mongoid? methods' do it 'only true for one version' do - expect((2..8).one? do |v| + expect((2..9).one? do |v| Mongoid::Compatibility::Version.send("mongoid#{v}?") end).to be true end @@ -31,7 +31,7 @@ expect(Mongoid::Compatibility::Version.send("mongoid#{version}_or_older?")).to be true end end - (2..8).each do |v| + (2..9).each do |v| context "mongoid #{v}" do before do stub_const('::Mongoid::VERSION', "#{v}") diff --git a/spec/support/mongoid.rb b/spec/support/mongoid.rb index e31a91c..52b9043 100644 --- a/spec/support/mongoid.rb +++ b/spec/support/mongoid.rb @@ -14,6 +14,8 @@ Mongoid.load! 'spec/config/mongoid7.yml' elsif Mongoid::Compatibility::Version.mongoid8? Mongoid.load! 'spec/config/mongoid8.yml' +elsif Mongoid::Compatibility::Version.mongoid9? + Mongoid.load! 'spec/config/mongoid8.yml' else fail "unsupported Mongoid version #{Mongoid::VERSION}" end From 35a70ee0150f1e36f1764a6b18f845d4e4dbbc93 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Tue, 11 Jun 2024 19:04:12 -0700 Subject: [PATCH 02/21] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f53b966..9b7664e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 0.6.1 (Next) +* [#16](https://github.com/mongoid/mongoid-compatibility/pull/16): Add support for Mongoid 9 - [@saisrinivasan](https://github.com/SairamSrinivasan). * Your contribution here. ### 0.6.0 (2022/08/18) From 2072df96563e4dfcb71139b600aa291857770d32 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Tue, 11 Jun 2024 19:05:31 -0700 Subject: [PATCH 03/21] update test.yml in ci --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f7a65b..557add6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,7 @@ jobs: - { ruby: "2.7", mongoid: "7.5", bundler: "2", mongodb: "5.0" } - { ruby: "3.0", mongoid: "8.0", bundler: "2", mongodb: "5.0" } - { ruby: "3.1", mongoid: "8.0", bundler: "2", mongodb: "5.0" } + - { ruby: "3.1", mongoid: "9.0", bundler: "2", mongodb: "5.0" } steps: - name: repo checkout uses: actions/checkout@v2 From 7d45aa6bd9b389da7c2702470185e4b4393f1e26 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Tue, 11 Jun 2024 19:06:50 -0700 Subject: [PATCH 04/21] update yml reference --- spec/support/mongoid.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/mongoid.rb b/spec/support/mongoid.rb index 52b9043..ab89ab2 100644 --- a/spec/support/mongoid.rb +++ b/spec/support/mongoid.rb @@ -15,7 +15,7 @@ elsif Mongoid::Compatibility::Version.mongoid8? Mongoid.load! 'spec/config/mongoid8.yml' elsif Mongoid::Compatibility::Version.mongoid9? - Mongoid.load! 'spec/config/mongoid8.yml' + Mongoid.load! 'spec/config/mongoid9.yml' else fail "unsupported Mongoid version #{Mongoid::VERSION}" end From 44a3b5e2fb8aa6f7a9bfa13642da562a4d954ccc Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sat, 15 Jun 2024 15:45:27 -0700 Subject: [PATCH 05/21] upgrade to 1.0.0 --- CHANGELOG.md | 2 +- lib/mongoid/compatibility/self.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b7664e..84cd94b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 0.6.1 (Next) +### 1.0.0 (Next) * [#16](https://github.com/mongoid/mongoid-compatibility/pull/16): Add support for Mongoid 9 - [@saisrinivasan](https://github.com/SairamSrinivasan). * Your contribution here. diff --git a/lib/mongoid/compatibility/self.rb b/lib/mongoid/compatibility/self.rb index 1828535..ff4a7c2 100644 --- a/lib/mongoid/compatibility/self.rb +++ b/lib/mongoid/compatibility/self.rb @@ -1,5 +1,5 @@ module Mongoid module Compatibility - VERSION = '0.6.1'.freeze + VERSION = '1.0.0'.freeze end end From 809f8d48150f8924bb087167f3649eebf8bae5a0 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sat, 15 Jun 2024 16:42:10 -0700 Subject: [PATCH 06/21] bring in appraisal and update gha pipeline to read from appraisal generated gem files --- .github/workflows/test.yml | 110 +++++++++---------- .gitignore | 1 + .rubocop_todo.yml | 9 ++ .travis.yml | 29 ++--- Appraisals | 34 ++++++ Dangerfile | 2 + Gemfile | 35 +----- Rakefile | 4 +- gemfiles/mongoid_2.gemfile | 20 ++++ gemfiles/mongoid_3.gemfile | 19 ++++ gemfiles/mongoid_4.gemfile | 19 ++++ gemfiles/mongoid_5.gemfile | 19 ++++ gemfiles/mongoid_6.gemfile | 19 ++++ gemfiles/mongoid_7.gemfile | 19 ++++ gemfiles/mongoid_8.gemfile | 19 ++++ gemfiles/mongoid_9.gemfile | 19 ++++ gemfiles/mongoid_head.gemfile | 19 ++++ lib/mongoid-compatibility.rb | 2 + lib/mongoid/compatibility.rb | 2 + lib/mongoid/compatibility/object_id.rb | 2 + lib/mongoid/compatibility/self.rb | 4 +- lib/mongoid/compatibility/version.rb | 2 + lib/mongoid_compatibility.rb | 2 + mongoid-compatibility.gemspec | 11 +- spec/mongoid/compatibility/object_id_spec.rb | 2 + spec/mongoid/compatibility/self_spec.rb | 2 + spec/mongoid/compatibility/version_spec.rb | 4 +- spec/spec_helper.rb | 2 + spec/support/mongoid.rb | 4 +- 29 files changed, 317 insertions(+), 118 deletions(-) create mode 100644 Appraisals create mode 100644 gemfiles/mongoid_2.gemfile create mode 100644 gemfiles/mongoid_3.gemfile create mode 100644 gemfiles/mongoid_4.gemfile create mode 100644 gemfiles/mongoid_5.gemfile create mode 100644 gemfiles/mongoid_6.gemfile create mode 100644 gemfiles/mongoid_7.gemfile create mode 100644 gemfiles/mongoid_8.gemfile create mode 100644 gemfiles/mongoid_9.gemfile create mode 100644 gemfiles/mongoid_head.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 557add6..c908c03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,77 +5,65 @@ on: [push, pull_request] jobs: build: name: >- - Mongoid ${{ matrix.entry.mongoid }} - Ruby ${{ matrix.entry.ruby }} - MongoDB ${{ matrix.entry.mongodb }} + Mongoid Test with: (ruby=${{ matrix.entry.ruby }}, mongodb=${{ matrix.entry.mongodb }}), gemfile=${{ matrix.entry.gemfile }}) env: CI: true - TESTOPTS: -v + BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile runs-on: ubuntu-latest continue-on-error: false strategy: matrix: entry: - - { ruby: "2.1", mongoid: "3", bundler: "1", mongodb: "3.6" } - - { ruby: "2.1", mongoid: "4", bundler: "1", mongodb: "3.6" } - - { ruby: "2.2", mongoid: "4", bundler: "2", mongodb: "3.6" } - - { ruby: "2.2", mongoid: "5", bundler: "2", mongodb: "3.6" } - - { ruby: "2.3", mongoid: "5", bundler: "2", mongodb: "3.6" } - - { ruby: "2.4", mongoid: "6.1", bundler: "2", mongodb: "3.6" } - - { ruby: "2.5", mongoid: "6.2", bundler: "2", mongodb: "3.6" } - - { ruby: "2.5", mongoid: "6.4", bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", mongoid: "7.4", bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", mongoid: "7.5", bundler: "2", mongodb: "3.6" } - - { ruby: "2.7", mongoid: "7.5", bundler: "2", mongodb: "3.6" } - - { ruby: "3.0", mongoid: "8.0", bundler: "2", mongodb: "3.6" } - - { ruby: "3.1", mongoid: "8.0", bundler: "2", mongodb: "3.6" } - - { ruby: "2.5", mongoid: "6.4", bundler: "2", mongodb: "4.0" } - - { ruby: "2.6", mongoid: "7.4", bundler: "2", mongodb: "4.0" } - - { ruby: "2.6", mongoid: "7.5", bundler: "2", mongodb: "4.0" } - - { ruby: "2.7", mongoid: "7.5", bundler: "2", mongodb: "4.0" } - - { ruby: "3.0", mongoid: "8.0", bundler: "2", mongodb: "4.0" } - - { ruby: "3.1", mongoid: "8.0", bundler: "2", mongodb: "4.0" } - - { ruby: "2.5", mongoid: "6.4", bundler: "2", mongodb: "4.2" } - - { ruby: "2.6", mongoid: "7.4", bundler: "2", mongodb: "4.2" } - - { ruby: "2.6", mongoid: "7.5", bundler: "2", mongodb: "4.2" } - - { ruby: "2.7", mongoid: "7.5", bundler: "2", mongodb: "4.2" } - - { ruby: "3.0", mongoid: "8.0", bundler: "2", mongodb: "4.2" } - - { ruby: "3.1", mongoid: "8.0", bundler: "2", mongodb: "4.2" } - - { ruby: "2.5", mongoid: "6.4", bundler: "2", mongodb: "4.4" } - - { ruby: "2.6", mongoid: "7.4", bundler: "2", mongodb: "4.4" } - - { ruby: "2.6", mongoid: "7.5", bundler: "2", mongodb: "4.4" } - - { ruby: "2.7", mongoid: "7.5", bundler: "2", mongodb: "4.4" } - - { ruby: "3.0", mongoid: "8.0", bundler: "2", mongodb: "4.4" } - - { ruby: "3.1", mongoid: "8.0", bundler: "2", mongodb: "4.4" } - - { ruby: "2.5", mongoid: "6.4", bundler: "2", mongodb: "5.0" } - - { ruby: "2.6", mongoid: "7.4", bundler: "2", mongodb: "5.0" } - - { ruby: "2.6", mongoid: "7.5", bundler: "2", mongodb: "5.0" } - - { ruby: "2.7", mongoid: "7.5", bundler: "2", mongodb: "5.0" } - - { ruby: "3.0", mongoid: "8.0", bundler: "2", mongodb: "5.0" } - - { ruby: "3.1", mongoid: "8.0", bundler: "2", mongodb: "5.0" } - - { ruby: "3.1", mongoid: "9.0", bundler: "2", mongodb: "5.0" } + - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } + - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } + - { ruby: "2.1", gemfile: 'mongoid_4', bundler: "1", mongodb: "3.6" } + - { ruby: "2.2", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } + - { ruby: "2.2", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } + - { ruby: "2.3", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } + - { ruby: "2.4", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } + - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } + - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } + - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } + - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "3.6" } + - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "3.6" } + - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } + - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } + - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.0" } + - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.0" } + - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.2" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } + - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } + - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.2" } + - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.2" } + - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.4" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } + - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } + - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.4" } + - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.4" } + - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "5.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } + - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } + - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "5.0" } + - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "5.0" } + - { ruby: "3.1", gemfile: 'mongoid_9', bundler: "2", mongodb: "5.0" } steps: - - name: repo checkout - uses: actions/checkout@v2 - - - name: start mongodb - uses: supercharge/mongodb-github-action@1.6.0 + - name: Set up MongoDB ${{ matrix.entry.mongodb }} + uses: supercharge/mongodb-github-action@1.8.0 with: mongodb-version: ${{ matrix.entry.mongodb }} - mongodb-replica-set: rs0 - - - name: load ruby + - uses: actions/checkout@v3 + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.entry.ruby }} - bundler: ${{ matrix.entry.bundler }} - - - name: bundle install - run: bundle install --jobs 4 --retry 3 - env: - MONGOID_VERSION: ${{ matrix.entry.mongoid }} - - - name: test - timeout-minutes: 10 - run: bundle exec rspec spec - continue-on-error: false - env: - MONGOID_VERSION: ${{ matrix.entry.mongoid }} + bundler: '${{ matrix.entry.bundler || 1 }}' + bundler-cache: true + - name: Run tests + run: bundle exec rake \ No newline at end of file diff --git a/.gitignore b/.gitignore index a3e145b..d7ef0ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Gemfile.lock pkg +gemfiles/*.gemfile.lock \ No newline at end of file diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 592b2ca..82d0159 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -11,6 +11,15 @@ Metrics/LineLength: Max: 118 +Gemspec/RequiredRubyVersion: + Exclude: + - 'mongoid-compatibility.gemspec' + +Metrics/BlockLength: + Exclude: + - 'spec/**/*' + - 'test/**/*' + # Offense count: 4 Style/Documentation: Exclude: diff --git a/.travis.yml b/.travis.yml index 946b5bc..6c5f0e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,27 +7,22 @@ matrix: script: - bundle exec danger - rvm: 2.4.0 - env: - - MONGOID_VERSION=7 + gemfile: gemfiles/mongoid_9.gemfile - rvm: 2.4.0 - env: - - MONGOID_VERSION=6 + gemfile: gemfiles/mongoid_8.gemfile + - rvm: 2.4.0 + gemfile: gemfiles/mongoid_7.gemfile + - rvm: 2.4.0 + gemfile: gemfiles/mongoid_6.gemfile - rvm: 2.3.1 - env: - - MONGOID_VERSION=6 + gemfile: gemfiles/mongoid_6.gemfile - rvm: 2.3.1 - env: - - MONGOID_VERSION=5 + gemfile: gemfiles/mongoid_5.gemfile - rvm: 2.3.1 - env: - - MONGOID_VERSION=4 + gemfile: gemfiles/mongoid_4.gemfile - rvm: 2.3.1 - env: - - MONGOID_VERSION=3 + gemfile: gemfiles/mongoid_3.gemfile - rvm: 2.3.1 - env: - - MONGOID_VERSION=2 + gemfile: gemfiles/mongoid_2.gemfile - rvm: 2.3.1 - env: - - MONGOID_VERSION=HEAD - - rvm: 2.3.0 + gemfile: gemfiles/mongoid_head.gemfile \ No newline at end of file diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..b7b2546 --- /dev/null +++ b/Appraisals @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +appraise 'mongoid-9' do + gem 'mongoid', '~> 9.0.0' +end + +appraise 'mongoid-8' do + gem 'mongoid', '~> 8.0.0' +end + +appraise 'mongoid-7' do + gem 'mongoid', '~> 7.0.0' +end + +appraise 'mongoid-6' do + gem 'mongoid', '~> 6.0.2' +end + +appraise 'mongoid-5' do + gem 'mongoid', '~> 5.0.0' +end + +appraise 'mongoid-4' do + gem 'mongoid', '~> 4.0.0' +end + +appraise 'mongoid-3' do + gem 'mongoid', '~> 3.0.0' +end + +appraise 'mongoid-2' do + gem 'mongoid', '~> 2.0.0' + gem 'bson_ext', platforms: :ruby +end diff --git a/Dangerfile b/Dangerfile index 6248c90..de2a4a0 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1 +1,3 @@ +# frozen_string_literal: true + danger.import_dangerfile(gem: 'mongoid-danger') diff --git a/Gemfile b/Gemfile index eeb0724..f7200f1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,36 +1,5 @@ +# frozen_string_literal: true + source 'http://rubygems.org' gemspec - -case version = ENV['MONGOID_VERSION'] || '9.0.0' -when 'HEAD' - gem 'mongoid', github: 'mongodb/mongoid' -when /^9/ - gem 'mongoid', '~> 9.0' -when /^8/ - gem 'mongoid', '~> 8.0' -when /^7/ - gem 'mongoid', '~> 7.0' -when /^6/ - gem 'mongoid', '~> 6.0' -when /^5/ - gem 'mongoid', '~> 5.0' -when /^4/ - gem 'mongoid', '~> 4.0' -when /^3/ - gem 'mongoid', '~> 3.1' -when /^2/ - gem 'mongoid', '~> 2.0' - gem 'bson_ext', platforms: :ruby -else - gem 'mongoid', version -end - -group :test do - gem 'rspec' -end - -group :development do - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end diff --git a/Rakefile b/Rakefile index e0bc807..dd0ed12 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rubygems' require 'bundler/gem_tasks' @@ -13,4 +15,4 @@ end require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) -task default: [:rubocop, :spec] +task default: %i[rubocop spec] diff --git a/gemfiles/mongoid_2.gemfile b/gemfiles/mongoid_2.gemfile new file mode 100644 index 0000000..3764283 --- /dev/null +++ b/gemfiles/mongoid_2.gemfile @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'bson_ext', platforms: :ruby +gem 'mongoid', '~> 2.0.0' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_3.gemfile b/gemfiles/mongoid_3.gemfile new file mode 100644 index 0000000..58f925d --- /dev/null +++ b/gemfiles/mongoid_3.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', '~> 3.0.0' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_4.gemfile b/gemfiles/mongoid_4.gemfile new file mode 100644 index 0000000..9691499 --- /dev/null +++ b/gemfiles/mongoid_4.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', '~> 4.0.0' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_5.gemfile b/gemfiles/mongoid_5.gemfile new file mode 100644 index 0000000..5f91618 --- /dev/null +++ b/gemfiles/mongoid_5.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', '~> 5.0.0' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_6.gemfile b/gemfiles/mongoid_6.gemfile new file mode 100644 index 0000000..5ee5a1d --- /dev/null +++ b/gemfiles/mongoid_6.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', '~> 6.0.2' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_7.gemfile b/gemfiles/mongoid_7.gemfile new file mode 100644 index 0000000..7dd828b --- /dev/null +++ b/gemfiles/mongoid_7.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', '~> 7.0.0' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_8.gemfile b/gemfiles/mongoid_8.gemfile new file mode 100644 index 0000000..bf99987 --- /dev/null +++ b/gemfiles/mongoid_8.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', '~> 8.0.0' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_9.gemfile b/gemfiles/mongoid_9.gemfile new file mode 100644 index 0000000..c70d153 --- /dev/null +++ b/gemfiles/mongoid_9.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', '~> 9.0.0' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/gemfiles/mongoid_head.gemfile b/gemfiles/mongoid_head.gemfile new file mode 100644 index 0000000..1879836 --- /dev/null +++ b/gemfiles/mongoid_head.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source 'http://rubygems.org' + +gem 'mongoid', github: 'mongodb/mongoid' + +group :development do + gem 'appraisal', '~> 2.0' + gem 'rake', '< 12' + gem 'rubocop', '0.33.0' +end + +group :test do + gem 'rspec' +end + +gemspec path: '../' diff --git a/lib/mongoid-compatibility.rb b/lib/mongoid-compatibility.rb index 02ccf09..330b1be 100644 --- a/lib/mongoid-compatibility.rb +++ b/lib/mongoid-compatibility.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require 'mongoid/compatibility' diff --git a/lib/mongoid/compatibility.rb b/lib/mongoid/compatibility.rb index dca7f6c..2fd5fe7 100644 --- a/lib/mongoid/compatibility.rb +++ b/lib/mongoid/compatibility.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'mongoid' require 'mongoid/compatibility/self' require 'mongoid/compatibility/version' diff --git a/lib/mongoid/compatibility/object_id.rb b/lib/mongoid/compatibility/object_id.rb index 2286f43..83c883a 100644 --- a/lib/mongoid/compatibility/object_id.rb +++ b/lib/mongoid/compatibility/object_id.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Mongoid module Compatibility module ObjectId diff --git a/lib/mongoid/compatibility/self.rb b/lib/mongoid/compatibility/self.rb index ff4a7c2..3878c04 100644 --- a/lib/mongoid/compatibility/self.rb +++ b/lib/mongoid/compatibility/self.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Mongoid module Compatibility - VERSION = '1.0.0'.freeze + VERSION = '1.0.0' end end diff --git a/lib/mongoid/compatibility/version.rb b/lib/mongoid/compatibility/version.rb index 9577e13..903f90f 100644 --- a/lib/mongoid/compatibility/version.rb +++ b/lib/mongoid/compatibility/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Mongoid module Compatibility module Version diff --git a/lib/mongoid_compatibility.rb b/lib/mongoid_compatibility.rb index 0ff1095..988aced 100644 --- a/lib/mongoid_compatibility.rb +++ b/lib/mongoid_compatibility.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require 'mongoid-compatibility' diff --git a/mongoid-compatibility.gemspec b/mongoid-compatibility.gemspec index 926e480..042a88f 100644 --- a/mongoid-compatibility.gemspec +++ b/mongoid-compatibility.gemspec @@ -1,4 +1,6 @@ -$LOAD_PATH.push File.expand_path('../lib', __FILE__) +# frozen_string_literal: true + +$LOAD_PATH.push File.expand_path('lib', __dir__) require 'mongoid/compatibility/self' Gem::Specification.new do |s| @@ -13,6 +15,11 @@ Gem::Specification.new do |s| s.homepage = 'http://github.com/mongoid/mongoid-compatibility' s.licenses = ['MIT'] s.summary = 'Compatibility helpers for Mongoid.' - s.add_dependency 'mongoid', '>= 2.0' s.add_dependency 'activesupport' + s.add_dependency 'mongoid', '>= 2.0' + + s.add_development_dependency 'appraisal', '~> 2.0' + s.add_development_dependency 'rake', '< 12' + s.add_development_dependency 'rspec' + s.add_development_dependency 'rubocop', '~> 1.36.0' end diff --git a/spec/mongoid/compatibility/object_id_spec.rb b/spec/mongoid/compatibility/object_id_spec.rb index 8f3bee3..1fdfd88 100644 --- a/spec/mongoid/compatibility/object_id_spec.rb +++ b/spec/mongoid/compatibility/object_id_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Mongoid::Compatibility::ObjectId do diff --git a/spec/mongoid/compatibility/self_spec.rb b/spec/mongoid/compatibility/self_spec.rb index e0f9e0b..9f2d82d 100644 --- a/spec/mongoid/compatibility/self_spec.rb +++ b/spec/mongoid/compatibility/self_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Mongoid::Compatibility do diff --git a/spec/mongoid/compatibility/version_spec.rb b/spec/mongoid/compatibility/version_spec.rb index 1f54fa1..7307e34 100644 --- a/spec/mongoid/compatibility/version_spec.rb +++ b/spec/mongoid/compatibility/version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Mongoid::Compatibility::Version do @@ -34,7 +36,7 @@ (2..9).each do |v| context "mongoid #{v}" do before do - stub_const('::Mongoid::VERSION', "#{v}") + stub_const('::Mongoid::VERSION', v.to_s) stub_const("::Mongoid::Compatibility::Version::ClassMethods::V#{v}", 1) end it "responds to mongoid#{v}?" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b2fdf4c..34dacb1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'rubygems' diff --git a/spec/support/mongoid.rb b/spec/support/mongoid.rb index ab89ab2..76da823 100644 --- a/spec/support/mongoid.rb +++ b/spec/support/mongoid.rb @@ -1,4 +1,4 @@ -ENV['MONGOID_ENV'] = 'test' +# frozen_string_literal: true if Mongoid::Compatibility::Version.mongoid2? Mongoid.load! 'spec/config/mongoid2.yml' @@ -17,7 +17,7 @@ elsif Mongoid::Compatibility::Version.mongoid9? Mongoid.load! 'spec/config/mongoid9.yml' else - fail "unsupported Mongoid version #{Mongoid::VERSION}" + raise "unsupported Mongoid version #{Mongoid::VERSION}" end RSpec.configure do |config| From 7c3cd60f907d717b1e2c4f170a0ae19934773c88 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sat, 15 Jun 2024 16:47:34 -0700 Subject: [PATCH 07/21] update test name in test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c908c03..482172e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: build: name: >- - Mongoid Test with: (ruby=${{ matrix.entry.ruby }}, mongodb=${{ matrix.entry.mongodb }}), gemfile=${{ matrix.entry.gemfile }}) + Mongoid Test with: - Ruby ${{ matrix.entry.ruby }} - MongoDB ${{ matrix.entry.mongodb }} - Gemfile ${{ matrix.entry.gemfile }}) env: CI: true BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile From 8f82ddc2fe993c0a834b4c3ec7ea92f2f70f9ed3 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sat, 15 Jun 2024 17:07:11 -0700 Subject: [PATCH 08/21] restore TESTOPTS environment variable --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 482172e..d40907e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,6 +8,7 @@ jobs: Mongoid Test with: - Ruby ${{ matrix.entry.ruby }} - MongoDB ${{ matrix.entry.mongodb }} - Gemfile ${{ matrix.entry.gemfile }}) env: CI: true + TESTOPTS: "-v" BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile runs-on: ubuntu-latest continue-on-error: false From 63a158b8d35da629b69923f1d415466eb19ba30e Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sat, 15 Jun 2024 17:11:22 -0700 Subject: [PATCH 09/21] set rack_env environment variable in spec helper --- spec/spec_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 34dacb1..4b1189c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +ENV['RACK_ENV'] = 'test' + $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'rubygems' From 23584e70f3056e0f67e5e17735abc47ece5a97ab Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sat, 15 Jun 2024 18:52:20 -0700 Subject: [PATCH 10/21] change RACK_ENV to MONGOID_ENV --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4b1189c..94790a9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -ENV['RACK_ENV'] = 'test' +ENV['MONGOID_ENV'] = 'test' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) From fbfbb1f1224c26e26fbaa331d67bb9025e368d63 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 13:01:16 -0700 Subject: [PATCH 11/21] downgrade rubocop --- .github/workflows/test.yml | 4 ++-- Rakefile | 2 +- mongoid-compatibility.gemspec | 2 +- spec/support/mongoid.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d40907e..8a1ae39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,8 +18,8 @@ jobs: - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } - { ruby: "2.1", gemfile: 'mongoid_4', bundler: "1", mongodb: "3.6" } - - { ruby: "2.2", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } - - { ruby: "2.2", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } + - { ruby: "2.2", gemfile: 'mongoid_4', bundler: "1", mongodb: "3.6" } + - { ruby: "2.2", gemfile: 'mongoid_5', bundler: "1", mongodb: "3.6" } - { ruby: "2.3", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - { ruby: "2.4", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } diff --git a/Rakefile b/Rakefile index dd0ed12..bb43e12 100644 --- a/Rakefile +++ b/Rakefile @@ -15,4 +15,4 @@ end require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) -task default: %i[rubocop spec] +task default: [:rubocop, :spec] diff --git a/mongoid-compatibility.gemspec b/mongoid-compatibility.gemspec index 042a88f..dd0f2ca 100644 --- a/mongoid-compatibility.gemspec +++ b/mongoid-compatibility.gemspec @@ -21,5 +21,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'appraisal', '~> 2.0' s.add_development_dependency 'rake', '< 12' s.add_development_dependency 'rspec' - s.add_development_dependency 'rubocop', '~> 1.36.0' + s.add_development_dependency 'rubocop', '0.33.0' end diff --git a/spec/support/mongoid.rb b/spec/support/mongoid.rb index 76da823..0d3842b 100644 --- a/spec/support/mongoid.rb +++ b/spec/support/mongoid.rb @@ -17,7 +17,7 @@ elsif Mongoid::Compatibility::Version.mongoid9? Mongoid.load! 'spec/config/mongoid9.yml' else - raise "unsupported Mongoid version #{Mongoid::VERSION}" + fail "unsupported Mongoid version #{Mongoid::VERSION}" end RSpec.configure do |config| From 636e5d8237bff067e3fbac83ab6df4f4e8cea20b Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 13:05:37 -0700 Subject: [PATCH 12/21] update bundler to 2 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a1ae39..d40907e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,8 +18,8 @@ jobs: - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } - { ruby: "2.1", gemfile: 'mongoid_4', bundler: "1", mongodb: "3.6" } - - { ruby: "2.2", gemfile: 'mongoid_4', bundler: "1", mongodb: "3.6" } - - { ruby: "2.2", gemfile: 'mongoid_5', bundler: "1", mongodb: "3.6" } + - { ruby: "2.2", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } + - { ruby: "2.2", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - { ruby: "2.3", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - { ruby: "2.4", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } From 9db708f65ee7a32879c17d97713ebc11bbe57298 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 13:11:30 -0700 Subject: [PATCH 13/21] remove travis.yml --- .github/workflows/test.yml | 1 - .travis.yml | 28 ---------------------------- 2 files changed, 29 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d40907e..f9440e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: entry: - - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } - { ruby: "2.1", gemfile: 'mongoid_4', bundler: "1", mongodb: "3.6" } - { ruby: "2.2", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6c5f0e6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -services: - - mongodb - -matrix: - include: - - rvm: 2.3.1 - script: - - bundle exec danger - - rvm: 2.4.0 - gemfile: gemfiles/mongoid_9.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/mongoid_8.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/mongoid_7.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/mongoid_6.gemfile - - rvm: 2.3.1 - gemfile: gemfiles/mongoid_6.gemfile - - rvm: 2.3.1 - gemfile: gemfiles/mongoid_5.gemfile - - rvm: 2.3.1 - gemfile: gemfiles/mongoid_4.gemfile - - rvm: 2.3.1 - gemfile: gemfiles/mongoid_3.gemfile - - rvm: 2.3.1 - gemfile: gemfiles/mongoid_2.gemfile - - rvm: 2.3.1 - gemfile: gemfiles/mongoid_head.gemfile \ No newline at end of file From bbae9ac19d84afb088eccc814d6e369ee10f2f1f Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 13:13:56 -0700 Subject: [PATCH 14/21] commit new appraisal files, fix rubocop --- Rakefile | 2 +- gemfiles/mongoid_2.gemfile | 10 ---------- gemfiles/mongoid_3.gemfile | 10 ---------- gemfiles/mongoid_4.gemfile | 10 ---------- gemfiles/mongoid_5.gemfile | 10 ---------- gemfiles/mongoid_6.gemfile | 10 ---------- gemfiles/mongoid_7.gemfile | 10 ---------- gemfiles/mongoid_8.gemfile | 10 ---------- gemfiles/mongoid_9.gemfile | 10 ---------- mongoid-compatibility.gemspec | 2 +- spec/support/mongoid.rb | 2 +- 11 files changed, 3 insertions(+), 83 deletions(-) diff --git a/Rakefile b/Rakefile index bb43e12..dd0ed12 100644 --- a/Rakefile +++ b/Rakefile @@ -15,4 +15,4 @@ end require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) -task default: [:rubocop, :spec] +task default: %i[rubocop spec] diff --git a/gemfiles/mongoid_2.gemfile b/gemfiles/mongoid_2.gemfile index 3764283..95fac4d 100644 --- a/gemfiles/mongoid_2.gemfile +++ b/gemfiles/mongoid_2.gemfile @@ -7,14 +7,4 @@ source 'http://rubygems.org' gem 'bson_ext', platforms: :ruby gem 'mongoid', '~> 2.0.0' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/gemfiles/mongoid_3.gemfile b/gemfiles/mongoid_3.gemfile index 58f925d..e0063e8 100644 --- a/gemfiles/mongoid_3.gemfile +++ b/gemfiles/mongoid_3.gemfile @@ -6,14 +6,4 @@ source 'http://rubygems.org' gem 'mongoid', '~> 3.0.0' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/gemfiles/mongoid_4.gemfile b/gemfiles/mongoid_4.gemfile index 9691499..4d1118d 100644 --- a/gemfiles/mongoid_4.gemfile +++ b/gemfiles/mongoid_4.gemfile @@ -6,14 +6,4 @@ source 'http://rubygems.org' gem 'mongoid', '~> 4.0.0' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/gemfiles/mongoid_5.gemfile b/gemfiles/mongoid_5.gemfile index 5f91618..2371eb0 100644 --- a/gemfiles/mongoid_5.gemfile +++ b/gemfiles/mongoid_5.gemfile @@ -6,14 +6,4 @@ source 'http://rubygems.org' gem 'mongoid', '~> 5.0.0' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/gemfiles/mongoid_6.gemfile b/gemfiles/mongoid_6.gemfile index 5ee5a1d..5d2e757 100644 --- a/gemfiles/mongoid_6.gemfile +++ b/gemfiles/mongoid_6.gemfile @@ -6,14 +6,4 @@ source 'http://rubygems.org' gem 'mongoid', '~> 6.0.2' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/gemfiles/mongoid_7.gemfile b/gemfiles/mongoid_7.gemfile index 7dd828b..268f273 100644 --- a/gemfiles/mongoid_7.gemfile +++ b/gemfiles/mongoid_7.gemfile @@ -6,14 +6,4 @@ source 'http://rubygems.org' gem 'mongoid', '~> 7.0.0' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/gemfiles/mongoid_8.gemfile b/gemfiles/mongoid_8.gemfile index bf99987..98bc4d7 100644 --- a/gemfiles/mongoid_8.gemfile +++ b/gemfiles/mongoid_8.gemfile @@ -6,14 +6,4 @@ source 'http://rubygems.org' gem 'mongoid', '~> 8.0.0' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/gemfiles/mongoid_9.gemfile b/gemfiles/mongoid_9.gemfile index c70d153..3e271b2 100644 --- a/gemfiles/mongoid_9.gemfile +++ b/gemfiles/mongoid_9.gemfile @@ -6,14 +6,4 @@ source 'http://rubygems.org' gem 'mongoid', '~> 9.0.0' -group :development do - gem 'appraisal', '~> 2.0' - gem 'rake', '< 12' - gem 'rubocop', '0.33.0' -end - -group :test do - gem 'rspec' -end - gemspec path: '../' diff --git a/mongoid-compatibility.gemspec b/mongoid-compatibility.gemspec index dd0f2ca..042a88f 100644 --- a/mongoid-compatibility.gemspec +++ b/mongoid-compatibility.gemspec @@ -21,5 +21,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'appraisal', '~> 2.0' s.add_development_dependency 'rake', '< 12' s.add_development_dependency 'rspec' - s.add_development_dependency 'rubocop', '0.33.0' + s.add_development_dependency 'rubocop', '~> 1.36.0' end diff --git a/spec/support/mongoid.rb b/spec/support/mongoid.rb index 0d3842b..76da823 100644 --- a/spec/support/mongoid.rb +++ b/spec/support/mongoid.rb @@ -17,7 +17,7 @@ elsif Mongoid::Compatibility::Version.mongoid9? Mongoid.load! 'spec/config/mongoid9.yml' else - fail "unsupported Mongoid version #{Mongoid::VERSION}" + raise "unsupported Mongoid version #{Mongoid::VERSION}" end RSpec.configure do |config| From 16f5f8e8658adb0b2a004d1067f274e43c894480 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 13:35:54 -0700 Subject: [PATCH 15/21] upgrade to ruby 2.4 --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9440e8..bc8fd7b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,11 +15,11 @@ jobs: strategy: matrix: entry: - - { ruby: "2.1", gemfile: 'mongoid_3', bundler: "1", mongodb: "3.6" } - - { ruby: "2.1", gemfile: 'mongoid_4', bundler: "1", mongodb: "3.6" } - - { ruby: "2.2", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } - - { ruby: "2.2", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - - { ruby: "2.3", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } + - { ruby: "2.4", gemfile: 'mongoid_3', bundler: "2", mongodb: "3.6" } + - { ruby: "2.4", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } + - { ruby: "2.4", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } + - { ruby: "2.4", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } + - { ruby: "2.4", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - { ruby: "2.4", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } From b302f044e7cf97687204a2cc9c498e412f543090 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 13:43:58 -0700 Subject: [PATCH 16/21] upgrade minimum ruby version --- .github/workflows/test.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc8fd7b..967dd74 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,38 +15,38 @@ jobs: strategy: matrix: entry: - - { ruby: "2.4", gemfile: 'mongoid_3', bundler: "2", mongodb: "3.6" } - - { ruby: "2.4", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } - - { ruby: "2.4", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } - - { ruby: "2.4", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - - { ruby: "2.4", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - - { ruby: "2.4", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_3', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "3.6" } - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "3.6" } - - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.0" } + - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.0" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.0" } - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.0" } - - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.2" } + - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.2" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.2" } - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.2" } - - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.4" } + - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.4" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.4" } - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.4" } - - { ruby: "2.5", gemfile: 'mongoid_6', bundler: "2", mongodb: "5.0" } + - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "5.0" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } From b84ac8a1b9e0bc7acc16fcb8cb5fdbc1c78cdb06 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 17:23:38 -0700 Subject: [PATCH 17/21] update readme, add token for danger --- .github/workflows/danger.yml | 12 +++++------- README.md | 4 +++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 1d67029..6288c0a 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -3,17 +3,15 @@ on: [pull_request] jobs: danger: runs-on: ubuntu-latest - env: - BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 2.7 bundler-cache: true - run: | - # the personal token is public, this is ok, base64 encode to avoid tripping Github - TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode) - DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose + # Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub + TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode) + DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose \ No newline at end of file diff --git a/README.md b/README.md index ff87b9b..c6c9e28 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ Mongoid::Compatibility [![Build Status](https://github.com/mongoid/mongoid-compatibility/actions/workflows/test.yml/badge.svg)](https://github.com/mongoid/mongoid-compatibility/actions) [![Code Climate](https://codeclimate.com/github/mongoid/mongoid-compatibility.svg)](https://codeclimate.com/github/mongoid/mongoid-compatibility) -Compatibility helpers for Mongoid versions 2, 3, 4, 5, 6, 7, and 8. +[Tested](https://github.com/mongoid/mongoid-locker/actions) against: +- MRI: `2.6.x`, `2.7.x`, `3.0.x`, `3.1.x`, `3.2.x` +- Compatibility helpers for Mongoid versions 2, 3, 4, 5, 6, 7, and 8. ### Install From 7bb0c405a86ea017af02816b9e0ff7ba78be9f17 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 17:27:08 -0700 Subject: [PATCH 18/21] remove bundler 2 in matrix --- .github/workflows/test.yml | 78 +++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 967dd74..c144e9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,44 +15,44 @@ jobs: strategy: matrix: entry: - - { ruby: "2.6", gemfile: 'mongoid_3', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_4', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_5', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } - - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "3.6" } - - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "3.6" } - - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "3.6" } - - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.0" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } - - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.0" } - - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.0" } - - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.0" } - - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.2" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } - - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.2" } - - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.2" } - - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.2" } - - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "4.4" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } - - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "4.4" } - - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.4" } - - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "4.4" } - - { ruby: "2.6", gemfile: 'mongoid_6', bundler: "2", mongodb: "5.0" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } - - { ruby: "2.6", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } - - { ruby: "2.7", gemfile: 'mongoid_7', bundler: "2", mongodb: "5.0" } - - { ruby: "3.0", gemfile: 'mongoid_8', bundler: "2", mongodb: "5.0" } - - { ruby: "3.1", gemfile: 'mongoid_8', bundler: "2", mongodb: "5.0" } - - { ruby: "3.1", gemfile: 'mongoid_9', bundler: "2", mongodb: "5.0" } + - { ruby: "2.6", gemfile: 'mongoid_3', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_4', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_4', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_5', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_5', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "3.6" } + - { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "3.6" } + - { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "3.6" } + - { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "3.6" } + - { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.0" } + - { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.0" } + - { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.0" } + - { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.0" } + - { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.2" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.2" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.2" } + - { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.2" } + - { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.2" } + - { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.2" } + - { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.4" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.4" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.4" } + - { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.4" } + - { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.4" } + - { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.4" } + - { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "5.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "5.0" } + - { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "5.0" } + - { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "5.0" } + - { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "5.0" } + - { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "5.0" } + - { ruby: "3.1", gemfile: 'mongoid_9', mongodb: "5.0" } steps: - name: Set up MongoDB ${{ matrix.entry.mongodb }} uses: supercharge/mongodb-github-action@1.8.0 @@ -63,7 +63,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.entry.ruby }} - bundler: '${{ matrix.entry.bundler || 1 }}' + bundler: '2' bundler-cache: true - name: Run tests run: bundle exec rake \ No newline at end of file From 34f9dbe860eda152450b6d53cc5e06b83eae7d60 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 17:35:43 -0700 Subject: [PATCH 19/21] add mongoid-danger as a development dependency --- mongoid-compatibility.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/mongoid-compatibility.gemspec b/mongoid-compatibility.gemspec index 042a88f..3b9fbc0 100644 --- a/mongoid-compatibility.gemspec +++ b/mongoid-compatibility.gemspec @@ -22,4 +22,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'rake', '< 12' s.add_development_dependency 'rspec' s.add_development_dependency 'rubocop', '~> 1.36.0' + s.add_development_dependency 'mongoid-danger', '~> 0.2' end From 696deee46f4cbf570803dc51dde13b14a965af9f Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 17:38:49 -0700 Subject: [PATCH 20/21] move dependency --- mongoid-compatibility.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoid-compatibility.gemspec b/mongoid-compatibility.gemspec index 3b9fbc0..d1a4e0e 100644 --- a/mongoid-compatibility.gemspec +++ b/mongoid-compatibility.gemspec @@ -19,8 +19,8 @@ Gem::Specification.new do |s| s.add_dependency 'mongoid', '>= 2.0' s.add_development_dependency 'appraisal', '~> 2.0' + s.add_development_dependency 'mongoid-danger', '~> 0.2' s.add_development_dependency 'rake', '< 12' s.add_development_dependency 'rspec' s.add_development_dependency 'rubocop', '~> 1.36.0' - s.add_development_dependency 'mongoid-danger', '~> 0.2' end From 709989d0fd1e9214908f66795bcdafd9b7084761 Mon Sep 17 00:00:00 2001 From: Sai Srinivasan Date: Sun, 16 Jun 2024 18:02:53 -0700 Subject: [PATCH 21/21] update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6c9e28..978a6d1 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ Mongoid::Compatibility [![Build Status](https://github.com/mongoid/mongoid-compatibility/actions/workflows/test.yml/badge.svg)](https://github.com/mongoid/mongoid-compatibility/actions) [![Code Climate](https://codeclimate.com/github/mongoid/mongoid-compatibility.svg)](https://codeclimate.com/github/mongoid/mongoid-compatibility) -[Tested](https://github.com/mongoid/mongoid-locker/actions) against: -- MRI: `2.6.x`, `2.7.x`, `3.0.x`, `3.1.x`, `3.2.x` -- Compatibility helpers for Mongoid versions 2, 3, 4, 5, 6, 7, and 8. +[Tested](https://github.com/mongoid/mongoid-compatibility/actions) against: +- MRI: `2.6.x`, `2.7.x`, `3.0.x`, `3.1.x` +- Compatibility helpers for Mongoid versions 2, 3, 4, 5, 6, 7, 8, and 9. ### Install