From f029d2601e05e041d7b433e95e7eb7d52514b18d Mon Sep 17 00:00:00 2001 From: Pedro Paiva Date: Fri, 30 Sep 2022 11:19:56 -0300 Subject: [PATCH] Update Rails to the latest version (#1510) * Bump Rails from 5.2.6 to 5.2.8.1 * Bump Rails from 6.0.4.4 to 6.0.6 * Bump Rails from 6.1.4.4 to 6.1.7 * test: skip validates_presence_of test with has_secure_password when rails greater than 6.0 See: https://github.com/rails/rails/pull/43378 * Bump Rails from 7.0.1 to 7.0.4 --- Appraisals | 6 +- gemfiles/rails_5_2.gemfile | 2 +- gemfiles/rails_5_2.gemfile.lock | 220 +++++++++--------- gemfiles/rails_6_0.gemfile | 2 +- gemfiles/rails_6_0.gemfile.lock | 218 ++++++++--------- gemfiles/rails_6_1.gemfile | 2 +- gemfiles/rails_6_1.gemfile.lock | 144 ++++++------ gemfiles/rails_7_0.gemfile.lock | 154 ++++++------ lib/shoulda/matchers/rails_shim.rb | 4 +- .../validate_presence_of_matcher_spec.rb | 14 +- 10 files changed, 374 insertions(+), 392 deletions(-) diff --git a/Appraisals b/Appraisals index fcd97e2a..9cfb8bac 100644 --- a/Appraisals +++ b/Appraisals @@ -27,7 +27,7 @@ appraise 'rails_5_2' do instance_eval(&shared_dependencies) instance_eval(&controller_test_dependency) - gem 'rails', '5.2.6' + gem 'rails', '5.2.8.1' gem 'puma', '~> 3.11' gem 'bootsnap', '>= 1.1.0', require: false gem 'sass-rails', '~> 5.0' @@ -49,7 +49,7 @@ appraise 'rails_6_0' do instance_eval(&shared_dependencies) instance_eval(&controller_test_dependency) - gem 'rails', '6.0.4.4' + gem 'rails', '6.0.6' gem 'puma', '~> 4.1' gem 'bootsnap', '>= 1.4.2', require: false gem 'sass-rails', '>= 6' @@ -73,7 +73,7 @@ appraise 'rails_6_1' do instance_eval(&shared_dependencies) instance_eval(&controller_test_dependency) - gem 'rails', '6.1.4.4' + gem 'rails', '6.1.7' gem 'puma', '~> 5.0' gem 'bootsnap', '>= 1.4.2', require: false gem 'sass-rails', '>= 6' diff --git a/gemfiles/rails_5_2.gemfile b/gemfiles/rails_5_2.gemfile index ac4c4da8..c88b7218 100644 --- a/gemfiles/rails_5_2.gemfile +++ b/gemfiles/rails_5_2.gemfile @@ -22,7 +22,7 @@ gem "spring-commands-rspec" gem "rspec-rails", "~> 4.0" gem "shoulda-context", "~> 1.2.0" gem "rails-controller-testing", ">= 1.0.1" -gem "rails", "5.2.6" +gem "rails", "5.2.8.1" gem "puma", "~> 3.11" gem "bootsnap", ">= 1.1.0", require: false gem "sass-rails", "~> 5.0" diff --git a/gemfiles/rails_5_2.gemfile.lock b/gemfiles/rails_5_2.gemfile.lock index defeb0d6..58f7734f 100644 --- a/gemfiles/rails_5_2.gemfile.lock +++ b/gemfiles/rails_5_2.gemfile.lock @@ -1,49 +1,49 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (5.2.8.1) + actionpack (= 5.2.8.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailer (5.2.8.1) + actionpack (= 5.2.8.1) + actionview (= 5.2.8.1) + activejob (= 5.2.8.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) + actionpack (5.2.8.1) + actionview (= 5.2.8.1) + activesupport (= 5.2.8.1) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + actionview (5.2.8.1) + activesupport (= 5.2.8.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) + activejob (5.2.8.1) + activesupport (= 5.2.8.1) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) + activemodel (5.2.8.1) + activesupport (= 5.2.8.1) + activerecord (5.2.8.1) + activemodel (= 5.2.8.1) + activesupport (= 5.2.8.1) arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) + activestorage (5.2.8.1) + actionpack (= 5.2.8.1) + activerecord (= 5.2.8.1) marcel (~> 1.0.0) - activesupport (5.2.6) + activesupport (5.2.8.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) appraisal (2.2.0) bundler rake @@ -52,9 +52,9 @@ GEM io-like (~> 0.3.0) arel (9.0.0) ast (2.4.2) - bcrypt (3.1.16) - bootsnap (1.9.3) - msgpack (~> 1.0) + bcrypt (3.1.18) + bootsnap (1.13.0) + msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) capybara (3.1.1) @@ -64,44 +64,44 @@ GEM rack (>= 1.6.0) rack-test (>= 0.6.3) xpath (~> 3.0) - childprocess (3.0.0) + childprocess (4.1.0) chromedriver-helper (2.1.1) archive-zip (~> 0.10) nokogiri (~> 1.8) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) crass (1.0.6) - diff-lcs (1.4.4) - erubi (1.10.0) - ffi (1.15.0) + diff-lcs (1.5.0) + erubi (1.11.0) + ffi (1.15.5) fssm (0.2.10) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.8.10) + globalid (1.0.0) + activesupport (>= 5.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) io-like (0.3.1) - jbuilder (2.11.2) + jbuilder (2.11.5) + actionview (>= 5.0.0) activesupport (>= 5.0.0) + json (2.6.2) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.10.0) + loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.1) + marcel (1.0.2) method_source (1.0.0) - mini_mime (1.1.0) - mini_portile2 (2.5.3) - minitest (5.14.4) - msgpack (1.4.2) - nio4r (2.5.7) - nokogiri (1.11.7) - mini_portile2 (~> 2.5.0) + mini_mime (1.1.2) + minitest (5.16.3) + msgpack (1.5.6) + nio4r (2.5.8) + nokogiri (1.13.8-x86_64-linux) racc (~> 1.4) - parallel (1.20.1) - parser (3.0.0.0) + parallel (1.22.1) + parser (3.1.2.1) ast (~> 2.4.1) pg (0.21.0) pry (0.13.1) @@ -110,24 +110,24 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) - public_suffix (4.0.6) + public_suffix (5.0.0) puma (3.12.6) - racc (1.5.2) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) + racc (1.6.0) + rack (2.2.4) + rack-test (2.0.2) + rack (>= 1.3) + rails (5.2.8.1) + actioncable (= 5.2.8.1) + actionmailer (= 5.2.8.1) + actionpack (= 5.2.8.1) + actionview (= 5.2.8.1) + activejob (= 5.2.8.1) + activemodel (= 5.2.8.1) + activerecord (= 5.2.8.1) + activestorage (= 5.2.8.1) + activesupport (= 5.2.8.1) bundler (>= 1.3.0) - railties (= 5.2.6) + railties (= 5.2.8.1) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -136,35 +136,35 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (5.2.8.1) + actionpack (= 5.2.8.1) + activesupport (= 5.2.8.1) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) - rainbow (3.0.0) + rainbow (3.1.1) rake (13.0.1) - rb-fsevent (0.10.4) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) redcarpet (3.5.1) - regexp_parser (2.1.1) - rexml (3.2.4) - rouge (3.26.0) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + regexp_parser (2.5.0) + rexml (3.2.5) + rouge (3.30.0) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.11.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -173,26 +173,27 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.2) - rubocop (1.10.0) + rspec-support (3.11.1) + rubocop (1.36.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.2.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.20.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) - rubocop-packaging (0.5.1) - rubocop (>= 0.89, < 2.0) - rubocop-rails (2.9.1) + rubocop-ast (1.21.0) + parser (>= 3.1.1.0) + rubocop-packaging (0.5.2) + rubocop (>= 1.33, < 2.0) + rubocop-rails (2.16.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) + rubocop (>= 1.33.0, < 2.0) ruby-progressbar (1.11.0) - rubyzip (2.3.0) + rubyzip (2.3.2) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -204,8 +205,9 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) + selenium-webdriver (4.1.0) + childprocess (>= 0.5, < 5.0) + rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2) shoulda-context (1.2.2) spring (2.1.1) @@ -217,32 +219,34 @@ GEM sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.4.2) - thor (1.1.0) + sqlite3 (1.5.0-x86_64-linux) + thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.10) + tilt (2.0.11) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.9) + tzinfo (1.2.10) thread_safe (~> 0.1) - unicode-display_width (2.0.0) + unicode-display_width (2.3.0) warnings_logger (0.1.1) + webrick (1.7.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.26) + yard (0.9.28) + webrick (~> 1.7.0) zeus (0.15.14) method_source (>= 0.6.7) PLATFORMS - ruby + x86_64-linux DEPENDENCIES appraisal (= 2.2.0) @@ -258,7 +262,7 @@ DEPENDENCIES pry pry-byebug puma (~> 3.11) - rails (= 5.2.6) + rails (= 5.2.8.1) rails-controller-testing (>= 1.0.1) rake (= 13.0.1) redcarpet @@ -281,4 +285,4 @@ DEPENDENCIES zeus BUNDLED WITH - 2.2.22 + 2.3.22 diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile index b8b4e89b..81c323c4 100644 --- a/gemfiles/rails_6_0.gemfile +++ b/gemfiles/rails_6_0.gemfile @@ -22,7 +22,7 @@ gem "spring-commands-rspec" gem "rspec-rails", "~> 4.0" gem "shoulda-context", "~> 1.2.0" gem "rails-controller-testing", ">= 1.0.1" -gem "rails", "6.0.4.4" +gem "rails", "6.0.6" gem "puma", "~> 4.1" gem "bootsnap", ">= 1.4.2", require: false gem "sass-rails", ">= 6" diff --git a/gemfiles/rails_6_0.gemfile.lock b/gemfiles/rails_6_0.gemfile.lock index 8140cb3e..b1dedfdc 100644 --- a/gemfiles/rails_6_0.gemfile.lock +++ b/gemfiles/rails_6_0.gemfile.lock @@ -1,70 +1,70 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.0.4.4) - actionpack (= 6.0.4.4) + actioncable (6.0.6) + actionpack (= 6.0.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.4.4) - actionpack (= 6.0.4.4) - activejob (= 6.0.4.4) - activerecord (= 6.0.4.4) - activestorage (= 6.0.4.4) - activesupport (= 6.0.4.4) + actionmailbox (6.0.6) + actionpack (= 6.0.6) + activejob (= 6.0.6) + activerecord (= 6.0.6) + activestorage (= 6.0.6) + activesupport (= 6.0.6) mail (>= 2.7.1) - actionmailer (6.0.4.4) - actionpack (= 6.0.4.4) - actionview (= 6.0.4.4) - activejob (= 6.0.4.4) + actionmailer (6.0.6) + actionpack (= 6.0.6) + actionview (= 6.0.6) + activejob (= 6.0.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.4.4) - actionview (= 6.0.4.4) - activesupport (= 6.0.4.4) + actionpack (6.0.6) + actionview (= 6.0.6) + activesupport (= 6.0.6) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.4.4) - actionpack (= 6.0.4.4) - activerecord (= 6.0.4.4) - activestorage (= 6.0.4.4) - activesupport (= 6.0.4.4) + actiontext (6.0.6) + actionpack (= 6.0.6) + activerecord (= 6.0.6) + activestorage (= 6.0.6) + activesupport (= 6.0.6) nokogiri (>= 1.8.5) - actionview (6.0.4.4) - activesupport (= 6.0.4.4) + actionview (6.0.6) + activesupport (= 6.0.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.0.4.4) - activesupport (= 6.0.4.4) + activejob (6.0.6) + activesupport (= 6.0.6) globalid (>= 0.3.6) - activemodel (6.0.4.4) - activesupport (= 6.0.4.4) - activerecord (6.0.4.4) - activemodel (= 6.0.4.4) - activesupport (= 6.0.4.4) - activestorage (6.0.4.4) - actionpack (= 6.0.4.4) - activejob (= 6.0.4.4) - activerecord (= 6.0.4.4) - marcel (~> 1.0.0) - activesupport (6.0.4.4) + activemodel (6.0.6) + activesupport (= 6.0.6) + activerecord (6.0.6) + activemodel (= 6.0.6) + activesupport (= 6.0.6) + activestorage (6.0.6) + actionpack (= 6.0.6) + activejob (= 6.0.6) + activerecord (= 6.0.6) + marcel (~> 1.0) + activesupport (6.0.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) appraisal (2.2.0) bundler rake thor (>= 0.14.0) ast (2.4.2) - bcrypt (3.1.16) - bootsnap (1.10.2) + bcrypt (3.1.18) + bootsnap (1.13.0) msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) @@ -79,24 +79,25 @@ GEM xpath (~> 3.2) childprocess (4.1.0) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) crass (1.0.6) diff-lcs (1.5.0) digest (3.1.0) - erubi (1.10.0) + erubi (1.11.0) ffi (1.15.5) fssm (0.2.10) globalid (1.0.0) activesupport (>= 5.0) - i18n (1.9.1) + i18n (1.12.0) concurrent-ruby (~> 1.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) + json (2.6.2) listen (3.3.4) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.13.0) + loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -105,9 +106,8 @@ GEM matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.7.1) - minitest (5.15.0) - msgpack (1.4.4) + minitest (5.16.3) + msgpack (1.5.6) net-protocol (0.1.3) timeout net-smtp (0.3.1) @@ -115,41 +115,40 @@ GEM net-protocol timeout nio4r (2.5.8) - nokogiri (1.13.1) - mini_portile2 (~> 2.7.0) + nokogiri (1.13.8-x86_64-linux) racc (~> 1.4) - parallel (1.21.0) - parser (3.1.0.0) + parallel (1.22.1) + parser (3.1.2.1) ast (~> 2.4.1) - pg (1.3.0) + pg (1.4.3) pry (0.13.1) coderay (~> 1.1) method_source (~> 1.0) pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) - psych (3.3.2) - public_suffix (4.0.6) - puma (4.3.10) + psych (3.3.3) + public_suffix (5.0.0) + puma (4.3.12) nio4r (~> 2.0) racc (1.6.0) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (6.0.4.4) - actioncable (= 6.0.4.4) - actionmailbox (= 6.0.4.4) - actionmailer (= 6.0.4.4) - actionpack (= 6.0.4.4) - actiontext (= 6.0.4.4) - actionview (= 6.0.4.4) - activejob (= 6.0.4.4) - activemodel (= 6.0.4.4) - activerecord (= 6.0.4.4) - activestorage (= 6.0.4.4) - activesupport (= 6.0.4.4) + rack (2.2.4) + rack-test (2.0.2) + rack (>= 1.3) + rails (6.0.6) + actioncable (= 6.0.6) + actionmailbox (= 6.0.6) + actionmailer (= 6.0.6) + actionpack (= 6.0.6) + actiontext (= 6.0.6) + actionview (= 6.0.6) + activejob (= 6.0.6) + activemodel (= 6.0.6) + activerecord (= 6.0.6) + activestorage (= 6.0.6) + activesupport (= 6.0.6) bundler (>= 1.3.0) - railties (= 6.0.4.4) + railties (= 6.0.6) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -158,35 +157,35 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) + rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (6.0.4.4) - actionpack (= 6.0.4.4) - activesupport (= 6.0.4.4) + railties (6.0.6) + actionpack (= 6.0.6) + activesupport (= 6.0.6) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.1.1) rake (13.0.1) - rb-fsevent (0.11.0) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) redcarpet (3.5.1) - regexp_parser (2.2.0) + regexp_parser (2.6.0) rexml (3.2.5) - rouge (3.27.0) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.2) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.2) + rouge (3.30.0) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.3) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.11.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -195,24 +194,25 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.3) - rubocop (1.25.0) + rspec-support (3.11.1) + rubocop (1.36.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.20.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) - parser (>= 3.0.1.1) - rubocop-packaging (0.5.1) - rubocop (>= 0.89, < 2.0) - rubocop-rails (2.13.2) + rubocop-ast (1.21.0) + parser (>= 3.1.1.0) + rubocop-packaging (0.5.2) + rubocop (>= 1.33, < 2.0) + rubocop-rails (2.16.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) + rubocop (>= 1.33.0, < 2.0) ruby-progressbar (1.11.0) rubyzip (2.3.2) sass-rails (6.0.0) @@ -236,26 +236,26 @@ GEM spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (4.0.2) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.4.2) + sqlite3 (1.5.0-x86_64-linux) thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.10) + tilt (2.0.11) timeout (0.3.0) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.9) + tzinfo (1.2.10) thread_safe (~> 0.1) - unicode-display_width (2.1.0) + unicode-display_width (2.3.0) warnings_logger (0.1.1) - webdrivers (5.0.0) + webdrivers (5.1.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0) @@ -265,14 +265,14 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.27) + yard (0.9.28) webrick (~> 1.7.0) - zeitwerk (2.5.4) + zeitwerk (2.6.0) zeus (0.15.14) method_source (>= 0.6.7) PLATFORMS - ruby + x86_64-linux DEPENDENCIES appraisal (= 2.2.0) @@ -289,7 +289,7 @@ DEPENDENCIES pry-byebug psych (~> 3.0) puma (~> 4.1) - rails (= 6.0.4.4) + rails (= 6.0.6) rails-controller-testing (>= 1.0.1) rake (= 13.0.1) redcarpet @@ -313,4 +313,4 @@ DEPENDENCIES zeus BUNDLED WITH - 2.3.19 + 2.3.22 diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_6_1.gemfile index 515b1d3d..6547c141 100644 --- a/gemfiles/rails_6_1.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -22,7 +22,7 @@ gem "spring-commands-rspec" gem "rspec-rails", "~> 4.0" gem "shoulda-context", "~> 1.2.0" gem "rails-controller-testing", ">= 1.0.1" -gem "rails", "6.1.4.4" +gem "rails", "6.1.7" gem "puma", "~> 5.0" gem "bootsnap", ">= 1.4.2", require: false gem "sass-rails", ">= 6" diff --git a/gemfiles/rails_6_1.gemfile.lock b/gemfiles/rails_6_1.gemfile.lock index 05928963..b9f63878 100644 --- a/gemfiles/rails_6_1.gemfile.lock +++ b/gemfiles/rails_6_1.gemfile.lock @@ -1,60 +1,60 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.4) - actionpack (= 6.1.4.4) - activesupport (= 6.1.4.4) + actioncable (6.1.7) + actionpack (= 6.1.7) + activesupport (= 6.1.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.4) - actionpack (= 6.1.4.4) - activejob (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionmailbox (6.1.7) + actionpack (= 6.1.7) + activejob (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) mail (>= 2.7.1) - actionmailer (6.1.4.4) - actionpack (= 6.1.4.4) - actionview (= 6.1.4.4) - activejob (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionmailer (6.1.7) + actionpack (= 6.1.7) + actionview (= 6.1.7) + activejob (= 6.1.7) + activesupport (= 6.1.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.4) - actionview (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionpack (6.1.7) + actionview (= 6.1.7) + activesupport (= 6.1.7) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.4) - actionpack (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + actiontext (6.1.7) + actionpack (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) nokogiri (>= 1.8.5) - actionview (6.1.4.4) - activesupport (= 6.1.4.4) + actionview (6.1.7) + activesupport (= 6.1.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.4.4) - activesupport (= 6.1.4.4) + activejob (6.1.7) + activesupport (= 6.1.7) globalid (>= 0.3.6) - activemodel (6.1.4.4) - activesupport (= 6.1.4.4) - activerecord (6.1.4.4) - activemodel (= 6.1.4.4) - activesupport (= 6.1.4.4) - activestorage (6.1.4.4) - actionpack (= 6.1.4.4) - activejob (= 6.1.4.4) - activerecord (= 6.1.4.4) - activesupport (= 6.1.4.4) - marcel (~> 1.0.0) + activemodel (6.1.7) + activesupport (= 6.1.7) + activerecord (6.1.7) + activemodel (= 6.1.7) + activesupport (= 6.1.7) + activestorage (6.1.7) + actionpack (= 6.1.7) + activejob (= 6.1.7) + activerecord (= 6.1.7) + activesupport (= 6.1.7) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.4) + activesupport (6.1.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -83,16 +83,16 @@ GEM xpath (~> 3.2) childprocess (4.1.0) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) crass (1.0.6) diff-lcs (1.5.0) digest (3.1.0) - erubi (1.10.0) + erubi (1.11.0) ffi (1.15.5) fssm (0.2.10) globalid (1.0.0) activesupport (>= 5.0) - i18n (1.9.1) + i18n (1.12.0) concurrent-ruby (~> 1.0) jbuilder (2.11.5) actionview (>= 5.0.0) @@ -100,7 +100,7 @@ GEM listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.13.0) + loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -109,8 +109,8 @@ GEM matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.7.1) - minitest (5.15.0) + mini_portile2 (2.8.0) + minitest (5.16.3) msgpack (1.4.4) net-protocol (0.1.3) timeout @@ -119,8 +119,8 @@ GEM net-protocol timeout nio4r (2.5.8) - nokogiri (1.13.1) - mini_portile2 (~> 2.7.0) + nokogiri (1.13.8) + mini_portile2 (~> 2.8.0) racc (~> 1.4) parallel (1.21.0) parser (3.1.0.0) @@ -137,25 +137,25 @@ GEM puma (5.6.1) nio4r (~> 2.0) racc (1.6.0) - rack (2.2.3) + rack (2.2.4) rack-mini-profiler (2.0.4) rack (>= 1.2.0) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (6.1.4.4) - actioncable (= 6.1.4.4) - actionmailbox (= 6.1.4.4) - actionmailer (= 6.1.4.4) - actionpack (= 6.1.4.4) - actiontext (= 6.1.4.4) - actionview (= 6.1.4.4) - activejob (= 6.1.4.4) - activemodel (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + rack-test (2.0.2) + rack (>= 1.3) + rails (6.1.7) + actioncable (= 6.1.7) + actionmailbox (= 6.1.7) + actionmailer (= 6.1.7) + actionpack (= 6.1.7) + actiontext (= 6.1.7) + actionview (= 6.1.7) + activejob (= 6.1.7) + activemodel (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) bundler (>= 1.15.0) - railties (= 6.1.4.4) + railties (= 6.1.7) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -164,13 +164,13 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) + rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (6.1.4.4) - actionpack (= 6.1.4.4) - activesupport (= 6.1.4.4) + railties (6.1.7) + actionpack (= 6.1.7) + activesupport (= 6.1.7) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) rake (13.0.1) @@ -242,7 +242,7 @@ GEM spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (4.0.2) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) @@ -256,7 +256,7 @@ GEM turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (2.0.4) + tzinfo (2.0.5) concurrent-ruby (~> 1.0) unicode-display_width (2.1.0) warnings_logger (0.1.1) @@ -272,7 +272,7 @@ GEM nokogiri (~> 1.8) yard (0.9.27) webrick (~> 1.7.0) - zeitwerk (2.5.4) + zeitwerk (2.6.0) zeus (0.15.14) method_source (>= 0.6.7) @@ -295,7 +295,7 @@ DEPENDENCIES psych (~> 3.0) puma (~> 5.0) rack-mini-profiler (~> 2.0.0) - rails (= 6.1.4.4) + rails (= 6.1.7) rails-controller-testing (>= 1.0.1) rake (= 13.0.1) redcarpet @@ -319,4 +319,4 @@ DEPENDENCIES zeus BUNDLED WITH - 2.2.32 + 2.3.22 diff --git a/gemfiles/rails_7_0.gemfile.lock b/gemfiles/rails_7_0.gemfile.lock index 59c2c4e6..6747aa24 100644 --- a/gemfiles/rails_7_0.gemfile.lock +++ b/gemfiles/rails_7_0.gemfile.lock @@ -1,67 +1,67 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.1) - actionpack (= 7.0.1) - activesupport (= 7.0.1) + actioncable (7.0.4) + actionpack (= 7.0.4) + activesupport (= 7.0.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.1) - actionpack (= 7.0.1) - activejob (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + actionmailbox (7.0.4) + actionpack (= 7.0.4) + activejob (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.1) - actionpack (= 7.0.1) - actionview (= 7.0.1) - activejob (= 7.0.1) - activesupport (= 7.0.1) + actionmailer (7.0.4) + actionpack (= 7.0.4) + actionview (= 7.0.4) + activejob (= 7.0.4) + activesupport (= 7.0.4) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.1) - actionview (= 7.0.1) - activesupport (= 7.0.1) + actionpack (7.0.4) + actionview (= 7.0.4) + activesupport (= 7.0.4) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.1) - actionpack (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + actiontext (7.0.4) + actionpack (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.1) - activesupport (= 7.0.1) + actionview (7.0.4) + activesupport (= 7.0.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.1) - activesupport (= 7.0.1) + activejob (7.0.4) + activesupport (= 7.0.4) globalid (>= 0.3.6) - activemodel (7.0.1) - activesupport (= 7.0.1) - activerecord (7.0.1) - activemodel (= 7.0.1) - activesupport (= 7.0.1) - activestorage (7.0.1) - actionpack (= 7.0.1) - activejob (= 7.0.1) - activerecord (= 7.0.1) - activesupport (= 7.0.1) + activemodel (7.0.4) + activesupport (= 7.0.4) + activerecord (7.0.4) + activemodel (= 7.0.4) + activesupport (= 7.0.4) + activestorage (7.0.4) + actionpack (= 7.0.4) + activejob (= 7.0.4) + activerecord (= 7.0.4) + activesupport (= 7.0.4) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.1) + activesupport (7.0.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -89,30 +89,28 @@ GEM xpath (~> 3.2) childprocess (4.1.0) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) crass (1.0.6) debug (1.4.0) irb (>= 1.3.6) reline (>= 0.2.7) diff-lcs (1.5.0) - digest (3.1.0) - erubi (1.10.0) + erubi (1.11.0) fssm (0.2.10) globalid (1.0.0) activesupport (>= 5.0) - i18n (1.8.11) + i18n (1.12.0) concurrent-ruby (~> 1.0) importmap-rails (1.0.2) actionpack (>= 6.0.0) railties (>= 6.0.0) io-console (0.5.11) - io-wait (0.2.1) irb (1.4.1) reline (>= 0.3.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - loofah (2.13.0) + loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -121,27 +119,20 @@ GEM matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.7.1) - minitest (5.15.0) + mini_portile2 (2.8.0) + minitest (5.16.3) msgpack (1.4.4) - net-imap (0.2.3) - digest + net-imap (0.3.1) net-protocol - strscan - net-pop (0.1.1) - digest + net-pop (0.1.2) net-protocol + net-protocol (0.1.3) timeout - net-protocol (0.1.2) - io-wait - timeout - net-smtp (0.3.1) - digest + net-smtp (0.3.2) net-protocol - timeout nio4r (2.5.8) - nokogiri (1.13.1) - mini_portile2 (~> 2.7.0) + nokogiri (1.13.8) + mini_portile2 (~> 2.8.0) racc (~> 1.4) parallel (1.21.0) parser (3.1.0.0) @@ -157,23 +148,23 @@ GEM puma (5.5.2) nio4r (~> 2.0) racc (1.6.0) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (7.0.1) - actioncable (= 7.0.1) - actionmailbox (= 7.0.1) - actionmailer (= 7.0.1) - actionpack (= 7.0.1) - actiontext (= 7.0.1) - actionview (= 7.0.1) - activejob (= 7.0.1) - activemodel (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + rack (2.2.4) + rack-test (2.0.2) + rack (>= 1.3) + rails (7.0.4) + actioncable (= 7.0.4) + actionmailbox (= 7.0.4) + actionmailer (= 7.0.4) + actionpack (= 7.0.4) + actiontext (= 7.0.4) + actionview (= 7.0.4) + activejob (= 7.0.4) + activemodel (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) bundler (>= 1.15.0) - railties (= 7.0.1) + railties (= 7.0.4) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -181,11 +172,11 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) + rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (7.0.1) - actionpack (= 7.0.1) - activesupport (= 7.0.1) + railties (7.0.4) + actionpack (= 7.0.4) + activesupport (= 7.0.4) method_source rake (>= 12.2) thor (~> 1.0) @@ -257,13 +248,12 @@ GEM sqlite3 (1.4.2) stimulus-rails (1.0.2) railties (>= 6.0.0) - strscan (3.0.1) thor (1.2.1) - timeout (0.2.0) + timeout (0.3.0) turbo-rails (1.0.1) actionpack (>= 6.0.0) railties (>= 6.0.0) - tzinfo (2.0.4) + tzinfo (2.0.5) concurrent-ruby (~> 1.0) unicode-display_width (2.1.0) warnings_logger (0.1.1) @@ -279,7 +269,7 @@ GEM nokogiri (~> 1.8) yard (0.9.27) webrick (~> 1.7.0) - zeitwerk (2.5.3) + zeitwerk (2.6.0) zeus (0.15.14) method_source (>= 0.6.7) diff --git a/lib/shoulda/matchers/rails_shim.rb b/lib/shoulda/matchers/rails_shim.rb index f1f4e31a..a68d6429 100644 --- a/lib/shoulda/matchers/rails_shim.rb +++ b/lib/shoulda/matchers/rails_shim.rb @@ -25,8 +25,8 @@ module Shoulda Gem::Version.new('0') end - def active_model_gte_7? - Gem::Requirement.new('>= 7').satisfied_by?(active_model_version) + def active_model_st_6_1? + Gem::Requirement.new('< 6.1').satisfied_by?(active_model_version) end def active_model_lt_7? diff --git a/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb b/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb index 89441bcf..afa52e81 100644 --- a/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +++ b/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb @@ -860,19 +860,7 @@ validation exception on failure, but this could not be proved. end context 'against a pre-set password in a model that has_secure_password' do - if Shoulda::Matchers::RailsShim.active_model_gte_7? - it 'does not raises a CouldNotSetPasswordError' do - user_class = define_model :user, password_digest: :string do - has_secure_password :password, validations: false - validates_presence_of :password - end - - user = user_class.new - user.password = 'something' - - expect(user).to validate_presence_of(:password) - end - else + if Shoulda::Matchers::RailsShim.active_model_st_6_1? it 'raises a CouldNotSetPasswordError' do user_class = define_model :user, password_digest: :string do has_secure_password validations: false