From 349af266187b76d72c2507abfa2e037e34eb747c Mon Sep 17 00:00:00 2001 From: Dmitry Vorotilin Date: Wed, 21 Oct 2026 17:15:00 +0300 Subject: [PATCH] chore: drop Ruby 3.1 support Ruby 3.1 is EOL and ruby/setup-ruby has no build for it on ubuntu-latest (26.04), so the 3.1 CI jobs fail at setup. Require Ruby >= 3.2, remove 3.1 from the test and linter matrices, and target 3.2 in RuboCop. Keep named argument forwarding so YARD @param tags still match method signatures. --- .github/workflows/linter.yml | 2 +- .github/workflows/tests.yml | 2 +- .rubocop.yml | 5 ++++- AGENTS.md | 4 ++-- CHANGELOG.md | 1 + ferrum.gemspec | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 0b737f8d..76e617e9 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.1", "4.0"] + ruby: ["3.2", "4.0"] runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c58639ce..ff3f5241 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.1", "3.2", "3.3", "3.4", "4.0"] + ruby: ["3.2", "3.3", "3.4", "4.0"] runs-on: ubuntu-latest timeout-minutes: 20 env: diff --git a/.rubocop.yml b/.rubocop.yml index e9b9e3f6..5389b03f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 3.1 + TargetRubyVersion: 3.2 NewCops: enable SuggestExtensions: false @@ -26,6 +26,9 @@ Naming/FileName: Style/StringLiterals: EnforcedStyle: double_quotes +Style/ArgumentsForwarding: + UseAnonymousForwarding: false + Style/MultilineBlockChain: Exclude: - spec/**/* diff --git a/AGENTS.md b/AGENTS.md index 15abc2f0..faa048d9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ HEADLESS=false bundle exec rspec ... # watch the browser ``` The suite boots a real Chrome and a Sinatra/Puma test app (`spec/support/application.rb`, views in -`spec/support/views/`). CI runs Ruby 3.1 to 4.0 against stable Chrome. +`spec/support/views/`). CI runs Ruby 3.2 to 4.0 against stable Chrome. ## Tests @@ -40,7 +40,7 @@ The suite boots a real Chrome and a Sinatra/Puma test app (`spec/support/applica ## Code style -- Ruby >= 3.1, `# frozen_string_literal: true`, double quotes, RuboCop config in `.rubocop.yml`. +- Ruby >= 3.2, `# frozen_string_literal: true`, double quotes, RuboCop config in `.rubocop.yml`. - Prefer self-documenting code over comments. Document public methods with YARD (`@param`, `@return`, `@raise`). - Add or update RBS types in `sig/` for anything you touch. - American English everywhere: code, comments, docs, errors, commits. diff --git a/CHANGELOG.md b/CHANGELOG.md index ef12d3b0..a3206ce8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ ### Removed - `Browser::Process#default_user_agent`, `#browser_version`, `#protocol_version`, `#v8_version` and `#webkit_version`, use `Browser#default_user_agent` and `Browser#version` instead +- Ruby 3.1 support, Ferrum requires Ruby 3.2 or newer ## [0.19.1](https://github.com/rubycdp/ferrum/compare/v0.19.0...v0.19.1) (October 16, 2026) ## diff --git a/ferrum.gemspec b/ferrum.gemspec index 1f693125..1f78712e 100644 --- a/ferrum.gemspec +++ b/ferrum.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |s| "rubygems_mfa_required" => "true" } - s.required_ruby_version = ">= 3.1" + s.required_ruby_version = ">= 3.2" s.add_dependency "addressable", "~> 2.5" s.add_dependency "base64", "~> 0.2"