Skip to content

Align the Bundler credential_store false vocabulary with to_bool - #9821

Merged
hsbt merged 3 commits into
masterfrom
credential-store-boolean-vocabulary
Aug 28, 2026
Merged

Align the Bundler credential_store false vocabulary with to_bool#9821
hsbt merged 3 commits into
masterfrom
credential-store-boolean-vocabulary

Conversation

@hsbt

@hsbt hsbt commented Aug 27, 2026

Copy link
Copy Markdown
Member

credential_store was the only Bundler setting that read off as disabled. Every other setting goes through Settings#to_bool, whose false vocabulary is false, f, no, n, 0 and the empty string, so off reads as true everywhere else.

The setting is tri-state, returning nil when disabled, true for the platform's native store and a String naming a backend, so it cannot simply call to_bool. The disabled branch now delegates to #to_bool so the two cannot drift again. The true list stays, since it tells the spellings to_bool reads as true apart from a backend name. That is also why on stays in it. to_bool reads on as true, so dropping it would move on away from the answer this change is aligning on.

off now reaches the backend branch, and it does so loudly rather than silently. Gem::CredentialStore.resolve_backend cannot load a backend by that name, warns Credential store backend "off" is not installed, and falls back to the config file, which is where off already put the credential. The setting has not shipped yet and off was never documented, so nothing breaks.

Gem::ConfigFile keeps off on purpose. Its list is not the serializer's either way, since Gem::YAMLSerializer resolves only literal true and false and a gemrc saying off reaches normalize_credential_store as a String. It stays because nothing on that side shares a boolean vocabulary the way Bundler's forty-odd BOOL_KEYS share #to_bool.

hsbt and others added 2 commits August 27, 2026 14:56
`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
hsbt force-pushed the credential-store-boolean-vocabulary branch from 56c2201 to d12e41a Compare August 27, 2026 05:58
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>
@hsbt
hsbt merged commit 18e74ac into master Aug 28, 2026
110 checks passed
@hsbt
hsbt deleted the credential-store-boolean-vocabulary branch August 28, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant