Commit Graph

21 Commits

Author SHA1 Message Date
John Mair 312bb7eee4 command_class no longer alias for create_command
* removed as an alias
* converted remaining commands over to create_command
* removed references in tests
2012-01-22 12:17:43 +13:00
Conrad Irwin 12cd5507cd Add a test for accidental fixage [Fixes #261] 2012-01-03 01:47:15 +00:00
Conrad Irwin 45c6492e7e Split CommandProcessor responsibility between CommandSet and Command
The CommandSet is responsible for storing Commands, while the Commands
themselves are responsible for all the parsing.

(Before this change, the CommandProcessor used to do both the searching
within the CommandSet's and also the tokenization of command arguments)
2012-01-03 01:35:32 +00:00
Conrad Irwin d221a22d02 Merge Pry::CommandContext and Pry::CommandSet::Command into Pry::Command 2011-12-31 11:54:41 +00:00
Conrad Irwin 2b6d0d2149 Make all the tests pass again 2011-12-31 11:10:55 +00:00
John Mair f52626e169 added some integration tests for class based commands && renamed Pry::CommandContext:Command#block to #callable 2011-12-30 00:34:22 +13:00
John Mair 1cbe7d4c9c made start on tests for class-based commands, also changed API to use :definition => MyCommand.new 2011-12-30 00:34:22 +13:00
John Mair 830e6c8f12 updated rename_command() to accept either actual command name or listing name, tests also updated 2011-11-24 22:33:37 +13:00
John Mair 54df4bf7bd removed repeated/redundant test from test_command_set.rb 2011-11-24 18:38:42 +13:00
John Mair 18c8ccdecc Added rename() method to Pry#CommandSet
This enables whingers like RubyPanther to change commands such as 'ls'
to something more bland so they no longer suffer 'mental pollution'
2011-11-24 18:27:30 +13:00
John Mair 747d80df47 improved some command code and added more tests 2011-11-16 03:09:16 +13:00
John Mair a3723baaab Most command-related methods now accept either command name or listing name.
This should make it easier when aliasing / deleting / importing commands. No longer need to specify full regex.
Also updated tests.
2011-11-16 02:51:17 +13:00
John Mair 4212baca6d added before_command and after_command decorators + tests 2011-11-15 03:12:52 +13:00
Ryan Fitzgerald 892043882e add command_name to context 2011-09-24 23:52:07 -07:00
Conrad Irwin 6fda20a22f Remove the compulsary "" argument to alias_command 2011-09-19 10:37:51 +08:00
John Mair a04e56012a made it so commands (with :keep_retval => true) can now return nil as a legitimate return value. Created a new 'void' value to use instead when indicating no return value. also updated tests.
'void' method now available to commands, commands must return this when they do not want their result displayed when they use :keep_retval => true. void just maps to a random object Pry::CommandContext::VOID_VALUE.
2011-09-04 13:30:20 +12:00
Conrad Irwin 99026e5c4d help command should sort output. 2011-07-27 11:43:28 -07:00
John Mair 71ad2aa9d1 added a bunch more tests for: hist command, :listing option to commands, regex commands, etc. Turned paging off in helper.rb 2011-05-28 18:05:41 +12:00
John Mair bf0081170e new tests for Pry::CommandProcessor and regex command and spaced command functionality, also tests for :interpolate flag for commands 2011-05-23 19:11:41 +12:00
Mon ouïe 1750fe4d78 Got rid of CommandSet#name 2011-05-07 07:32:05 +02:00
John Mair 79868f8266 fixed cd bug for complex arguments, renamed test_commandset to test_command_set 2011-05-06 22:43:08 +12:00