feat: normalize gem versions in $GEM_PATH strings.#58
Merged
smudge merged 4 commits intoBetterment:mainfrom Oct 16, 2025
Merged
feat: normalize gem versions in $GEM_PATH strings.#58smudge merged 4 commits intoBetterment:mainfrom
smudge merged 4 commits intoBetterment:mainfrom
Conversation
Upgrading gem versions can be a real pain when it causes a bunch of outstanding `deprecations.ignore` entries to break. This ensures that any lines showing a gem version, e.g.: - $GEM_PATH/chicken-3.4.5/nuggets.rb - $GEM_PATH/chicken-a1b2c3d4/nuggets.rb Will be replaced with: - $GEM_PATH/chicken-$VERSION/nuggets.rb
There was a problem hiding this comment.
Pull Request Overview
Introduces normalization of gem version segments in deprecation messages to stabilize ignore entries across gem upgrades.
- Adds remove_gem_version_number to rewrite paths like $GEM_PATH/gem-1.2.3/... into $GEM_PATH/gem-$VERSION/...
- Updates specs to expect normalized $VERSION placeholders (including SHA-like versions).
- Bumps library version to 1.0.0.
Reviewed Changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| lib/uncruft/deprecation_handler.rb | Adds version normalization logic for gem paths in messages. |
| spec/uncruft/deprecation_handler_spec.rb | Adjusts expectations and adds test case for SHA-like gem version. |
| lib/uncruft/version.rb | Bumps gem version to 1.0.0 reflecting new behavior. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rzane
approved these changes
Oct 16, 2025
Contributor
rzane
left a comment
There was a problem hiding this comment.
domain lgtm
platform lgtm
Maybe we should stop mutating strings...
Member
Author
|
@rzane yeah if I could go back in time and talk to the me who wrote this stuff... |
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.
Upgrading gem versions can be a real pain when it causes a bunch of
outstanding
deprecations.ignoreentries to break.This ensures that any lines showing a gem version, e.g.:
$GEM_PATH/chicken-3.4.5/nuggets.rb$GEM_PATH/chicken-a1b2c3d4/nuggets.rb...will be replaced with:
$GEM_PATH/chicken-$VERSION/nuggets.rb/no-platform