Align the Bundler credential_store false vocabulary with to_bool - #9821
Merged
Conversation
`credential_store` was the only Bundler setting that read `off` as disabled, while every other setting goes through `Settings#to_bool`, whose false vocabulary has never had it. The disabled branch now delegates to `#to_bool` so the two cannot drift again. The true list stays because the setting is tri-state and the boolean spellings still have to be told apart from a backend name. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The two sides of one setting now disagree on `off`, so the list has to say why it stays wider here. Nothing on the way in turns `off` into a boolean, and nothing on this side shares the single vocabulary that Bundler's boolean settings all run through. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hsbt
force-pushed
the
credential-store-boolean-vocabulary
branch
from
August 27, 2026 05:58
56c2201 to
d12e41a
Compare
They sit after `private`, which does not apply to constants, so both are public API today. Nothing outside the file reads them, and the setting has not shipped, so this is the last release where making them private costs nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
credential_storewas the only Bundler setting that readoffas disabled. Every other setting goes throughSettings#to_bool, whose false vocabulary isfalse,f,no,n,0and the empty string, sooffreads as true everywhere else.The setting is tri-state, returning
nilwhen disabled,truefor the platform's native store and a String naming a backend, so it cannot simply callto_bool. The disabled branch now delegates to#to_boolso the two cannot drift again. The true list stays, since it tells the spellingsto_boolreads as true apart from a backend name. That is also whyonstays in it.to_boolreadsonas true, so dropping it would moveonaway from the answer this change is aligning on.offnow reaches the backend branch, and it does so loudly rather than silently.Gem::CredentialStore.resolve_backendcannot load a backend by that name, warnsCredential store backend "off" is not installed, and falls back to the config file, which is whereoffalready put the credential. The setting has not shipped yet andoffwas never documented, so nothing breaks.Gem::ConfigFilekeepsoffon purpose. Its list is not the serializer's either way, sinceGem::YAMLSerializerresolves only literaltrueandfalseand a gemrc sayingoffreachesnormalize_credential_storeas a String. It stays because nothing on that side shares a boolean vocabulary the way Bundler's forty-oddBOOL_KEYSshare#to_bool.