Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5348 from feministy/clean-check-man-pages
Browse files Browse the repository at this point in the history
create man pages for missing commands
  • Loading branch information
liz! authored Jan 24, 2017
2 parents df20d19 + 325c066 commit 5a8ad74
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 2 deletions.
26 changes: 26 additions & 0 deletions man/bundle-check.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
bundle-check(1) -- Verifies if dependencies are satisfied by installed gems
===========================================================================

## SYNOPSIS

`bundle check` [--dry-run]
[--gemfile=FILE]
[--path=PATH]

## DESCRIPTION

`check` searches the local machine for each of the gems requested in the
Gemfile. If all gems are found, Bundler prints a success message and exits with
a status of 0.

If not, the first missing gem is listed and Bundler exits status 1.

## OPTIONS

* `--dry-run`:
Locks the `Gemfile(5)` before running the command.
* `--gemfile`:
Use the specified gemfile instead of the `Gemfile(5)`
* `--path`:
Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).
Bundler will remember this value for future installs on this machine.
18 changes: 18 additions & 0 deletions man/bundle-clean.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bundle-clean(1) -- Cleans up unused gems in your bundler directory
==================================================================

## SYNOPSIS

`bundle clean` [--dry-run] [--force]

## DESCRIPTION

This command will remove all unused gems in your bundler directory. This is
useful when you have made many changes to your gem dependencies.

## OPTIONS

* `--dry-run`:
Print the changes, but do not clean the unused gems.
* `--force`:
Force a clean even if `--path` is not set.
18 changes: 18 additions & 0 deletions man/bundle-init.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bundle-init(1) -- Generates a Gemfile into the current working directory
========================================================================

## SYNOPSIS

`bundle init` [--gemspec=FILE]

## DESCRIPTION

Init generates a default `Gemfile(5)` in the current working directory. When
adding a `Gemfile(5)` to a gem with a gemspec, the `--gemspec` option will
automatically add each dependency listed in the gemspec file to the newly
created `Gemfile(5)`.

## OPTIONS

* `--gemspec`:
Use the specified .gemspec to create the `Gemfile(5)`
22 changes: 22 additions & 0 deletions man/bundle-inject.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
bundle-inject(1) -- Add named gem(s) with version requirements to Gemfile
=========================================================================

## SYNOPSIS

`bundle inject` [GEM] [VERSION]

## DESCRIPTION

Adds the named gem(s) with their version requirements to the resolved
`Gemfile(5)`.

This command will add the gem to both your `Gemfile(5)` and Gemfile.lock if it
isn't listed yet.

Example:

bundle install
bundle inject 'rack' '> 0'

This will inject the 'rack' gem with a version greater than 0 in your
`Gemfile(5)` and Gemfile.lock
19 changes: 19 additions & 0 deletions man/bundle-open.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
bundle-open(1) -- Opens the source directory for a gem in your bundle
=====================================================================

## SYNOPSIS

`bundle open` [GEM]

## DESCRIPTION

Opens the source directory of the provided GEM in your editor.

For this to work the `EDITOR` or `BUNDLER_EDITOR` environment variable has to
be set.

Example:

bundle open 'rack'

Will open the source directory for the 'rack' gem in your bundle.
20 changes: 20 additions & 0 deletions man/bundle-show.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
bundle-show(1) -- Shows all the gems in your bundle, or the path to a gem
=========================================================================

## SYNOPSIS

`bundle show` [GEM]
[--paths]

## DESCRIPTION

Without the [GEM] option, `show` will print a list of the names and versions of
all gems that are required by your `Gemfile(5)`.

Calling show with [GEM] will list the exact location of that gem on your
machine.

## OPTIONS

* `--paths`:
List the paths of all gems that are required by your `Gemfile(5)`.
30 changes: 30 additions & 0 deletions man/bundle-viz.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
bundle-viz(1) -- Generates a visual dependency graph for your Gemfile
=====================================================================

## SYNOPSIS

`bundle viz` [--file=FILE]
[--format=FORMAT]
[--requirements]
[--version]
[--without=GROUP GROUP]

## DESCRIPTION

`viz` generates a PNG file of the current `Gemfile(5)` as a dependency graph.
`viz` requires the ruby-graphviz gem (and its dependencies).

The associated gems must also be installed via `bundle install(1)`.

## OPTIONS

* `--file`:
The name to use for the generated file. See `--format` option
* `--format`:
This is output format option. Supported format is png, jpg, svg, dot ...
* `--requirements`:
Set to show the version of each required dependency.
* `--version`:
Set to show each gem version.
* `--without`:
Exclude gems that are part of the specified named group.
7 changes: 7 additions & 0 deletions man/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ bundle-exec bundle-exec.1
bundle-config bundle-config.1
bundle-platform bundle-platform.1
bundle-gem bundle-gem.1
bundle-clean bundle-clean.1
bundle-check bundle-check.1
bundle-init bundle-init.1
bundle-inject bundle-inject.1
bundle-open bundle-open.1
bundle-show bundle-show.1
bundle-viz bundle-viz.1
4 changes: 2 additions & 2 deletions spec/commands/help_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
end

it "still outputs the old help for commands that do not have man pages yet" do
bundle "help check"
expect(out).to include("Check searches the local machine")
bundle "help version"
expect(out).to include("Prints the bundler's version information")
end

it "looks for a binary and executes it with --help option if it's named bundler-<task>" do
Expand Down

0 comments on commit 5a8ad74

Please sign in to comment.