From aecc1fbf468cdaf3d84ce88b01abac86556b8545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl-Ian=20Havard?= Date: Mon, 25 Nov 2024 22:16:46 +0100 Subject: [PATCH 1/3] Update Github Actions configuration --- .github/workflows/unit-tests.yml | 10 +++++++++- dev/gemfiles/rails-7.2.x.gemfile | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 dev/gemfiles/rails-7.2.x.gemfile diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index a4bcc97..73a9e81 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,14 +14,22 @@ jobs: gemfile: [ dev/gemfiles/rails-7.0.x.gemfile, dev/gemfiles/rails-7.1.x.gemfile, + dev/gemfiles/rails-7.2.x.gemfile, Gemfile ] exclude: - # Exclude rubies < 3.1 for ActiveModel >= 7.2 + # Exclude rubies < 3.1 for ActiveModel ~> 7.2 + - ruby: "2.7" + gemfile: dev/gemfiles/rails-7.2.x.gemfile + - ruby: "3.0" + gemfile: dev/gemfiles/rails-7.2.x.gemfile + # Exclude rubies < 3.2 for ActiveModel ~> 8.0 - ruby: "2.7" gemfile: Gemfile - ruby: "3.0" gemfile: Gemfile + - ruby: "3.1" + gemfile: Gemfile env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} steps: diff --git a/dev/gemfiles/rails-7.2.x.gemfile b/dev/gemfiles/rails-7.2.x.gemfile new file mode 100644 index 0000000..6c7d63d --- /dev/null +++ b/dev/gemfiles/rails-7.2.x.gemfile @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +gemspec path: '../..' + +group :development, :test do + gem 'rails', '~> 7.2.0' + gem 'sqlite3', '~> 1.4' + gem 'shoulda-matchers', '~> 5.0' + + gem 'net-imap' + gem 'net-pop' + gem 'net-smtp' +end From 0801d82c04ac6c3f7953399d3014988e618358c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl-Ian=20Havard?= Date: Mon, 25 Nov 2024 22:21:27 +0100 Subject: [PATCH 2/3] Fix RuboCop offenses --- Gemfile | 2 +- Gemfile.lock | 171 ++++++++++++++++--------------- Rakefile | 4 +- dev/gemfiles/rails-7.0.x.gemfile | 2 +- dev/gemfiles/rails-7.1.x.gemfile | 2 +- dev/gemfiles/rails-7.2.x.gemfile | 2 +- 6 files changed, 93 insertions(+), 90 deletions(-) diff --git a/Gemfile b/Gemfile index fb552c3..76c414e 100644 --- a/Gemfile +++ b/Gemfile @@ -8,9 +8,9 @@ gemspec group :development, :test do # Dummy app dependencies gem 'puma' + gem 'shoulda-matchers', '~> 6.0' gem 'sprockets-rails' # Optional in Rails 7.0+ gem 'sqlite3' - gem 'shoulda-matchers', '~> 6.0' gem 'rubocop', require: false gem 'rubocop-performance', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 99d7c35..1976e33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,46 +10,45 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.2.1) - actionpack (= 7.2.1) - activesupport (= 7.2.1) + actioncable (8.0.0) + actionpack (= 8.0.0) + activesupport (= 8.0.0) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.1) - actionpack (= 7.2.1) - activejob (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + actionmailbox (8.0.0) + actionpack (= 8.0.0) + activejob (= 8.0.0) + activerecord (= 8.0.0) + activestorage (= 8.0.0) + activesupport (= 8.0.0) mail (>= 2.8.0) - actionmailer (7.2.1) - actionpack (= 7.2.1) - actionview (= 7.2.1) - activejob (= 7.2.1) - activesupport (= 7.2.1) + actionmailer (8.0.0) + actionpack (= 8.0.0) + actionview (= 8.0.0) + activejob (= 8.0.0) + activesupport (= 8.0.0) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.1) - actionview (= 7.2.1) - activesupport (= 7.2.1) + actionpack (8.0.0) + actionview (= 8.0.0) + activesupport (= 8.0.0) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.2) + rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.1) - actionpack (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + actiontext (8.0.0) + actionpack (= 8.0.0) + activerecord (= 8.0.0) + activestorage (= 8.0.0) + activesupport (= 8.0.0) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.1) - activesupport (= 7.2.1) + actionview (8.0.0) + activesupport (= 8.0.0) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) @@ -57,23 +56,24 @@ GEM active_model_validations_reflection (0.1.2) activemodel (>= 3.2) activesupport (>= 3.2) - activejob (7.2.1) - activesupport (= 7.2.1) + activejob (8.0.0) + activesupport (= 8.0.0) globalid (>= 0.3.6) - activemodel (7.2.1) - activesupport (= 7.2.1) - activerecord (7.2.1) - activemodel (= 7.2.1) - activesupport (= 7.2.1) + activemodel (8.0.0) + activesupport (= 8.0.0) + activerecord (8.0.0) + activemodel (= 8.0.0) + activesupport (= 8.0.0) timeout (>= 0.4.0) - activestorage (7.2.1) - actionpack (= 7.2.1) - activejob (= 7.2.1) - activerecord (= 7.2.1) - activesupport (= 7.2.1) + activestorage (8.0.0) + actionpack (= 8.0.0) + activejob (= 8.0.0) + activerecord (= 8.0.0) + activesupport (= 8.0.0) marcel (~> 1.0) - activesupport (7.2.1) + activesupport (8.0.0) base64 + benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) @@ -83,19 +83,21 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) - acts_as_list (1.2.2) + uri (>= 0.13.1) + acts_as_list (1.2.4) activerecord (>= 6.1) activesupport (>= 6.1) ast (2.4.2) base64 (0.2.0) + benchmark (0.4.0) bigdecimal (3.1.8) builder (3.3.0) - cocooned (2.4.0) - rails (>= 7.0, <= 8.0) + cocooned (2.4.1) + rails (>= 7.0, < 8.1) concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) - date (3.3.4) + date (3.4.0) diff-lcs (1.5.1) drb (2.2.1) erubi (1.13.0) @@ -107,10 +109,10 @@ GEM irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) + json (2.8.2) language_server-protocol (3.17.0.3) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -120,8 +122,8 @@ GEM net-smtp marcel (1.0.4) mini_mime (1.1.5) - minitest (5.25.1) - net-imap (0.4.16) + minitest (5.25.2) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) @@ -130,40 +132,39 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) parallel (1.26.3) - parser (3.3.5.0) + parser (3.3.6.0) ast (~> 2.4.1) racc - psych (5.1.2) + psych (5.2.0) stringio - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) - rails (7.2.1) - actioncable (= 7.2.1) - actionmailbox (= 7.2.1) - actionmailer (= 7.2.1) - actionpack (= 7.2.1) - actiontext (= 7.2.1) - actionview (= 7.2.1) - activejob (= 7.2.1) - activemodel (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + rails (8.0.0) + actioncable (= 8.0.0) + actionmailbox (= 8.0.0) + actionmailer (= 8.0.0) + actionpack (= 8.0.0) + actiontext (= 8.0.0) + actionview (= 8.0.0) + activejob (= 8.0.0) + activemodel (= 8.0.0) + activerecord (= 8.0.0) + activestorage (= 8.0.0) + activesupport (= 8.0.0) bundler (>= 1.15.0) - railties (= 7.2.1) + railties (= 8.0.0) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -171,9 +172,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.2.1) - actionpack (= 7.2.1) - activesupport (= 7.2.1) + railties (8.0.0) + actionpack (= 8.0.0) + activesupport (= 8.0.0) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -181,25 +182,25 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rdoc (6.7.0) + rdoc (6.8.1) psych (>= 4.0.0) regexp_parser (2.9.2) - reline (0.5.10) + reline (0.5.11) io-console (~> 0.5) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.1) + rspec-core (3.13.2) rspec-support (~> 3.13.0) rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) - rubocop (1.66.1) + rubocop (1.68.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -209,22 +210,22 @@ GEM rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.3) + rubocop-ast (1.36.1) parser (>= 3.3.1.0) - rubocop-performance (1.22.1) + rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.26.2) + rubocop-rails (2.27.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (3.1.0) + rubocop-rspec (3.2.0) rubocop (~> 1.61) ruby-progressbar (1.13.0) - securerandom (0.3.1) + securerandom (0.3.2) shoulda-matchers (6.4.0) activesupport (>= 5.2.0) sprockets (4.2.1) @@ -234,19 +235,19 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.1.0-x86_64-linux-gnu) - stringio (3.1.1) + sqlite3 (2.3.1-x86_64-linux-gnu) + stringio (3.1.2) thor (1.3.2) - timeout (0.4.1) + timeout (0.4.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.6.0) + uri (1.0.2) useragent (0.16.10) - webrick (1.8.2) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS x86_64-linux diff --git a/Rakefile b/Rakefile index 7b9d8d2..9fcf0c7 100644 --- a/Rakefile +++ b/Rakefile @@ -12,6 +12,8 @@ require 'rspec/core/rake_task' RSpec::Core::RakeTask.new require 'rubocop/rake_task' -RuboCop::RakeTask.new +RuboCop::RakeTask.new do |task| + task.options = ['--config', 'dev/rubocop.yml'] +end task default: :spec diff --git a/dev/gemfiles/rails-7.0.x.gemfile b/dev/gemfiles/rails-7.0.x.gemfile index 36f8115..45a853e 100644 --- a/dev/gemfiles/rails-7.0.x.gemfile +++ b/dev/gemfiles/rails-7.0.x.gemfile @@ -6,8 +6,8 @@ gemspec path: '../..' group :development, :test do gem 'rails', '~> 7.0.0' - gem 'sqlite3', '~> 1.4' gem 'shoulda-matchers', '~> 5.0' + gem 'sqlite3', '~> 1.4' gem 'net-imap' gem 'net-pop' diff --git a/dev/gemfiles/rails-7.1.x.gemfile b/dev/gemfiles/rails-7.1.x.gemfile index fb99088..5f45ff3 100644 --- a/dev/gemfiles/rails-7.1.x.gemfile +++ b/dev/gemfiles/rails-7.1.x.gemfile @@ -6,8 +6,8 @@ gemspec path: '../..' group :development, :test do gem 'rails', '~> 7.1.0' - gem 'sqlite3', '~> 1.4' gem 'shoulda-matchers', '~> 5.0' + gem 'sqlite3', '~> 1.4' gem 'net-imap' gem 'net-pop' diff --git a/dev/gemfiles/rails-7.2.x.gemfile b/dev/gemfiles/rails-7.2.x.gemfile index 6c7d63d..9eb2f14 100644 --- a/dev/gemfiles/rails-7.2.x.gemfile +++ b/dev/gemfiles/rails-7.2.x.gemfile @@ -6,8 +6,8 @@ gemspec path: '../..' group :development, :test do gem 'rails', '~> 7.2.0' - gem 'sqlite3', '~> 1.4' gem 'shoulda-matchers', '~> 5.0' + gem 'sqlite3', '~> 1.4' gem 'net-imap' gem 'net-pop' From 05f884ce647e6d36d66a34ba3a016bb0284b5a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl-Ian=20Havard?= Date: Mon, 25 Nov 2024 22:27:03 +0100 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e46cf9c..d898f67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed +* Add Rails 8.0 to the test matrix (#22) * Reintroduce Ruby 2.7 into the test matrix (#20) So tested rubies match with supported Rails versions minimum requirements * Drop support for Rails 6.1 (#20)