Repository navigation
Use require_relative, bump to Ruby 4.0, drop ActiveSupport and upgrade to minitest 6 - #149
Merged
Merged
Conversation
Loading the gem's own files with require_relative avoids a $LOAD_PATH search for each one and guarantees the files come from this gem rather than whatever else is on the load path. Co-authored-by: Hartley McGuire <hartley.mcguire@shopify.com>
Set .ruby-version to 4.0.9 and add Ruby 4.0 to the CI matrix. Ruby 3.1 and 3.2 are end of life, so require Ruby 3.3 or newer and drop them from the matrix. Ruby 4.0 no longer ships ostruct as a default gem, so drop the unused require from the test helper and update pry, pry-byebug and byebug to versions that don't need it. minitest 5.25 doesn't allow Ruby 4.0, so it moves to 5.27. Co-authored-by: Hartley McGuire <hartley.mcguire@shopify.com>
The integration test only used ActiveSupport for the `test` macro and `present?`. Make it a plain Minitest::Test with `def test_*` methods and use assert_nil / refute_empty directly, then drop the development dependency. Co-authored-by: Hartley McGuire <hartley.mcguire@shopify.com>
Now that ActiveSupport no longer pins minitest below 6, require ~> 6.0 and move minitest-focus to 1.4.1, which allows it. Replace the one assert_equal(nil, ...) with assert_nil, since minitest 6 rejects it. Co-authored-by: Hartley McGuire <hartley.mcguire@shopify.com>
hmcguire-shopify
marked this pull request as ready for review
November 10, 2026 23:30
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A handful of maintenance changes, one per commit:
require_relativefor internal requires.lib/graphql/metrics.rbloads its own files withrequire_relative "metrics/..."instead of searching$LOAD_PATH. The gemspec already did this for the version file..ruby-version, adds Ruby 4.0 to the CI matrix, and raisesrequired_ruby_versionto>= 3.3(3.1 and 3.2 are end of life). Ruby 4.0 no longer shipsostructas a default gem, so the unusedrequire 'ostruct'in the test helper goes, and pry / pry-byebug / byebug move to versions that don't need it. minitest 5.25 doesn't allow Ruby 4.0, so the lock moves to 5.27 in this commit.test "..." domacro andpresent?. It's now a plainMinitest::Testwithdef test_*methods andassert_nil/refute_empty, and theactivesupportdevelopment dependency is gone.~> 6.0(minitest-focus 1.4.1 allows it) and replaces the oneassert_equal(nil, ...), which minitest 6 rejects.Lockfile changes were made with
bundle lock --update <gems> --conservative, so no other gems moved.Tested locally:
bundle exec rake testpasses (28 runs, 0 failures) on Ruby 4.0.9 and 3.4 with the root Gemfile, and on Ruby 4.0.9 withgemfiles/graphql_2.3.gemfile.