Refactor `--installed-plugins` switch

First of all, add `PluginManager.show_installed_plugins` method. The
body of this method is taken from `--installed-plugins` code, which
means that it still displays the list of all installed plugins.

Secondly, use `PluginManager.show_installed_plugins` in
`--installed-plugins` body instead of the old code.

This change is needed, because we want to invoke `--installed-plugins`
from other place of the program and we don't want to repeat ourselves.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Implement rudimentary `plugin` command

Add `plugin` command and add `-l` aka `--list` switch to it. It allows
to display the list of all intalled Pry plugins.

Also, change the `PluginManager.show_installed_plugins` method a little
bit: it takes Hash parameter instead of Array one.

Last but not least, adjust `--installed-plugins` switch of Pry to that
method change.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Fix indentation and typo

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Add `Pry::Helpers::Text.wrap` method

Also, create `test/test_helpers` directory and place a new file in it:
`test_text.rb` with tests for `wrap` method.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Relocate `test_command_helpers.rb` to another dir

Relocate it to `test/test_helpers` directory

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Extend ClassCommand so it can define sub commands

Create `ClassCommand::Options` class, which ties up sub commands and
default options together.

Let's consider the command `food make --tea`. `food` is a command,
`make` is a sub command and `--tea` is an option of `make` sub command.
We can access `--tea` via `opts[:make][:tea].

Also, we can check the freshness of our food like so: `food --freshness`.
`--freshness` is a default option. We can access it like so:
`opts.freshness?` or `opts[:freshness]`.

Add unit tests for `ClassCommand::Option` and some other tests that
reflect the additions.

Finally, document everything and fix different typos in the existing
documentation.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Add basic support for remote plugins

Lots of stuff happens here.

First of all, change the value of `PRY_PLUGIN_PREFIX` constant from
Regexp to String, because String interpolates better.

Add `RemotePlugin` struct, which represents remote Pry plugins and
carries information about them.

Next, add `@remote_plugins` ivar to `PluginManager`. This variable is an
`Array`, which contains the list of remote plugins (instances of
`RemotePlugin`). Refactor `PluginManager#locate_plugins`, so it supports
detection of remote plugins (basically it's just a dispatcher method).

Make `PluginManager` fetch Pry plugins through RubyGems API.

Last but not least, add `PluginManager.show_remote_plugins`, which forms
a nice list of plugins with their dependencies.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Delegate `#remote_plugins` method

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Implement `list` command for remote plugins

Refactor old code for local list of plugins. Add new code for ability to
show remote list of plugins. The "plugin" command is now able:

  1. To show list of local plugins (old feature).

       pry(main)> plugin list

  2. To show list of remote plugins (repeated calls give results from
     the cache).

       pry(main)> plugin list -r

  3. To show list of remote plugins forcefully (makes another request to
     RubyGems API and refreshes the cache).

       pry(main)> plugin list -rf

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Use stagger_output for `plugin list` headers

Include the headers of `plugin list` and `plugin list -r` into
stagger_output.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Update gemspec

Update it with help of `rake gemspec` task.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>