Skip to content

Conversation

@afurm
Copy link
Member

@afurm afurm commented Dec 21, 2025

What was the end-user or developer problem that led to this PR?

The trailing-slash normalization behavior in Bundler affects lockfile expectations (gem sources keep a trailing slash, git sources do not), but there were no focused specs to lock that behavior. This made future normalization changes risky and prone to unintended lockfile diffs.

What is your fix for the problem, implemented in this PR?

Add a focused spec for Bundler::URINormalizer.normalize_suffix covering both trailing_slash: true and false with inputs that do and do not already include a trailing slash. This locks the current behavior and makes future refactors safer.

Tests:

  • cd bundler && bin/rspec spec/bundler/uri_normalizer_spec.rb (fails locally: missing rubygems-generate_index gem)

Make sure the following tasks are checked

  • Describe the problem / feature
  • Write tests for features and bug fixes
  • Write code to solve the problem
  • Make sure you follow the current code style and write meaningful commit messages without tags

@hsbt hsbt enabled auto-merge December 23, 2025 01:13
Copy link
Member

@hsbt hsbt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hsbt hsbt merged commit 9d8c454 into ruby:master Dec 23, 2025
81 checks passed
hsbt added a commit that referenced this pull request Dec 23, 2025
Add URINormalizer trailing slash specs

(cherry picked from commit 9d8c454)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants