Skip to content

Commit 4a3a544

Browse files
deivid-rodriguezhsbt
authored andcommitted
[rubygems/rubygems] Improve bundle plugin documentation
Make synopsis, subcommands, and CLI flags use a format consistent with the other docs, and also reword some sentences for clarify. ruby/rubygems@9272169ad0
1 parent f3d62db commit 4a3a544

File tree

2 files changed

+67
-29
lines changed

2 files changed

+67
-29
lines changed

lib/bundler/man/bundle-plugin.1

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.SH "NAME"
55
\fBbundle\-plugin\fR \- Manage Bundler plugins
66
.SH "SYNOPSIS"
7-
\fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR] [\-\-path=\fIpath\fR]
7+
\fBbundle plugin\fR install PLUGINS [\-\-source=SOURCE] [\-\-version=VERSION] [\-\-git=GIT] [\-\-branch=BRANCH|\-\-ref=REF] [\-\-local\-git=LOCAL_GIT] [\-\-path=PATH]
88
.br
99
\fBbundle plugin\fR uninstall PLUGINS [\-\-all]
1010
.br
@@ -16,18 +16,23 @@ You can install, uninstall, and list plugin(s) with this command to extend funct
1616
.SH "SUB\-COMMANDS"
1717
.SS "install"
1818
Install the given plugin(s)\.
19+
.P
20+
For example, \fBbundle plugin install bundler\-graph\fR will install bundler\-graph gem from globally configured sources (defaults to RubyGems\.org)\. Note that the global source specified in Gemfile is ignored\.
21+
.P
22+
\fBOPTIONS\fR
1923
.TP
20-
\fBbundle plugin install bundler\-graph\fR
21-
Install bundler\-graph gem from globally configured sources (defaults to RubyGems\.org)\. The global source, specified in source in Gemfile is ignored\.
22-
.TP
23-
\fBbundle plugin install bundler\-graph \-\-source https://example\.com\fR
24-
Install bundler\-graph gem from example\.com\. The global source, specified in source in Gemfile is not considered\.
24+
\fB\-\-source=SOURCE\fR
25+
Install the plugin gem from a specific source, rather than from globally configured sources\.
26+
.IP
27+
Example: \fBbundle plugin install bundler\-graph \-\-source https://example\.com\fR
2528
.TP
26-
\fBbundle plugin install bundler\-graph \-\-version 0\.2\.1\fR
27-
You can specify the version of the gem via \fB\-\-version\fR\.
29+
\fB\-\-version=VERSION\fR
30+
Specify a version of the plugin gem to install via \fB\-\-version\fR\.
31+
.IP
32+
Example: \fBbundle plugin install bundler\-graph \-\-version 0\.2\.1\fR
2833
.TP
29-
\fBbundle plugin install bundler\-graph \-\-git https://github\.com/rubygems/bundler\-graph\fR
30-
Install bundler\-graph gem from Git repository\. You can use standard Git URLs like:
34+
\fB\-\-git=GIT\fR
35+
Install the plugin gem from a Git repository\. You can use standard Git URLs like:
3136
.IP
3237
\fBssh://[user@]host\.xz[:port]/path/to/repo\.git\fR
3338
.br
@@ -37,12 +42,24 @@ Install bundler\-graph gem from Git repository\. You can use standard Git URLs l
3742
.br
3843
\fBfile:///path/to/repo\fR
3944
.IP
40-
When you specify \fB\-\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\.
45+
Example: \fBbundle plugin install bundler\-graph \-\-git https://github\.com/rubygems/bundler\-graph\fR
4146
.TP
42-
\fBbundle plugin install bundler\-graph \-\-path \.\./bundler\-graph\fR
43-
Install bundler\-graph gem from a local path\.
47+
\fB\-\-branch=BRANCH\fR
48+
When you specify \fB\-\-git\fR, you can use \fB\-\-branch\fR to use\.
4449
.TP
45-
\fBbundle plugin install bundler\-graph \-\-local\-git \.\./bundler\-graph\fR
50+
\fB\-\-ref=REF\fR
51+
When you specify \fB\-\-git\fR, you can use \fB\-\-ref\fR to specify any tag, or commit hash (revision) to use\.
52+
.TP
53+
\fB\-\-path=PATH\fR
54+
Install the plugin gem from a local path\.
55+
.IP
56+
Example: \fBbundle plugin install bundler\-graph \-\-path \.\./bundler\-graph\fR
57+
.TP
58+
\fB\-\-local\-git=LOCAL_GIT\fR
59+
Install the plugin gem from a local Git repository\.
60+
.IP
61+
Example: \fBbundle plugin install bundler\-graph \-\-local\-git \.\./bundler\-graph\fR\.
62+
.IP
4663
This option is deprecated in favor of \fB\-\-git\fR\.
4764
.SS "uninstall"
4865
Uninstall the plugin(s) specified in PLUGINS\.

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

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ bundle-plugin(1) -- Manage Bundler plugins
33

44
## SYNOPSIS
55

6-
`bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>]
7-
[--git=<git-url>] [--branch=<branch>|--ref=<rev>]
8-
[--path=<path>]<br>
6+
`bundle plugin` install PLUGINS [--source=SOURCE] [--version=VERSION]
7+
[--git=GIT] [--branch=BRANCH|--ref=REF]
8+
[--local-git=LOCAL_GIT]
9+
[--path=PATH]<br>
910
`bundle plugin` uninstall PLUGINS [--all]<br>
1011
`bundle plugin` list<br>
1112
`bundle plugin` help [COMMAND]
@@ -20,29 +21,49 @@ You can install, uninstall, and list plugin(s) with this command to extend funct
2021

2122
Install the given plugin(s).
2223

23-
* `bundle plugin install bundler-graph`:
24-
Install bundler-graph gem from globally configured sources (defaults to RubyGems.org). The global source, specified in source in Gemfile is ignored.
24+
For example, `bundle plugin install bundler-graph` will install bundler-graph
25+
gem from globally configured sources (defaults to RubyGems.org). Note that the
26+
global source specified in Gemfile is ignored.
2527

26-
* `bundle plugin install bundler-graph --source https://example.com`:
27-
Install bundler-graph gem from example.com. The global source, specified in source in Gemfile is not considered.
28+
**OPTIONS**
29+
30+
* `--source=SOURCE`:
31+
Install the plugin gem from a specific source, rather than from globally configured sources.
32+
33+
Example: `bundle plugin install bundler-graph --source https://example.com`
2834

29-
* `bundle plugin install bundler-graph --version 0.2.1`:
30-
You can specify the version of the gem via `--version`.
35+
* `--version=VERSION`:
36+
Specify a version of the plugin gem to install via `--version`.
3137

32-
* `bundle plugin install bundler-graph --git https://github.com/rubygems/bundler-graph`:
33-
Install bundler-graph gem from Git repository. You can use standard Git URLs like:
38+
Example: `bundle plugin install bundler-graph --version 0.2.1`
39+
40+
* `--git=GIT`:
41+
Install the plugin gem from a Git repository. You can use standard Git URLs like:
3442

3543
`ssh://[user@]host.xz[:port]/path/to/repo.git`<br>
3644
`http[s]://host.xz[:port]/path/to/repo.git`<br>
3745
`/path/to/repo`<br>
3846
`file:///path/to/repo`
3947

40-
When you specify `--git`, you can use `--branch` or `--ref` to specify any branch, tag, or commit hash (revision) to use.
48+
Example: `bundle plugin install bundler-graph --git https://github.com/rubygems/bundler-graph`
49+
50+
* `--branch=BRANCH`:
51+
When you specify `--git`, you can use `--branch` to use.
52+
53+
* `--ref=REF`:
54+
When you specify `--git`, you can use `--ref` to specify any tag, or commit
55+
hash (revision) to use.
56+
57+
* `--path=PATH`:
58+
Install the plugin gem from a local path.
59+
60+
Example: `bundle plugin install bundler-graph --path ../bundler-graph`
61+
62+
* `--local-git=LOCAL_GIT`:
63+
Install the plugin gem from a local Git repository.
4164

42-
* `bundle plugin install bundler-graph --path ../bundler-graph`:
43-
Install bundler-graph gem from a local path.
65+
Example: `bundle plugin install bundler-graph --local-git ../bundler-graph`.
4466

45-
* `bundle plugin install bundler-graph --local-git ../bundler-graph`:
4667
This option is deprecated in favor of `--git`.
4768

4869
### uninstall

0 commit comments

Comments
 (0)