Upgrade to Ruby 3.2 and replace unmaintained dependencies - #18
Open
benrfairless wants to merge 3 commits into
Open
Upgrade to Ruby 3.2 and replace unmaintained dependencies#18benrfairless wants to merge 3 commits into
benrfairless wants to merge 3 commits into
Conversation
10 tasks
benrfairless
marked this pull request as ready for review
August 12, 2026 01:51
10 tasks
benrfairless
force-pushed
the
chore/upgrade-ruby
branch
from
August 12, 2026 03:00
8685d88 to
60f5839
Compare
ianheggie-oaf
approved these changes
Aug 12, 2026
ianheggie-oaf
left a comment
Member
There was a problem hiding this comment.
Approved - LGTM at a glance
Ruby 2.7 has been end-of-life since March 2023 and the gem depended on rest-client and archive-tar-minitar, both long unmaintained. This brings the gem up to currently supported Rubies: - Pin .ruby-version to 3.4.10 and set required_ruby_version >= 3.3 (the currently supported Ruby series as of August 2026) - Replace rest-client with faraday + faraday-multipart, streaming the run output via Faraday's on_data callback - Replace archive-tar-minitar with the maintained minitar 1.x and its Minitar namespace - Write the upload tarball to a Tempfile instead of the shared, predictable /tmp/out path - Use YAML.safe_load_file with permitted Symbol class when loading ~/.morph (YAML.load_file no longer round-trips symbol keys safely on modern Psych) - Constrain thor, filesize and declare all runtime deps with pessimistic version bounds; move rake/bundler dev deps to Gemfile - Refresh CI matrix to Ruby 3.3/3.4 and bump lint/build/audit jobs to Ruby 3.4; raise RuboCop TargetRubyVersion to 3.3 and regenerate the todo baseline (many entries fixed by the rewrite) Tests, RuboCop, bundler-audit and gem build all pass locally on Ruby 3.4.10. Assisted-by: opencode/anthropic.claude-fable-5 Signed-off-by: Ben Fairless <ben@oaf.org.au>
Morph.io's newest supported Ruby is 3.2, so target that as the baseline instead of 3.3: - Set .ruby-version to 3.2.2 and lower required_ruby_version to >= 3.2 - Add 3.2 to the CI test matrix and run build/lint/audit jobs on 3.2 - Lower RuboCop TargetRubyVersion to 3.2 All runtime dependencies (faraday 2.x, faraday-multipart, minitar 1.x, thor, filesize) resolve on Ruby 3.2; tests, RuboCop and gem build all pass locally on 3.2.2. Assisted-by: Claude Code:anthropic.claude-fable-5
benrfairless
force-pushed
the
chore/upgrade-ruby
branch
from
August 13, 2026 06:03
e05a5da to
9ec76ff
Compare
If Minitar::Output.new raises, the ensure block previously called output.tar.close on nil, raising NoMethodError and masking the original exception. Skip cleanup when output was never assigned. Addresses PR #18 review feedback. Assisted-by: Claude Code:amazon-bedrock/anthropic.claude-fable-5
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.
Description
Upgrades the gem from Ruby 2.7 (EOL March 2023) to currently supported Rubies and replaces its unmaintained dependencies:
.ruby-versionpinned to 3.2.2 (the newest Ruby Morph.io supports);required_ruby_version >= 3.2in the gemspecrest-client(unmaintained) replaced withfaraday+faraday-multipart, keeping the streaming of run output via Faraday'son_datacallbackarchive-tar-minitar(ancient) replaced with maintainedminitar1.xTempfileinstead of the shared, predictable/tmp/outpath (fixes a multi-user clobbering/symlink hazard)~/.morphconfig loaded withYAML.safe_load_file(..., permitted_classes: [Symbol])— plainYAML.load_fileno longer round-trips symbol keys on modern Psychrake/bundlerdev deps moved from gemspec to GemfileTargetRubyVersionset to 3.2 and the todo baseline regenerated (the rewrite fixed many baseline offenses)Motivation and Context
Ruby 2.7 and the pinned dependencies are unsupported and increasingly fail to install on modern systems. Ruby 3.2 is the baseline because it is the newest version Morph.io itself supports, while CI also tests 3.3 and 3.4. This is part 2 of the modernisation series and unblocks the coverage, metadata, and release-automation PRs that follow.
How Has This Been Tested?
On Ruby 3.2.2 (mise):
bundle exec rspec(0 failures),bundle exec rubocop(no offenses),bundle exec bundler-audit check --update(no vulnerabilities),bundle exec rake build, plus a manual smoke test ofmorph version,morph help, and tar creation/read-back viaMinitar::Input. All runtime dependencies (faraday 2.x, faraday-multipart, minitar 1.x, thor, filesize) resolve and pass on 3.2.Screenshots (if appropriate):
N/A
Types of Changes
Breaking only in the sense that the gem now requires Ruby >= 3.2.
Checklist:
README updates (supported Ruby, install instructions) land in part 4 of this series.
Part 2 of the 5-PR modernisation series. Stacked on #17 (base branch
bugfix/fix-ci-trigger); GitHub will retarget tomainwhen #17 merges.Assisted-by: opencode/anthropic.claude-fable-5