From 4f02032a5df5cee883ae0bd497818497924fb9eb Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Feb 2026 10:35:48 +0000 Subject: [PATCH] Fix CI: use File.expand_path for test requires in -e context Dir glob returns relative paths like "test/test_cache.rb". Plain require looks for these relative to load paths (-Itest), resulting in "test/test/test_cache.rb". Using File.expand_path converts to absolute paths which resolve correctly. https://claude.ai/code/session_01CvCNpdSjh1STBdmS9n5DN9 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d172d4..d40aa58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: ruby-version: ${{ matrix.ruby-version }} - name: Run tests - run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require f }" + run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require File.expand_path(f) }" - name: Verify gem builds run: gem build ipdata.gemspec diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7393555..7004923 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,7 +75,7 @@ jobs: ruby-version: "3.3" - name: Run tests - run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require f }" + run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require File.expand_path(f) }" - name: Build gem run: gem build ipdata.gemspec