summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove dirty `exit` invokation663-plugin-managementKyrylo Silin2012-11-211-1/+0
| | | | Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Use Pager instead of stagger_outputKyrylo Silin2012-11-211-13/+11
| | | | Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Refactor ClassCommand::Options#[]Kyrylo Silin2012-11-211-5/+1
| | | | Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Define Options creation more exactlyKyrylo Silin2012-11-211-6/+8
| | | | | | | | | 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>
* Update gemspecKyrylo Silin2012-11-212-4/+4
| | | | | | | | | | | | 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>
* Clean up unwanted blanksKyrylo Silin2012-11-211-1/+1
| | | | Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Implement `uninstall` subcommandKyrylo Silin2012-11-212-1/+56
| | | | | | | | | | | | | 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>
* Implement `install` subcommandKyrylo Silin2012-11-212-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Refactor ClassCommand#slopKyrylo Silin2012-11-211-7/+6
| | | | | | Do not create unwanted Proc, because there is no real reason for it. Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Integrate branch with masterKyrylo Silin2012-11-212-4/+4
| | | | | | | | 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>
* Create "plugin.rb" file from old "misc.rb"Kyrylo Silin2012-11-211-0/+105
| | | | | | | Follow the new convention, where every command should be in its own separate file. Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Rename "sub_command" to "subcommand"Kyrylo Silin2012-11-212-16/+16
| | | | Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Implement "plugin status" subcommandKyrylo Silin2012-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | "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>
* Use stagger_output for `plugin list` headersKyrylo Silin2012-11-211-14/+12
| | | | | | | Include the headers of `plugin list` and `plugin list -r` into stagger_output. Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Delegate `#remote_plugins` methodKyrylo Silin2012-11-211-1/+2
| | | | Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Add basic support for remote pluginsKyrylo Silin2012-11-211-25/+181
| | | | | | | | | | | | | | | | | | | | | | 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>
* Extend ClassCommand so it can define sub commandsKyrylo Silin2012-11-212-22/+256
| | | | | | | | | | | | | | | | | | | | | 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>
* Relocate `test_command_helpers.rb` to another dirKyrylo Silin2012-11-211-0/+0
| | | | | | Relocate it to `test/test_helpers` directory Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Add `Pry::Helpers::Text.wrap` methodKyrylo Silin2012-11-212-0/+44
| | | | | | | 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>
* Fix indentation and typoKyrylo Silin2012-11-211-1/+2
| | | | Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Implement rudimentary `plugin` commandKyrylo Silin2012-11-212-5/+5
| | | | | | | | | | | | | 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>
* Refactor `--installed-plugins` switchKyrylo Silin2012-11-212-5/+15
| | | | | | | | | | | | | | 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>
* added notes.yml / removed bookmarks.yml (sorry guys)John Mair2012-11-212-5/+18
|
* added experimental bookmarks.yml file, Successfully installed pry-note-0.1.0John Mair2012-11-211-0/+5
| | | | 1 gem installed to use it
* Always show @line in whereami [Fixes #754]Conrad Irwin2012-11-201-1/+1
|
* Revert "make whereami more consistent [Fixes #383]"Conrad Irwin2012-11-201-12/+6
| | | | This reverts commit 2e8881f59e2a9b2879194490bcd93cde4926fc22.
* Add pager detection by using `which` commandKyrylo Silin2012-11-191-1/+3
| | | | | | | Fix issue #743 (pager gives warnings `Missing filename ("less --help" for help)`) Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
* Revert "Make whereami more consistent (and less cheeky) [Fixes #383]"Conrad Irwin2012-11-183-16/+11
| | | | This reverts commit f937bb6097c008c1bc0ab7740d9df1c9a99aab21.
* Make whereami more consistent (and less cheeky) [Fixes #383]Conrad Irwin2012-11-183-11/+16
|
* make whereami more consistent [Fixes #383]Conrad Irwin2012-11-181-6/+12
|
* Don't start bond unless it's loadedConrad Irwin2012-11-181-6/+13
|
* Don't continually restart bondConrad Irwin2012-11-181-8/+10
|
* Also test against latest jrubyConrad Irwin2012-11-181-0/+1
|
* Fix specs on jruby-19mode on travisConrad Irwin2012-11-181-3/+3
| | | | | | 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.
* More spec fixtures aroundConrad Irwin2012-11-182-2/+2
|
* Merge remote-tracking branch 'rking/massive-test-renaming'Conrad Irwin2012-11-1854-21/+26
|\
| * Rename for tabcompletion-friendliness.☈king2012-11-1554-21/+26
| |
* | Fix Indent.screen_size on jrubyConrad Irwin2012-11-182-17/+6
| |
* | Test on jruby-{18,19}Conrad Irwin2012-11-181-1/+2
| |
* | Work around bug in jruby 1.7 on JVM 7 on Linux [Fixes #732]Conrad Irwin2012-11-181-0/+12
| | | | | | | | OHAI LEAKY ABSTRACTIONS
* | update gemspecConrad Irwin2012-11-181-2/+2
| |
* | force precedence of modules over methods when using C::X syntaxJohn Mair2012-11-152-4/+18
|/
* Add a space when completing command names and long optionsConrad Irwin2012-11-144-4/+4
|
* Add completion for gem-open and gem-cdConrad Irwin2012-11-144-5/+31
|
* Factor out logic for finding gemspecConrad Irwin2012-11-143-17/+19
|
* Add gem-open to open the gem in an editorConrad Irwin2012-11-141-0/+26
|
* Add Pry.critical_section to break pry inside pry [Fixes #729]Conrad Irwin2012-11-133-8/+42
|
* Support $ <object>::<method> [Fixes #719]Conrad Irwin2012-11-132-2/+8
|
* Completion for show-source/show-doc/?/$ Array#<tab>Conrad Irwin2012-11-082-0/+22
|
* Move hashrocket out of Pry.config.printConrad Irwin2012-11-086-20/+17
| | | | | | | | This simplifies the contract of Pry.config.print which makes it easier to use in other places that we want to output a value, like ls -l. If desired you can stil remove the => by setting Pry.config.output_prefix = '' in your ~/.pryrc