[rubygems/rubygems] Document missing options from man pages:

- The `bundle plugin uninstall --all` was missing.
- The `bundle plugin install --local-git` was missing due to being
  deprecated. We decided to reintroduce the doc for more clarity.

4da252945c
This commit is contained in:
Edouard CHIN 2025-07-24 14:57:53 +02:00 committed by Hiroshi SHIBATA
parent 4dd708bf5d
commit da3c47bcfc
3 changed files with 18 additions and 6 deletions

View file

@ -6,7 +6,7 @@
.SH "SYNOPSIS" .SH "SYNOPSIS"
\fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR] [\-\-path=\fIpath\fR] \fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR] [\-\-path=\fIpath\fR]
.br .br
\fBbundle plugin\fR uninstall PLUGINS \fBbundle plugin\fR uninstall PLUGINS [\-\-all]
.br .br
\fBbundle plugin\fR list \fBbundle plugin\fR list
.br .br
@ -41,8 +41,16 @@ When you specify \fB\-\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to
.TP .TP
\fBbundle plugin install bundler\-graph \-\-path \.\./bundler\-graph\fR \fBbundle plugin install bundler\-graph \-\-path \.\./bundler\-graph\fR
Install bundler\-graph gem from a local path\. Install bundler\-graph gem from a local path\.
.TP
\fBbundle plugin install bundler\-graph \-\-local\-git \.\./bundler\-graph\fR
This option is deprecated in favor of \fB\-\-git\fR\.
.SS "uninstall" .SS "uninstall"
Uninstall the plugin(s) specified in PLUGINS\. Uninstall the plugin(s) specified in PLUGINS\.
.P
\fBOPTIONS\fR
.TP
\fB\-\-all\fR
Uninstall all the installed plugins\. If no plugin is installed, then it does nothing\.
.SS "list" .SS "list"
List the installed plugins and available commands\. List the installed plugins and available commands\.
.P .P

View file

@ -6,7 +6,7 @@ bundle-plugin(1) -- Manage Bundler plugins
`bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>] `bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>]
[--git=<git-url>] [--branch=<branch>|--ref=<rev>] [--git=<git-url>] [--branch=<branch>|--ref=<rev>]
[--path=<path>]<br> [--path=<path>]<br>
`bundle plugin` uninstall PLUGINS<br> `bundle plugin` uninstall PLUGINS [--all]<br>
`bundle plugin` list<br> `bundle plugin` list<br>
`bundle plugin` help [COMMAND] `bundle plugin` help [COMMAND]
@ -42,10 +42,18 @@ Install the given plugin(s).
* `bundle plugin install bundler-graph --path ../bundler-graph`: * `bundle plugin install bundler-graph --path ../bundler-graph`:
Install bundler-graph gem from a local path. Install bundler-graph gem from a local path.
* `bundle plugin install bundler-graph --local-git ../bundler-graph`:
This option is deprecated in favor of `--git`.
### uninstall ### uninstall
Uninstall the plugin(s) specified in PLUGINS. Uninstall the plugin(s) specified in PLUGINS.
**OPTIONS**
* `--all`:
Uninstall all the installed plugins. If no plugin is installed, then it does nothing.
### list ### list
List the installed plugins and available commands. List the installed plugins and available commands.

View file

@ -288,8 +288,6 @@ RSpec.describe "The library itself" do
end end
def cli_and_man_pages_in_sync!(commands) def cli_and_man_pages_in_sync!(commands)
undocumented_options = ["--all", "--local-git"]
commands.each do |command_name, opts| commands.each do |command_name, opts|
man_page_path = man_tracked_files.find {|f| File.basename(f) == "bundle-#{command_name}.1.ronn" } man_page_path = man_tracked_files.find {|f| File.basename(f) == "bundle-#{command_name}.1.ronn" }
expect(man_page_path).to_not be_nil, "The command #{command_name} has no associated man page." expect(man_page_path).to_not be_nil, "The command #{command_name} has no associated man page."
@ -298,8 +296,6 @@ RSpec.describe "The library itself" do
man_page_content = File.read(man_page_path) man_page_content = File.read(man_page_path)
opts.each do |option_name| opts.each do |option_name|
next if undocumented_options.include?(option_name.to_s)
error_msg = <<~EOM error_msg = <<~EOM
The command #{command_name} has no mention of the option or subcommand `#{option_name}` in its man page. The command #{command_name} has no mention of the option or subcommand `#{option_name}` in its man page.
Document the `#{option_name}` in the man page to discard this error. Document the `#{option_name}` in the man page to discard this error.