From a0c1443b1e1c6f4e2257936c866996ed876eee07 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 8 Mar 2023 09:08:06 -0300 Subject: [PATCH 1/3] Reenable tests with mongoid on Rails 5 and up Devise hasn't been tested with Mongoid since Rails version 5, only 4.x was still running those tests. This enables the tests again on all currently supported Rails versions, with their respective mongoid supported versions. There were a couple of minor tweaks to make it happen, namely: * The way we were dropping the session before doesn't work in later versions so I changed back to calling `purge!` which appears to work fine. We used to call `Mongoid.purge!` but that changed in #4686. * Some of the configs in the Rails test app were setting Active Record values when outside of the AR ORM tests, updated those to make sure they are not set when running mongoid ORM tests. * The validations added to the shared admin code in tests were only checking for Rails version 5.1, but we need to use the same check for AR 5.1 that is used in code, otherwise it will try to use methods not available in mongoid there. I also had to lock the sqlite3 gem on Rails 6 versions to 1.5.x, due to it dropping support to Ruby 2.6 on v1.6+ now, and those Rails 6 versions need to support that Ruby version. Finally, I locked mongoid to v7.5+ but not allowing v8+ yet, there seems to be some change to dirty attributes that I need to look into which is making a handful of tests fail. For now, this should hopefully get us to green as step 1. --- .github/workflows/test.yml | 12 +-- Gemfile | 10 +- Gemfile.lock | 149 +++++++++++++++------------ gemfiles/Gemfile-rails-6-0 | 6 +- gemfiles/Gemfile-rails-6-1 | 6 +- gemfiles/Gemfile-rails-7-0 | 15 +-- gemfiles/Gemfile-rails-main | 4 + test/orm/mongoid.rb | 2 +- test/rails_app/config/application.rb | 6 +- 9 files changed, 111 insertions(+), 99 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1092fc61b3..42a71459ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,20 +25,10 @@ jobs: ruby: '2.7' # Rails > 7.1 supports Ruby >= 3.1 - gemfile: gemfiles/Gemfile-rails-main ruby: '3.0' # Rails > 7.1 supports Ruby >= 3.1 - - gemfile: Gemfile - env: DEVISE_ORM=mongoid - - gemfile: gemfiles/Gemfile-rails-main - env: DEVISE_ORM=mongoid - - gemfile: gemfiles/Gemfile-rails-7-0 - env: DEVISE_ORM=mongoid - - gemfile: gemfiles/Gemfile-rails-6-1 - env: DEVISE_ORM=mongoid - gemfile: gemfiles/Gemfile-rails-6-0 ruby: '3.2' - gemfile: gemfiles/Gemfile-rails-6-0 ruby: '3.1' - - gemfile: gemfiles/Gemfile-rails-6-0 - env: DEVISE_ORM=mongoid runs-on: ubuntu-latest env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ matrix.gemfile }} @@ -48,6 +38,6 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs bundle install and caches installed gems automatically - - uses: supercharge/mongodb-github-action@1.9.0 + - uses: supercharge/mongodb-github-action@1.10.0 if: ${{ matrix.env == 'DEVISE_ORM=mongoid' }} - run: bundle exec rake diff --git a/Gemfile b/Gemfile index 722eb59a0d..112cbce4d8 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ group :test do end platforms :ruby do - gem "sqlite3", "~> 1.4" + gem "sqlite3" end # platforms :jruby do @@ -32,7 +32,7 @@ end # gem "jruby-openssl" # end -# TODO: -# group :mongoid do -# gem "mongoid", "~> 4.0.0" -# end +group :mongoid do + # gem "mongoid", "~> 8.1" + gem "mongoid", github: "mongodb/mongoid", branch: "8.1-stable" +end diff --git a/Gemfile.lock b/Gemfile.lock index 92779c4c3d..48c5d9b4f5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,14 @@ +GIT + remote: https://github.com/mongodb/mongoid.git + revision: c12a285f78b291e4c62256aee0cc767f83fdc080 + branch: 8.1-stable + specs: + mongoid (8.1.2) + activemodel (>= 5.1, < 7.2, != 7.0.0) + concurrent-ruby (>= 1.0.5, < 2.0) + mongo (>= 2.18.0, < 3.0.0) + ruby2_keywords (~> 0.0.5) + GIT remote: https://github.com/rails/rails-controller-testing.git revision: c203673f8011a7cdc2a8edf995ae6b3eec3417ca @@ -20,70 +31,70 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.1.0) - actionpack (= 7.1.0) - activesupport (= 7.1.0) + actioncable (7.1.1) + actionpack (= 7.1.1) + activesupport (= 7.1.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.0) - actionpack (= 7.1.0) - activejob (= 7.1.0) - activerecord (= 7.1.0) - activestorage (= 7.1.0) - activesupport (= 7.1.0) + actionmailbox (7.1.1) + actionpack (= 7.1.1) + activejob (= 7.1.1) + activerecord (= 7.1.1) + activestorage (= 7.1.1) + activesupport (= 7.1.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.0) - actionpack (= 7.1.0) - actionview (= 7.1.0) - activejob (= 7.1.0) - activesupport (= 7.1.0) + actionmailer (7.1.1) + actionpack (= 7.1.1) + actionview (= 7.1.1) + activejob (= 7.1.1) + activesupport (= 7.1.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.0) - actionview (= 7.1.0) - activesupport (= 7.1.0) + actionpack (7.1.1) + actionview (= 7.1.1) + activesupport (= 7.1.1) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.0) - actionpack (= 7.1.0) - activerecord (= 7.1.0) - activestorage (= 7.1.0) - activesupport (= 7.1.0) + actiontext (7.1.1) + actionpack (= 7.1.1) + activerecord (= 7.1.1) + activestorage (= 7.1.1) + activesupport (= 7.1.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.0) - activesupport (= 7.1.0) + actionview (7.1.1) + activesupport (= 7.1.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.0) - activesupport (= 7.1.0) + activejob (7.1.1) + activesupport (= 7.1.1) globalid (>= 0.3.6) - activemodel (7.1.0) - activesupport (= 7.1.0) - activerecord (7.1.0) - activemodel (= 7.1.0) - activesupport (= 7.1.0) + activemodel (7.1.1) + activesupport (= 7.1.1) + activerecord (7.1.1) + activemodel (= 7.1.1) + activesupport (= 7.1.1) timeout (>= 0.4.0) - activestorage (7.1.0) - actionpack (= 7.1.0) - activejob (= 7.1.0) - activerecord (= 7.1.0) - activesupport (= 7.1.0) + activestorage (7.1.1) + actionpack (= 7.1.1) + activejob (= 7.1.1) + activerecord (= 7.1.1) + activesupport (= 7.1.1) marcel (~> 1.0) - activesupport (7.1.0) + activesupport (7.1.1) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -96,6 +107,7 @@ GEM base64 (0.1.1) bcrypt (3.1.19) bigdecimal (3.1.4) + bson (4.15.0) builder (3.2.4) concurrent-ruby (1.2.2) connection_pool (2.4.1) @@ -115,11 +127,11 @@ GEM i18n (1.14.1) concurrent-ruby (~> 1.0) io-console (0.6.0) - irb (1.8.1) + irb (1.8.2) rdoc reline (>= 0.3.8) jwt (2.7.1) - loofah (2.21.3) + loofah (2.21.4) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -133,6 +145,8 @@ GEM minitest (5.20.0) mocha (2.1.0) ruby2_keywords (>= 0.0.5) + mongo (2.19.1) + bson (>= 4.14.1, < 5.0.0) multi_xml (0.6.0) mutex_m (0.1.2) net-imap (0.4.1) @@ -168,36 +182,36 @@ GEM omniauth (>= 1.0, < 3.0) rack-openid (~> 1.4.0) orm_adapter (0.5.0) - psych (5.1.0) + psych (5.1.1) stringio racc (1.7.1) - rack (2.2.8) + rack (3.0.8) rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-protection (3.1.0) - rack (~> 2.2, >= 2.2.4) - rack-session (1.0.1) - rack (< 3) + rack-protection (3.0.6) + rack + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (1.0.0) - rack (< 3) - webrick - rails (7.1.0) - actioncable (= 7.1.0) - actionmailbox (= 7.1.0) - actionmailer (= 7.1.0) - actionpack (= 7.1.0) - actiontext (= 7.1.0) - actionview (= 7.1.0) - activejob (= 7.1.0) - activemodel (= 7.1.0) - activerecord (= 7.1.0) - activestorage (= 7.1.0) - activesupport (= 7.1.0) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.1) + actioncable (= 7.1.1) + actionmailbox (= 7.1.1) + actionmailer (= 7.1.1) + actionpack (= 7.1.1) + actiontext (= 7.1.1) + actionview (= 7.1.1) + activejob (= 7.1.1) + activemodel (= 7.1.1) + activerecord (= 7.1.1) + activestorage (= 7.1.1) + activesupport (= 7.1.1) bundler (>= 1.15.0) - railties (= 7.1.0) + railties (= 7.1.1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -205,9 +219,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.0) - actionpack (= 7.1.0) - activesupport (= 7.1.0) + railties (7.1.1) + actionpack (= 7.1.1) + activesupport (= 7.1.1) irb rackup (>= 1.0.0) rake (>= 12.2) @@ -218,7 +232,7 @@ GEM psych (>= 4.0.0) reline (0.3.9) io-console (~> 0.5) - responders (3.1.0) + responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) rexml (3.2.6) @@ -227,7 +241,7 @@ GEM snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - sqlite3 (1.6.6) + sqlite3 (1.6.7) mini_portile2 (~> 2.8.0) stringio (3.0.8) thor (1.2.2) @@ -254,6 +268,7 @@ PLATFORMS DEPENDENCIES devise! mocha (~> 2.1) + mongoid! omniauth omniauth-facebook omniauth-oauth2 @@ -263,7 +278,7 @@ DEPENDENCIES rdoc responders (~> 3.1) rexml - sqlite3 (~> 1.4) + sqlite3 timecop webrat (= 0.7.3) diff --git a/gemfiles/Gemfile-rails-6-0 b/gemfiles/Gemfile-rails-6-0 index b6afb67239..f42e3bf83d 100644 --- a/gemfiles/Gemfile-rails-6-0 +++ b/gemfiles/Gemfile-rails-6-0 @@ -21,5 +21,9 @@ group :test do end platforms :ruby do - gem "sqlite3", "~> 1.4" + gem "sqlite3" +end + +group :mongoid do + gem "mongoid", "~> 7.5" end diff --git a/gemfiles/Gemfile-rails-6-1 b/gemfiles/Gemfile-rails-6-1 index bdebe1a761..34a3ab5069 100644 --- a/gemfiles/Gemfile-rails-6-1 +++ b/gemfiles/Gemfile-rails-6-1 @@ -27,5 +27,9 @@ group :test do end platforms :ruby do - gem "sqlite3", "~> 1.4" + gem "sqlite3" +end + +group :mongoid do + gem "mongoid", "~> 7.5" end diff --git a/gemfiles/Gemfile-rails-7-0 b/gemfiles/Gemfile-rails-7-0 index ee474728ef..6e0f47dffb 100644 --- a/gemfiles/Gemfile-rails-7-0 +++ b/gemfiles/Gemfile-rails-7-0 @@ -23,16 +23,9 @@ group :test do end platforms :ruby do - gem "sqlite3", "~> 1.4" + gem "sqlite3" end -# platforms :jruby do -# gem "activerecord-jdbc-adapter" -# gem "activerecord-jdbcsqlite3-adapter" -# gem "jruby-openssl" -# end - -# TODO: -# group :mongoid do -# gem "mongoid", "~> 4.0.0" -# end +group :mongoid do + gem "mongoid", "~> 7.5" +end diff --git a/gemfiles/Gemfile-rails-main b/gemfiles/Gemfile-rails-main index 12930653eb..da31739d13 100644 --- a/gemfiles/Gemfile-rails-main +++ b/gemfiles/Gemfile-rails-main @@ -23,3 +23,7 @@ end platforms :ruby do gem "sqlite3", "~> 1.4" end + +group :mongoid do + gem "mongoid", "~> 7.5" +end diff --git a/test/orm/mongoid.rb b/test/orm/mongoid.rb index d31bc4d212..5b8807f1fb 100644 --- a/test/orm/mongoid.rb +++ b/test/orm/mongoid.rb @@ -10,6 +10,6 @@ class ActiveSupport::TestCase setup do - Mongoid.default_session.drop + Mongoid::Config.purge! end end diff --git a/test/rails_app/config/application.rb b/test/rails_app/config/application.rb index cb333819c4..249126067b 100644 --- a/test/rails_app/config/application.rb +++ b/test/rails_app/config/application.rb @@ -39,8 +39,10 @@ class Application < Rails::Application Devise::SessionsController.layout "application" end - if Devise::Test.rails70? - config.active_record.legacy_connection_handling = false + if DEVISE_ORM == :active_record + if Devise::Test.rails70? + config.active_record.legacy_connection_handling = false + end end if Devise::Test.rails70_and_up? From a2f1d29b5975ad5f1bd68c1d7c0e9c22218fb687 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Fri, 31 Mar 2023 11:41:23 -0300 Subject: [PATCH 2/3] Update dirty tracking to support Mongoid 8.0+ It appears Mongoid 8.0+ slightly [changed dirty tracking] behavior to more closely match Active Model/Record, however they haven't yet introduced the [new methods] that match the latest API, that seems to be coming on Mongoid 8.1 only. The changes here try to accommodate for that by determining which "attribute_changed?" method to call depending on whether the "*_previously_*" version exists. Newer versions of AR (5.1+) will continue to use the new API / methods, whereas previous versions and Mongoid 8.0+ will use these tweaked versions. No behavior should change for AR, but it will hopefully support Mongoid 8.0+ now. [changed dirty tracking] https://github.com/mongodb/mongoid/pull/5092 [new methods] https://github.com/mongodb/mongoid/pull/5440 --- CHANGELOG.md | 1 + gemfiles/Gemfile-rails-main | 3 ++- lib/devise/orm.rb | 34 ++++++++++++++++++++++++++++++++-- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2c9b55e3c..dd4398a732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * enhancements * Removed deprecations warning output for `Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION` (@soartec-lab) + * Reenable Mongoid test suite across all Rails 6+ versions, to ensure we continue supporting it. Changes to dirty tracking to support Mongoid 8.0+. [#5568](https://github.com/heartcombo/devise/pull/5568) Please check [4-stable](https://github.com/heartcombo/devise/blob/4-stable/CHANGELOG.md) for previous changes. diff --git a/gemfiles/Gemfile-rails-main b/gemfiles/Gemfile-rails-main index da31739d13..27e3a394ac 100644 --- a/gemfiles/Gemfile-rails-main +++ b/gemfiles/Gemfile-rails-main @@ -25,5 +25,6 @@ platforms :ruby do end group :mongoid do - gem "mongoid", "~> 7.5" + # gem "mongoid", "~> 8.1" + gem "mongoid", github: "mongodb/mongoid", branch: "8.1-stable" end diff --git a/lib/devise/orm.rb b/lib/devise/orm.rb index 3e9852cd3a..4c3cd6f491 100644 --- a/lib/devise/orm.rb +++ b/lib/devise/orm.rb @@ -5,10 +5,14 @@ def self.active_record?(model) end def self.included(model) - model.include DirtyTrackingMethods + if Devise::Orm.active_record?(model) + model.include DirtyTrackingActiveRecordMethods + else + model.include DirtyTrackingMongoidMethods + end end - module DirtyTrackingMethods + module DirtyTrackingActiveRecordMethods def devise_email_before_last_save email_before_last_save end @@ -33,5 +37,31 @@ def devise_respond_to_and_will_save_change_to_attribute?(attribute) respond_to?("will_save_change_to_#{attribute}?") && send("will_save_change_to_#{attribute}?") end end + + module DirtyTrackingMongoidMethods + def devise_email_before_last_save + respond_to?(:email_previously_was) ? email_previously_was : email_was + end + + def devise_email_in_database + email_was + end + + def devise_saved_change_to_email? + respond_to?(:email_previously_changed?) ? email_previously_changed? : email_changed? + end + + def devise_saved_change_to_encrypted_password? + respond_to?(:encrypted_password_previously_changed?) ? encrypted_password_previously_changed? : encrypted_password_changed? + end + + def devise_will_save_change_to_email? + email_changed? + end + + def devise_respond_to_and_will_save_change_to_attribute?(attribute) + respond_to?("#{attribute}_changed?") && send("#{attribute}_changed?") + end + end end end From d18d6d833573e0bcef91347df679b502ca69e185 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 10 Apr 2024 10:26:31 -0300 Subject: [PATCH 3/3] Point to the latest release of mongoid instead of 8-1 branch Now that Mongoid has released new versions of 8.1 which contain the changes we rely on for dirty tracking, we can just point our Gemfile to their released versions for testing against them. Also update Rails and related dependencies to latest in the process, to make sure they all match together. (Mongoid v8.1.2 didn't allow Rails 7.1 for instance, only v8.1.3+) --- Gemfile | 9 +- Gemfile.lock | 192 +++++++++++++++++------------------- gemfiles/Gemfile-rails-main | 5 +- 3 files changed, 96 insertions(+), 110 deletions(-) diff --git a/Gemfile b/Gemfile index 112cbce4d8..5d860d5178 100644 --- a/Gemfile +++ b/Gemfile @@ -26,13 +26,6 @@ platforms :ruby do gem "sqlite3" end -# platforms :jruby do -# gem "activerecord-jdbc-adapter" -# gem "activerecord-jdbcsqlite3-adapter" -# gem "jruby-openssl" -# end - group :mongoid do - # gem "mongoid", "~> 8.1" - gem "mongoid", github: "mongodb/mongoid", branch: "8.1-stable" + gem "mongoid", "~> 8.1" end diff --git a/Gemfile.lock b/Gemfile.lock index 48c5d9b4f5..e351c7c6de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,14 +1,3 @@ -GIT - remote: https://github.com/mongodb/mongoid.git - revision: c12a285f78b291e4c62256aee0cc767f83fdc080 - branch: 8.1-stable - specs: - mongoid (8.1.2) - activemodel (>= 5.1, < 7.2, != 7.0.0) - concurrent-ruby (>= 1.0.5, < 2.0) - mongo (>= 2.18.0, < 3.0.0) - ruby2_keywords (~> 0.0.5) - GIT remote: https://github.com/rails/rails-controller-testing.git revision: c203673f8011a7cdc2a8edf995ae6b3eec3417ca @@ -31,70 +20,71 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.1.1) - actionpack (= 7.1.1) - activesupport (= 7.1.1) + actioncable (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.1) - actionpack (= 7.1.1) - activejob (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + actionmailbox (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.1) - actionpack (= 7.1.1) - actionview (= 7.1.1) - activejob (= 7.1.1) - activesupport (= 7.1.1) + actionmailer (7.1.3.2) + actionpack (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.1) - actionview (= 7.1.1) - activesupport (= 7.1.1) + actionpack (7.1.3.2) + actionview (= 7.1.3.2) + activesupport (= 7.1.3.2) nokogiri (>= 1.8.5) + racc rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.1) - actionpack (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + actiontext (7.1.3.2) + actionpack (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.1) - activesupport (= 7.1.1) + actionview (7.1.3.2) + activesupport (= 7.1.3.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.1) - activesupport (= 7.1.1) + activejob (7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.3.6) - activemodel (7.1.1) - activesupport (= 7.1.1) - activerecord (7.1.1) - activemodel (= 7.1.1) - activesupport (= 7.1.1) + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) timeout (>= 0.4.0) - activestorage (7.1.1) - actionpack (= 7.1.1) - activejob (= 7.1.1) - activerecord (= 7.1.1) - activesupport (= 7.1.1) + activestorage (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activesupport (= 7.1.3.2) marcel (~> 1.0) - activesupport (7.1.1) + activesupport (7.1.3.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -104,17 +94,16 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) - base64 (0.1.1) + base64 (0.2.0) bcrypt (3.1.19) - bigdecimal (3.1.4) - bson (4.15.0) + bigdecimal (3.1.7) + bson (5.0.0) builder (3.2.4) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) connection_pool (2.4.1) crass (1.0.6) - date (3.3.3) - drb (2.1.1) - ruby2_keywords + date (3.3.4) + drb (2.2.1) erubi (1.12.0) faraday (2.7.11) base64 @@ -124,14 +113,14 @@ GEM globalid (1.2.1) activesupport (>= 6.1) hashie (5.0.0) - i18n (1.14.1) + i18n (1.14.4) concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.8.2) + io-console (0.7.2) + irb (1.12.0) rdoc - reline (>= 0.3.8) + reline (>= 0.4.2) jwt (2.7.1) - loofah (2.21.4) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -139,27 +128,32 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) mini_mime (1.1.5) - mini_portile2 (2.8.4) - minitest (5.20.0) + mini_portile2 (2.8.5) + minitest (5.22.3) mocha (2.1.0) ruby2_keywords (>= 0.0.5) - mongo (2.19.1) - bson (>= 4.14.1, < 5.0.0) + mongo (2.20.0) + bson (>= 4.14.1, < 6.0.0) + mongoid (8.1.5) + activemodel (>= 5.1, < 7.2, != 7.0.0) + concurrent-ruby (>= 1.0.5, < 2.0) + mongo (>= 2.18.0, < 3.0.0) + ruby2_keywords (~> 0.0.5) multi_xml (0.6.0) - mutex_m (0.1.2) - net-imap (0.4.1) + mutex_m (0.2.0) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.5.0) net-protocol - nio4r (2.5.9) - nokogiri (1.15.4) + nio4r (2.7.1) + nokogiri (1.15.6) mini_portile2 (~> 2.8.2) racc (~> 1.4) oauth2 (2.0.9) @@ -182,10 +176,10 @@ GEM omniauth (>= 1.0, < 3.0) rack-openid (~> 1.4.0) orm_adapter (0.5.0) - psych (5.1.1) + psych (5.1.2) stringio - racc (1.7.1) - rack (3.0.8) + racc (1.7.3) + rack (3.0.10) rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) @@ -198,20 +192,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.1.1) - actioncable (= 7.1.1) - actionmailbox (= 7.1.1) - actionmailer (= 7.1.1) - actionpack (= 7.1.1) - actiontext (= 7.1.1) - actionview (= 7.1.1) - activejob (= 7.1.1) - activemodel (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + rails (7.1.3.2) + actioncable (= 7.1.3.2) + actionmailbox (= 7.1.3.2) + actionmailer (= 7.1.3.2) + actionpack (= 7.1.3.2) + actiontext (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activemodel (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) bundler (>= 1.15.0) - railties (= 7.1.1) + railties (= 7.1.3.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -219,18 +213,18 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.1) - actionpack (= 7.1.1) - activesupport (= 7.1.1) + railties (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) irb rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) - rake (13.0.6) - rdoc (6.5.0) + rake (13.2.1) + rdoc (6.6.3.1) psych (>= 4.0.0) - reline (0.3.9) + reline (0.5.1) io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) @@ -243,10 +237,10 @@ GEM version_gem (~> 1.1, >= 1.1.1) sqlite3 (1.6.7) mini_portile2 (~> 2.8.0) - stringio (3.0.8) - thor (1.2.2) + stringio (3.1.0) + thor (1.3.1) timecop (0.9.8) - timeout (0.4.0) + timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) version_gem (1.1.3) @@ -260,7 +254,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.12) + zeitwerk (2.6.13) PLATFORMS ruby @@ -268,7 +262,7 @@ PLATFORMS DEPENDENCIES devise! mocha (~> 2.1) - mongoid! + mongoid (~> 8.1) omniauth omniauth-facebook omniauth-oauth2 @@ -283,4 +277,4 @@ DEPENDENCIES webrat (= 0.7.3) BUNDLED WITH - 2.4.5 + 2.4.22 diff --git a/gemfiles/Gemfile-rails-main b/gemfiles/Gemfile-rails-main index 27e3a394ac..eac553709c 100644 --- a/gemfiles/Gemfile-rails-main +++ b/gemfiles/Gemfile-rails-main @@ -21,10 +21,9 @@ group :test do end platforms :ruby do - gem "sqlite3", "~> 1.4" + gem "sqlite3" end group :mongoid do - # gem "mongoid", "~> 8.1" - gem "mongoid", github: "mongodb/mongoid", branch: "8.1-stable" + gem "mongoid", "~> 8.1" end