From c1fd50611b565bbd3f948d7d1ee9e986262aa8ae Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Sat, 27 Jun 2026 22:38:28 -0400 Subject: [PATCH 1/5] ci: test against Ruby 3.5 and ruby-head Extend the CI matrix to cover newer Ruby versions so we catch incompatibilities early. Adds Ruby 3.5 to the supported matrix and a non-blocking ruby-head build (continue-on-error) to surface upcoming breakage without failing the suite. Also sets fail-fast: false so one version failing doesn't cancel the rest of the matrix. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f98f8e..e0bec16 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,10 +6,16 @@ on: [push, pull_request] jobs: test-ruby: runs-on: ${{ matrix.os }}-latest + continue-on-error: ${{ matrix.experimental || false }} strategy: + fail-fast: false matrix: os: [ubuntu] - ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"] + ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5"] + include: + - os: ubuntu + ruby-version: "head" + experimental: true steps: - uses: actions/checkout@v2 - name: Setup Ruby ${{ matrix.ruby-version }} From 36483746d6c6c1de6d1a7e7c9c9fee01b994634d Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Sat, 27 Jun 2026 22:42:46 -0400 Subject: [PATCH 2/5] ci: target Ruby 4.0 stable instead of 3.5 Ruby 3.5 never shipped as a stable release; the December 2025 release was branded Ruby 4.0. Point the matrix at the actual current stable (4.0) instead of the 3.5 preview line. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0bec16..9004672 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: os: [ubuntu] - ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5"] + ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0"] include: - os: ubuntu ruby-version: "head" From a4a180351ce357690f0d2a85cd6d8bd8e5798c41 Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Sun, 28 Jun 2026 17:23:51 -0400 Subject: [PATCH 3/5] deps: support Ruby 4.0 (ostruct, terminal-table 4.0, loosen linters) Co-Authored-By: Claude Opus 4.8 (1M context) --- Gemfile | 4 ++-- skunk.gemspec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 52aa166..6d1cc79 100644 --- a/Gemfile +++ b/Gemfile @@ -7,5 +7,5 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in skunk.gemspec gemspec -gem "reek", "~> 6.1" -gem "rubocop", "~> 1.48" +gem "reek" +gem "rubocop" diff --git a/skunk.gemspec b/skunk.gemspec index 0252525..b519092 100644 --- a/skunk.gemspec +++ b/skunk.gemspec @@ -38,12 +38,12 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] + spec.add_dependency "ostruct", "~> 0.6" spec.add_dependency "path_expander", "< 2.0" spec.add_dependency "rubycritic", ">= 4.5.2", "< 5.0" - spec.add_dependency "terminal-table", "~> 3.0" + spec.add_dependency "terminal-table", "~> 4.0" spec.add_development_dependency "codecov", "~> 0.1.16" - spec.add_development_dependency "debug" spec.add_development_dependency "minitest", "< 6" spec.add_development_dependency "minitest-around", "~> 0.5.0" spec.add_development_dependency "minitest-stub_any_instance", "~> 1.0.2" From 1b51c08a72b9968bc3792ac8c6a399b43ab12d8c Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Sun, 28 Jun 2026 17:32:08 -0400 Subject: [PATCH 4/5] deps: keep terminal-table ~> 3.0 for Ruby 2.6/2.7 compatibility terminal-table 4.0 requires unicode-display_width ~> 3.0, which conflicts with every rubocop that still supports Ruby 2.7 (needs < 3.0). Bundler silently backtracked rubocop to 0.7.2, which lacks rubocop/rake_task and broke the suite on 2.6/2.7. terminal-table 3.x works on Ruby 4.0, so the 4.0 bump was unnecessary. Co-Authored-By: Claude Opus 4.8 (1M context) --- skunk.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skunk.gemspec b/skunk.gemspec index b519092..eb37979 100644 --- a/skunk.gemspec +++ b/skunk.gemspec @@ -41,7 +41,7 @@ Gem::Specification.new do |spec| spec.add_dependency "ostruct", "~> 0.6" spec.add_dependency "path_expander", "< 2.0" spec.add_dependency "rubycritic", ">= 4.5.2", "< 5.0" - spec.add_dependency "terminal-table", "~> 4.0" + spec.add_dependency "terminal-table", "~> 3.0" spec.add_development_dependency "codecov", "~> 0.1.16" spec.add_development_dependency "minitest", "< 6" From 49e2b5b9098c61b261857c84779376c6f941e36c Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Sun, 28 Jun 2026 17:36:17 -0400 Subject: [PATCH 5/5] test: reset Skunk::Config to fix order-dependent formats test Skunk::Config is a process-global singleton. config_test.rb mutated Config.formats but only reset in setup, so it leaked [:html, :json] into other files. Under minitest's randomized order this intermittently failed argv_test.rb's 'defaults to console format' expectation (seen on the Ruby 3.2 CI job). Reset Config in config_test teardown and before/after the argv formats tests so the suite is order-independent. Co-Authored-By: Claude Opus 4.8 (1M context) --- test/lib/skunk/cli/options/argv_test.rb | 4 ++++ test/lib/skunk/config_test.rb | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/test/lib/skunk/cli/options/argv_test.rb b/test/lib/skunk/cli/options/argv_test.rb index 20bfb45..987b93b 100644 --- a/test/lib/skunk/cli/options/argv_test.rb +++ b/test/lib/skunk/cli/options/argv_test.rb @@ -26,6 +26,10 @@ end describe "#formats" do + before do + Skunk::Config.reset + end + after do Skunk::Config.reset end diff --git a/test/lib/skunk/config_test.rb b/test/lib/skunk/config_test.rb index a04e1c6..e708eae 100644 --- a/test/lib/skunk/config_test.rb +++ b/test/lib/skunk/config_test.rb @@ -11,6 +11,12 @@ def setup Config.reset end + # Reset again after each test so the global singleton does not leak + # mutated formats into tests in other files (minitest randomizes order) + def teardown + Config.reset + end + def test_default_format assert_equal [:console], Config.formats end