Skip to content

Commit 6f4b304

Browse files
hsbtclaude
andcommitted
Document cooldown in CLI and config man pages
Adds the `--cooldown=NUMBER` option to the install, update, add, and outdated man pages and describes the `cooldown` / `BUNDLE_COOLDOWN` setting in bundle-config, regenerating the rendered .1 files via `rake man:build`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 66b5ab7 commit 6f4b304

10 files changed

Lines changed: 200 additions & 168 deletions

bundler/lib/bundler/man/bundle-add.1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.SH "NAME"
55
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
66
.SH "SYNOPSIS"
7-
\fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT|\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-quiet] [\-\-skip\-install] [\-\-strict|\-\-optimistic]
7+
\fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT|\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-cooldown=NUMBER] [\-\-quiet] [\-\-skip\-install] [\-\-strict|\-\-optimistic]
88
.SH "DESCRIPTION"
99
Adds the named gem to the [\fBGemfile(5)\fR][Gemfile(5)] and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
1010
.SH "OPTIONS"
@@ -53,6 +53,9 @@ Adds pessimistic declaration of version\.
5353
.TP
5454
\fB\-\-strict\fR
5555
Adds strict declaration of version\.
56+
.TP
57+
\fB\-\-cooldown=<number>\fR
58+
Only consider gem versions published at least \fInumber\fR days ago when resolving\. Pass \fB0\fR to disable cooldown for this run\. See \fBcooldown\fR in bundle\-config(1) for precedence rules\.
5659
.SH "EXAMPLES"
5760
.IP "1." 4
5861
You can add the \fBrails\fR gem to the Gemfile without any version restriction\. The source of the gem will be the global source\.

bundler/lib/bundler/man/bundle-add.1.ronn

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bundle-add(1) -- Add gem to the Gemfile and run bundle install
55

66
`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE]
77
[--path=PATH] [--git=GIT|--github=GITHUB] [--branch=BRANCH] [--ref=REF]
8-
[--quiet] [--skip-install] [--strict|--optimistic]
8+
[--cooldown=NUMBER] [--quiet] [--skip-install] [--strict|--optimistic]
99

1010
## DESCRIPTION
1111

@@ -59,6 +59,11 @@ Adds the named gem to the [`Gemfile(5)`][Gemfile(5)] and run `bundle install`.
5959
* `--strict`:
6060
Adds strict declaration of version.
6161

62+
* `--cooldown=<number>`:
63+
Only consider gem versions published at least <number> days ago when
64+
resolving. Pass `0` to disable cooldown for this run. See `cooldown`
65+
in bundle-config(1) for precedence rules.
66+
6267
## EXAMPLES
6368

6469
1. You can add the `rails` gem to the Gemfile without any version restriction.

bundler/lib/bundler/man/bundle-config.1

Lines changed: 124 additions & 162 deletions
Large diffs are not rendered by default.

bundler/lib/bundler/man/bundle-config.1.ronn

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,36 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
137137
explicitly configured.
138138
* `console` (`BUNDLE_CONSOLE`):
139139
The console that `bundle console` starts. Defaults to `irb`.
140+
* `cooldown` (`BUNDLE_COOLDOWN`):
141+
Number of days a published gem version must age before bundler will
142+
resolve to it. Defaults to unset (no cooldown). Pass `0` to disable
143+
cooldown for an individual run.
144+
145+
The effective cooldown for any given gem is resolved from three
146+
layers, highest precedence first:
147+
148+
1. CLI flag `--cooldown N` on `install`, `update`, `add`, and
149+
`outdated`.
150+
2. This setting (`bundle config set cooldown N` or
151+
`BUNDLE_COOLDOWN=N`).
152+
3. The per-source `cooldown:` keyword in the Gemfile, such as
153+
`source "https://rubygems.org", cooldown: 7`.
154+
155+
The CLI flag and this setting apply uniformly to every source,
156+
including ones declared with their own `cooldown:` value. To keep a
157+
private registry permanently exempt while still cooling down public
158+
gems, declare `source "https://internal", cooldown: 0` in the
159+
Gemfile; remember that `--cooldown N` on the command line will
160+
still override it for that single run.
161+
162+
Cooldown filtering depends on the gem server providing a per-version
163+
`created_at` timestamp in the v2 compact-index format. Versions
164+
without that metadata - older gem servers, historical entries that
165+
predate the v2 cutover on `rubygems.org`, or private registries that
166+
still emit the v1 format - are treated as outside the cooldown
167+
window and remain resolvable. If you rely on cooldown for
168+
supply-chain protection, confirm that the gem server emits
169+
`created_at` in its `/info/<gem>` responses.
140170
* `default_cli_command` (`BUNDLE_DEFAULT_CLI_COMMAND`):
141171
The command that running `bundle` without arguments should run. Defaults to
142172
`cli_help` since Bundler 4, but can also be `install` which was the previous

bundler/lib/bundler/man/bundle-install.1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.SH "NAME"
55
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
66
.SH "SYNOPSIS"
7-
\fBbundle install\fR [\-\-force] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-local] [\-\-lockfile=LOCKFILE] [\-\-no\-cache] [\-\-no\-lock] [\-\-prefer\-local] [\-\-quiet] [\-\-retry=NUMBER] [\-\-standalone[=GROUP[ GROUP\|\.\|\.\|\.]]] [\-\-trust\-policy=TRUST\-POLICY] [\-\-target\-rbconfig=TARGET\-RBCONFIG]
7+
\fBbundle install\fR [\-\-cooldown=NUMBER] [\-\-force] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-local] [\-\-lockfile=LOCKFILE] [\-\-no\-cache] [\-\-no\-lock] [\-\-prefer\-local] [\-\-quiet] [\-\-retry=NUMBER] [\-\-standalone[=GROUP[ GROUP\|\.\|\.\|\.]]] [\-\-trust\-policy=TRUST\-POLICY] [\-\-target\-rbconfig=TARGET\-RBCONFIG]
88
.SH "DESCRIPTION"
99
Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), Bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
1010
.P
@@ -13,6 +13,9 @@ If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), B
1313
If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), Bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
1414
.SH "OPTIONS"
1515
.TP
16+
\fB\-\-cooldown=<number>\fR
17+
Only consider gem versions published at least \fInumber\fR days ago when resolving\. Pass \fB0\fR to disable cooldown for this run, overriding any per\-source or global configuration\. See \fBcooldown\fR in bundle\-config(1) for details on the precedence between the CLI flag, Bundler config, and Gemfile per\-source settings\.
18+
.TP
1619
\fB\-\-force\fR, \fB\-\-redownload\fR
1720
Force reinstalling every gem, even if already installed\.
1821
.TP

bundler/lib/bundler/man/bundle-install.1.ronn

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile
33

44
## SYNOPSIS
55

6-
`bundle install` [--force]
6+
`bundle install` [--cooldown=NUMBER]
7+
[--force]
78
[--full-index]
89
[--gemfile=GEMFILE]
910
[--jobs=NUMBER]
@@ -37,6 +38,13 @@ update process below under [CONSERVATIVE UPDATING][].
3738

3839
## OPTIONS
3940

41+
* `--cooldown=<number>`:
42+
Only consider gem versions published at least <number> days ago when
43+
resolving. Pass `0` to disable cooldown for this run, overriding any
44+
per-source or global configuration. See `cooldown` in bundle-config(1)
45+
for details on the precedence between the CLI flag, Bundler config,
46+
and Gemfile per-source settings.
47+
4048
* `--force`, `--redownload`:
4149
Force reinstalling every gem, even if already installed.
4250

bundler/lib/bundler/man/bundle-outdated.1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.SH "NAME"
55
\fBbundle\-outdated\fR \- List installed gems with newer versions available
66
.SH "SYNOPSIS"
7-
\fBbundle outdated\fR [GEM] [\-\-local] [\-\-pre] [\-\-source] [\-\-filter\-strict | \-\-strict] [\-\-update\-strict] [\-\-parseable | \-\-porcelain] [\-\-group=GROUP] [\-\-groups] [\-\-patch|\-\-minor|\-\-major] [\-\-filter\-major] [\-\-filter\-minor] [\-\-filter\-patch] [\-\-only\-explicit]
7+
\fBbundle outdated\fR [GEM] [\-\-local] [\-\-pre] [\-\-source] [\-\-filter\-strict | \-\-strict] [\-\-update\-strict] [\-\-parseable | \-\-porcelain] [\-\-group=GROUP] [\-\-groups] [\-\-patch|\-\-minor|\-\-major] [\-\-filter\-major] [\-\-filter\-minor] [\-\-filter\-patch] [\-\-only\-explicit] [\-\-cooldown=NUMBER]
88
.SH "DESCRIPTION"
99
Outdated lists the names and versions of gems that have a newer version available in the given source\. Calling outdated with [GEM [GEM]] will only check for newer versions of the given gems\. Prerelease gems are ignored by default\. If your gems are up to date, Bundler will exit with a status of 0\. Otherwise, it will exit 1\.
1010
.SH "OPTIONS"
@@ -53,6 +53,9 @@ Only list patch newer versions\.
5353
.TP
5454
\fB\-\-only\-explicit\fR
5555
Only list gems specified in your Gemfile, not their dependencies\.
56+
.TP
57+
\fB\-\-cooldown=<number>\fR
58+
Annotate (rather than hide) versions that are still inside the cooldown window of \fInumber\fR days\. The prose output appends "in cooldown for Nd more days" and the table form adds "(cooldown Nd)" to the Latest column\. See \fBcooldown\fR in bundle\-config(1)\.
5659
.SH "PATCH LEVEL OPTIONS"
5760
See bundle update(1) \fIbundle\-update\.1\.html\fR for details\.
5861
.SH "FILTERING OUTPUT"

bundler/lib/bundler/man/bundle-outdated.1.ronn

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ bundle-outdated(1) -- List installed gems with newer versions available
1616
[--filter-minor]
1717
[--filter-patch]
1818
[--only-explicit]
19+
[--cooldown=NUMBER]
1920

2021
## DESCRIPTION
2122

@@ -71,6 +72,12 @@ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
7172
* `--only-explicit`:
7273
Only list gems specified in your Gemfile, not their dependencies.
7374

75+
* `--cooldown=<number>`:
76+
Annotate (rather than hide) versions that are still inside the
77+
cooldown window of <number> days. The prose output appends "in
78+
cooldown for Nd more days" and the table form adds "(cooldown Nd)" to
79+
the Latest column. See `cooldown` in bundle-config(1).
80+
7481
## PATCH LEVEL OPTIONS
7582

7683
See [bundle update(1)](bundle-update.1.html) for details.

bundler/lib/bundler/man/bundle-update.1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.SH "NAME"
55
\fBbundle\-update\fR \- Update your gems to the latest available versions
66
.SH "SYNOPSIS"
7-
\fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-force] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-pre] [\-\-strict] [\-\-conservative]
7+
\fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-cooldown=NUMBER] [\-\-force] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-pre] [\-\-strict] [\-\-conservative]
88
.SH "DESCRIPTION"
99
Update the gems specified (all gems, if \fB\-\-all\fR flag is used), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
1010
.P
@@ -64,6 +64,9 @@ Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR
6464
.TP
6565
\fB\-\-conservative\fR
6666
Use bundle install conservative update behavior and do not allow indirect dependencies to be updated\.
67+
.TP
68+
\fB\-\-cooldown=<number>\fR
69+
Only consider gem versions published at least \fInumber\fR days ago when resolving\. Pass \fB0\fR to disable cooldown for this run, overriding any per\-source or global configuration\. Combine with \fB\-\-conservative\fR to minimize transitive churn when bypassing cooldown for an urgent update\. See \fBcooldown\fR in bundle\-config(1)\.
6770
.SH "UPDATING ALL GEMS"
6871
If you run \fBbundle update \-\-all\fR, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
6972
.P

bundler/lib/bundler/man/bundle-update.1.ronn

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bundle-update(1) -- Update your gems to the latest available versions
99
[--local]
1010
[--ruby]
1111
[--bundler[=VERSION]]
12+
[--cooldown=NUMBER]
1213
[--force]
1314
[--full-index]
1415
[--gemfile=GEMFILE]
@@ -91,6 +92,13 @@ gem.
9192
* `--conservative`:
9293
Use bundle install conservative update behavior and do not allow indirect dependencies to be updated.
9394

95+
* `--cooldown=<number>`:
96+
Only consider gem versions published at least <number> days ago when
97+
resolving. Pass `0` to disable cooldown for this run, overriding any
98+
per-source or global configuration. Combine with `--conservative` to
99+
minimize transitive churn when bypassing cooldown for an urgent
100+
update. See `cooldown` in bundle-config(1).
101+
94102
## UPDATING ALL GEMS
95103

96104
If you run `bundle update --all`, bundler will ignore

0 commit comments

Comments
 (0)