Let the gem and bundle cooldown settings cover each other - #9852
Merged
Conversation
Gem::BundlerVersionFinder resolved Bundler's config files itself, and got two of the paths wrong: it ignored BUNDLE_APP_CONFIG, and it concatenated BUNDLE_USER_HOME and the home directory with the file name instead of joining them, so BUNDLE_VERSION set in ~/.bundle/config was never found. It also matched BUNDLE_VERSION with a regex of its own rather than parsing the file, which let a value that is not a version through to Gem::Version. Gem::BundlerSettings now does the resolution for every RubyGems caller that has to agree with something configured for Bundler. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Each of the five commands that take the flag validated it and set it as a command option itself, and install read it under a string key while the rest used a symbol. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Setting a cooldown for one of the two tools left the other unprotected, since `gem` only read the `:cooldown:` gemrc setting and bundler only read its own. They now read both, and the longer of the two applies, so either setting alone covers `gem install` and `bundle install` alike. A configured 0 takes part like any other value rather than reading as unset, which keeps `--cooldown 0` the way to bypass a cooldown the other tool configures: the flag wins outright, ahead of both settings and of the Gemfile per-source value. Gem::CooldownSettings holds the value rules both tools now share, so a value that cannot be read as a number of days warns, naming where it came from, and takes no part in the resolution on either side. On the bundler side such a value used to read as 0 and suppress a per-source `cooldown:` in the Gemfile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The gemrc value takes part in resolving the cooldown but is not one of the config layers, so `bundle config get cooldown` answered that nothing was configured, then exited 1, while the cooldown was in force. It is listed like a stored credential now, which is the other value the config files do not hold. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Cooldown resolution reads Bundler's settings now, so a developer with one configured in their shell saw it applied to the fixtures: four install command tests and two update command tests failed under BUNDLE_COOLDOWN=60. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hsbt
force-pushed
the
cooldown-cross-reference
branch
from
September 4, 2026 01:58
da96c8f to
42e80d8
Compare
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.
Setting a cooldown for one of the two tools left the other unprotected.
gemread only the:cooldown:gemrc setting and bundler only its own, so aBUNDLE_COOLDOWNin a shell profile did nothing forgem install. Both now read both settings and the longer one applies.gem --cooldownhas not shipped in a release yet, so no released behavior changes.A configured
0takes part like any other value rather than reading as unset, which keeps--cooldown 0the way to bypass a cooldown the other tool configures. The flag wins outright, ahead of both settings and of the Gemfile per-source value.Gem::CooldownSettingsholds the value rules both tools now share.Gem::BundlerSettingsreads Bundler's config the wayBundler::Settingsdoes, and foldingGem::BundlerVersionFinderonto it fixes an ignoredBUNDLE_APP_CONFIGand a missing path separator that keptBUNDLE_VERSIONin~/.bundle/configfrom ever being read.Generated with Claude Code