From 9d093a20ccffbb759e7b19294505493b433459ed Mon Sep 17 00:00:00 2001 From: Michael Scrivo Date: Wed, 8 Jul 2026 14:28:33 -0400 Subject: [PATCH 1/2] Test against Ruby 3.3, 3.4 and 4.0; drop EOL Rubies from CI Ruby 3.0-3.2 are all end-of-life (3.2 reached EOL in March 2026), so drop them from the CI matrix and test against 3.3, 3.4 and 4.0 instead. required_ruby_version and rubocop's TargetRubyVersion move to 3.3 to match, following the precedent set in 0.4.0 when Ruby < 3.0 support was dropped. Supporting changes needed for the new Rubies: - update rubocop 1.64 -> 1.88 in the lockfile: 1.64 cannot load on Ruby 4.0 (it requires the benchmark gem, removed from default gems) - migrate .rubocop.yml from require: to plugins: for rubocop 1.72+ - update nokogiri 1.16 -> 1.19 in the lockfile: 1.16 has no support for Ruby 3.4+ - add x86_64-linux and arm64-darwin to lockfile platforms so CI and local installs use precompiled nokogiri instead of building from source The rubocop update also drops the transitive rexml dependency entirely (the last three dependabot PRs were all rexml security bumps). Tests and rubocop verified green locally on Ruby 4.0.5: 54 examples, 0 failures, no offenses. Co-Authored-By: Claude Fable 5 --- .github/workflows/build.yml | 4 +-- .rubocop.yml | 4 +-- CHANGELOG.md | 3 ++ Gemfile.lock | 62 ++++++++++++++++++++++--------------- html2text.gemspec | 2 +- 5 files changed, 45 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fabcbe2..768aaeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['3.0', '3.1', '3.2', '3.3'] + ruby-version: ['3.3', '3.4', '4.0'] steps: - uses: actions/checkout@v4 @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['3.0', '3.1', '3.2', '3.3'] + ruby-version: ['3.3', '3.4', '4.0'] steps: - uses: actions/checkout@v4 diff --git a/.rubocop.yml b/.rubocop.yml index 6e22451..069012c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,10 +1,10 @@ -require: +plugins: - rubocop-performance - rubocop-rake AllCops: NewCops: enable - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.3 Metrics/MethodLength: Max: 30 diff --git a/CHANGELOG.md b/CHANGELOG.md index fabaac8..d78f4b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased](https://github.com/soundasleep/html2text_ruby/compare/v0.4.0...master) +### Changed +- Require Ruby 3.3+; CI now tests Ruby 3.3, 3.4 and 4.0 ([#42](https://github.com/soundasleep/html2text_ruby/pull/42)) +- Update development dependencies (rubocop 1.88, nokogiri 1.19 in the lockfile), removing the transitive `rexml` dependency ([#42](https://github.com/soundasleep/html2text_ruby/pull/42)) ## [0.4.0](https://github.com/soundasleep/html2text_ruby/compare/0.3.1...v0.4.0) - 2024-06-08 ### Added diff --git a/Gemfile.lock b/Gemfile.lock index 0543b78..deb1c8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,27 +7,32 @@ PATH GEM remote: https://rubygems.org/ specs: - ast (2.4.2) + ast (2.4.3) bundler-audit (0.6.1) bundler (>= 1.2.0, < 3) thor (~> 0.18) colorize (0.7.7) diff-lcs (1.3) - json (2.7.2) - language_server-protocol (3.17.0.3) - mini_portile2 (2.8.7) - nokogiri (1.16.5) + json (2.20.0) + language_server-protocol (3.17.0.6) + lint_roller (1.1.0) + mini_portile2 (2.8.9) + nokogiri (1.19.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) - parallel (1.24.0) - parser (3.3.2.0) + nokogiri (1.19.4-arm64-darwin) + racc (~> 1.4) + nokogiri (1.19.4-x86_64-linux-gnu) + racc (~> 1.4) + parallel (2.1.0) + parser (3.3.11.1) ast (~> 2.4.1) racc - racc (1.8.0) + prism (1.9.0) + racc (1.8.1) rainbow (3.1.1) rake (12.3.3) - regexp_parser (2.9.2) - rexml (3.3.9) + regexp_parser (2.12.0) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) @@ -43,30 +48,37 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (1.64.1) + rubocop (1.88.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) - parallel (~> 1.10) + 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 (>= 1.8, < 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.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) - parser (>= 3.3.1.0) - rubocop-performance (1.21.0) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rake (0.6.0) - rubocop (~> 1.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.50.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) ruby-progressbar (1.13.0) thor (0.20.3) - unicode-display_width (2.5.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) PLATFORMS + arm64-darwin ruby + x86_64-linux DEPENDENCIES bundler-audit diff --git a/html2text.gemspec b/html2text.gemspec index 4385634..4a29d3d 100644 --- a/html2text.gemspec +++ b/html2text.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.summary = 'Convert HTML into plain text.' s.description = 'A Ruby component to convert HTML into a plain text format.' s.license = 'MIT' - s.required_ruby_version = '>= 3.0' + s.required_ruby_version = '>= 3.3' s.files = Dir['lib/**/*', 'LICENSE.md', 'README.md', 'CHANGELOG.md'] From c0e458f71d6a9e7eec7747ce021aa6608f60c5e5 Mon Sep 17 00:00:00 2001 From: Michael Scrivo Date: Wed, 8 Jul 2026 14:30:54 -0400 Subject: [PATCH 2/2] Update rake 12.3 -> 13.4 for Ruby 4.0 rake 12.3.3 requires ostruct, which Ruby 4.0 removed from the default gems, so `bundle exec rake` could not load at all on Ruby 4.0 in CI. Co-Authored-By: Claude Fable 5 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index deb1c8a..6974188 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM prism (1.9.0) racc (1.8.1) rainbow (3.1.1) - rake (12.3.3) + rake (13.4.2) regexp_parser (2.12.0) rspec (3.8.0) rspec-core (~> 3.8.0)