diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d7bf04be..41f1ca1a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,17 +16,12 @@ jobs: fail-fast: false matrix: gemfile: - - "7.0" - "7.1" - "7.2" - "8.0" ruby: - - "3.1.6" - - "3.2.5" - - "3.3.5" - exclude: - - ruby: "3.1.6" - gemfile: "8.0" + - "3.2.8" + - "3.3.7" env: BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile diff --git a/Appraisals b/Appraisals index 958f1037..341d24bd 100644 --- a/Appraisals +++ b/Appraisals @@ -1,12 +1,3 @@ -appraise "rails_7.0" do - gem "railties", "~> 7.0.0" - # The following gems will not be bundled with Ruby 3.4 - gem "base64", require: false - gem "bigdecimal", require: false - gem "drb", require: false - gem "mutex_m", require: false -end - appraise "rails_7.1" do gem "railties", "~> 7.1.0" end diff --git a/Gemfile.lock b/Gemfile.lock index a313bf0f..af35fdd3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,7 +70,7 @@ GEM argon2 (2.3.0) ffi (~> 1.15) ffi-compiler (~> 1.0) - ast (2.4.2) + ast (2.4.3) base64 (0.2.0) bcrypt (3.1.20) better_html (2.1.1) @@ -80,7 +80,7 @@ GEM erubi (~> 1.4) parser (>= 2.4) smart_properties - bigdecimal (3.1.8) + bigdecimal (3.1.9) builder (3.3.0) capybara (3.40.0) addressable @@ -92,8 +92,8 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) coderay (1.1.3) - concurrent-ruby (1.3.4) - connection_pool (2.4.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) crass (1.0.6) database_cleaner (2.0.2) database_cleaner-active_record (>= 2, < 3) @@ -106,14 +106,14 @@ GEM drb (2.2.1) email_validator (2.2.4) activemodel - erb_lint (0.6.0) + erb_lint (0.9.0) activesupport better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow rubocop (>= 1) smart_properties - erubi (1.13.0) + erubi (1.13.1) factory_bot (6.4.6) activesupport (>= 5.0.0) factory_bot_rails (6.4.3) @@ -125,16 +125,17 @@ GEM rake globalid (1.2.1) activesupport (>= 6.1) - i18n (1.14.5) + i18n (1.14.7) concurrent-ruby (~> 1.0) io-console (0.7.2) irb (1.14.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) - language_server-protocol (3.17.0.3) - logger (1.6.0) - loofah (2.22.0) + json (2.10.2) + language_server-protocol (3.17.0.4) + lint_roller (1.1.0) + logger (1.7.0) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -145,8 +146,8 @@ GEM matrix (0.4.2) method_source (1.1.0) mini_mime (1.1.5) - mini_portile2 (2.8.7) - minitest (5.25.1) + mini_portile2 (2.8.8) + minitest (5.25.5) net-imap (0.5.1) date net-protocol @@ -156,13 +157,14 @@ GEM timeout net-smtp (0.5.0) net-protocol - nokogiri (1.16.7) + nokogiri (1.18.6) mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.7.3) ast (~> 2.4.1) racc + prism (1.4.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -186,9 +188,9 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) railties (7.2.0) actionpack (= 7.2.0) activesupport (= 7.2.0) @@ -201,11 +203,9 @@ GEM rake (13.2.1) rdoc (6.7.0) psych (>= 4.0.0) - regexp_parser (2.9.2) + regexp_parser (2.10.0) reline (0.5.9) io-console (~> 0.5) - rexml (3.3.5) - strscan rspec-core (3.13.0) rspec-support (~> 3.13.0) rspec-expectations (3.13.1) @@ -223,33 +223,35 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.65.1) + rubocop (1.75.1) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.43.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) - parser (>= 3.3.1.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.43.0) + parser (>= 3.3.7.2) + prism (~> 1.4) ruby-progressbar (1.13.0) - securerandom (0.3.1) + securerandom (0.4.1) shoulda-matchers (6.4.0) activesupport (>= 5.2.0) smart_properties (1.17.0) sqlite3 (1.7.3) mini_portile2 (~> 2.8.0) stringio (3.1.1) - strscan (3.1.0) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) useragent (0.16.10) webrick (1.8.1) xpath (3.2.0) diff --git a/README.md b/README.md index 40c6dfbd..06fe2520 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ monitored by contributors. ## Getting Started -Clearance is a Rails engine tested against Rails `>= 7.0` and Ruby `>= 3.1.6`. +Clearance is a Rails engine tested against Rails `>= 7.1` and Ruby `>= 3.2.8`. You can add it to your Gemfile with: diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile deleted file mode 100644 index 513bdec1..00000000 --- a/gemfiles/rails_7.0.gemfile +++ /dev/null @@ -1,24 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "addressable" -gem "ammeter" -gem "appraisal" -gem "capybara" -gem "database_cleaner" -gem "erb_lint", require: false -gem "factory_bot_rails" -gem "nokogiri" -gem "pry", require: false -gem "rails-controller-testing" -gem "rspec-rails" -gem "shoulda-matchers" -gem "sqlite3", "~> 1.7" -gem "railties", "~> 7.0.0" -gem "base64", require: false -gem "bigdecimal", require: false -gem "drb", require: false -gem "mutex_m", require: false - -gemspec path: "../" diff --git a/spec/controllers/passwords_controller_spec.rb b/spec/controllers/passwords_controller_spec.rb index 5557bf3a..67b4fdd4 100644 --- a/spec/controllers/passwords_controller_spec.rb +++ b/spec/controllers/passwords_controller_spec.rb @@ -33,7 +33,7 @@ } email = ActionMailer::Base.deliveries.last - expect(email.subject).to match(translated_string("passwords.edit.title")) + expect(email.subject).to match(I18n.t("passwords.edit.title")) end it "re-renders the page when turbo is enabled" do @@ -53,7 +53,7 @@ password: {}, } - expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_missing_email")) + expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_missing_email")) expect(response).to render_template(:new) end @@ -74,7 +74,7 @@ }, } - expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_missing_email")) + expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_missing_email")) expect(response).to render_template(:new) end @@ -164,7 +164,7 @@ } expect(response).to render_template(:new) - expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_forbidden")) + expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_forbidden")) end end @@ -178,7 +178,7 @@ } expect(response).to render_template(:new) - expect(flash.now[:alert]).to match(translated_string("flashes.failure_when_forbidden")) + expect(flash.now[:alert]).to match(I18n.t("flashes.failure_when_forbidden")) end end @@ -278,7 +278,7 @@ new_password: "", ) - expect(flash.now[:alert]).to match(translated_string("flashes.failure_after_update")) + expect(flash.now[:alert]).to match(I18n.t("flashes.failure_after_update")) expect(response).to have_http_status(:unprocessable_entity) expect(response).to render_template(:edit) end diff --git a/spec/controllers/permissions_controller_spec.rb b/spec/controllers/permissions_controller_spec.rb index d5338177..ae0730ca 100644 --- a/spec/controllers/permissions_controller_spec.rb +++ b/spec/controllers/permissions_controller_spec.rb @@ -58,7 +58,7 @@ def show it "denies access to show and display a flash message" do get :show - expect(flash[:alert]).to match(translated_string("flashes.failure_when_not_signed_in")) + expect(flash[:alert]).to match(I18n.t("flashes.failure_when_not_signed_in")) end end diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index c4fc6944..00948e21 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -41,7 +41,7 @@ } expect(response).to render_template(:new) - expect(flash[:alert]).to match(translated_string("flashes.failure_after_create")) + expect(flash[:alert]).to match(I18n.t("flashes.failure_after_create")) end end diff --git a/spec/support/html_escape_helper.rb b/spec/support/html_escape_helper.rb deleted file mode 100644 index 08617861..00000000 --- a/spec/support/html_escape_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -module HTMLEscapeHelper - def translated_string(key) - if [7.0].include?(Rails::VERSION::STRING.to_f) - ERB::Util.html_escape_once(I18n.t(key)) - else - I18n.t(key) - end - end -end - -RSpec.configure do |config| - config.include HTMLEscapeHelper -end