Permalink
Commits on Nov 21, 2012
  1. @kyrylo

    Remove dirty `exit` invokation

    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Nov 21, 2012
  2. @kyrylo

    Use Pager instead of stagger_output

    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Nov 21, 2012
  3. @kyrylo

    Refactor ClassCommand::Options#[]

    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Nov 21, 2012
  4. @kyrylo

    Define Options creation more exactly

    Sometimes I have a failing test, because it can't find Options constant.
    Let's help Ruby in its hard job a bit.
    
    Also, reformulate some comments and convert " to ' in some places.
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Nov 21, 2012
  5. @kyrylo

    Update gemspec

    I also fucked up one of cirwin's commits for some reason. It's a tiny
    one, so I'll just re-commit it. I'm sorry for this.
    
    This commit should finalise merging/rebasing from master. I had some
    troubles when I was trying to combine all the shit together
    (because Pry has undergone many changes since the time I started off
    my work on plugin command).
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Nov 21, 2012
  6. @kyrylo

    Clean up unwanted blanks

    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Nov 20, 2012
  7. @kyrylo

    Implement `uninstall` subcommand

    Staight to the point:
    
      pry(main)> plugin uninstall stack_explorer
      Gem `pry-stack_explorer` uninstalled.
    
    Also, add command helper method in order to capture output stream from
    `Gem`. In this particular case I capture default "uninstall succeed"
    message from RubyGems, because I want to use my own.
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 24, 2012
  8. @kyrylo

    Implement `install` subcommand

    The interesting part is `ClassCommand::Options#command?` method.
    
    TL;DR
    -----
    
    It's the same as `Slop::Commands#present?`.
    
    Details
    -------
    
    Usually, when you use `Slop::Commands` you have `#present?` method,
    which checks for a command presence. But `Options` class uses
    `#command?` method to do the same (this is a just a wrapper around
    Slop's `#present?`). The reason is that I don't want to refactor all the
    existing code just for one method name change. Also, it reads better.
    
    You may ask how to use `install`. That is a very good question. The
    answer:
    
      pry(main)> plugin install doc stack_explorer
    
    This command will install "pry-doc" and "pry-stack_explorer" gems.
    Internally, it uses "gem-install" command from Pry.
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 23, 2012
  9. @kyrylo

    Refactor ClassCommand#slop

    Do not create unwanted Proc, because there is no real reason for it.
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 23, 2012
  10. @kyrylo

    Integrate branch with master

    There were some changes in master that affect current code. Make a
    couple of small amendments to feature/plugin_manager branch so the tests
    pass again.
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 23, 2012
  11. @kyrylo

    Create "plugin.rb" file from old "misc.rb"

    Follow the new convention, where every command should be in its own
    separate file.
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 23, 2012
  12. @kyrylo

    Rename "sub_command" to "subcommand"

    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 10, 2012
  13. @kyrylo

    Implement "plugin status" subcommand

    "plugin status" subcommand shows plugin statuses (active or inactive).
    
    Add two options to this subcommand: `--active` and `--inactive`. By
    default, `plugin status` will display all installed plugins. With help
    of these options a user can choose, which type of plugins wants to see.
    For example:
    
      pry(main)> plugin status --active
      Active Plugins:
      --
      debundle
      rails
    
    Also, make all newly initialized plugins inactive by setting
    `self.active` to `false` (currently the default value is `nil`).
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 10, 2012
  14. @kyrylo

    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>
    kyrylo committed Aug 8, 2012
  15. @kyrylo

    Delegate `#remote_plugins` method

    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 8, 2012
  16. @kyrylo

    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>
    kyrylo committed Aug 8, 2012
  17. @kyrylo

    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>
    kyrylo committed Aug 8, 2012
  18. @kyrylo

    Relocate `test_command_helpers.rb` to another dir

    Relocate it to `test/test_helpers` directory
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 7, 2012
  19. @kyrylo

    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>
    kyrylo committed Aug 7, 2012
  20. @kyrylo

    Fix indentation and typo

    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Aug 3, 2012
  21. @kyrylo

    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>
    kyrylo committed Jul 25, 2012
  22. @kyrylo

    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>
    kyrylo committed Jul 25, 2012
  23. @banister
  24. @banister

    added experimental bookmarks.yml file, Successfully installed pry-not…

    …e-0.1.0
    
    1 gem installed to use it
    banister committed Nov 21, 2012
Commits on Nov 20, 2012
  1. @ConradIrwin
  2. @ConradIrwin

    Revert "make whereami more consistent [Fixes #383]"

    This reverts commit 2e8881f.
    ConradIrwin committed Nov 20, 2012
Commits on Nov 19, 2012
  1. @kyrylo

    Add pager detection by using `which` command

    Fix issue #743 (pager gives warnings `Missing filename ("less --help"
    for help)`)
    
    Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
    kyrylo committed Nov 19, 2012
  2. @ConradIrwin
  3. @ConradIrwin
Commits on Nov 18, 2012
  1. @ConradIrwin
  2. @ConradIrwin
  3. @ConradIrwin
  4. @ConradIrwin
  5. @ConradIrwin

    Fix specs on jruby-19mode on travis

    This is working around (another) brokenness in jruby 1.6.8s splat
    handling in ruby 1.9 mode; but I figure that now jruby 1.7 is out,
    we can not bother fixing it.
    ConradIrwin committed Nov 18, 2012
  6. @ConradIrwin

    More spec fixtures around

    ConradIrwin committed Nov 18, 2012