1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

28 commits

Author SHA1 Message Date
John Mair
3ad0616d44 fixed some bugs in gist-method command and gave it a dependency on
'gist' gem. Added `.<shell command>` descriptive command (cannot be
executed). Fixed tests.
2011-04-13 04:16:58 +12:00
John Mair
d111b19f82 fixed run command builder, now takes target parameter, also accepts system
commands.

Also:
* changed Rakefile to remove the -k flag from bacon test
* changed pry_instance attr_reader to attr_accessor in CommandProcessor class
* updated tests to reflect new `run` parameters
2011-04-08 16:09:47 +12:00
John Mair
3c271ff712 turned chomp! into an rstrip! in process_line(). Fixed 1.8.7 compat
for `read_between_lines` function commands.rb. Removed before/after
hook output text (too spammy). Fixed file-mode completion, so it works
straight away. CHanged 'pry' rake task to 'binding.pry' instead of
just 'pry' so that context is given.
2011-04-08 13:06:39 +12:00
John Mair
137cc24917 added BasicObject support (class not instances).
And support inspecting objects without to_s and inspect by defaulting
to 'unknown'. Also slightly refactored tests, moved more stuff into test_helper.
2011-04-05 00:18:07 +12:00
John Mair
4b9198d03c version 0.6.8, added whereami command, made .pryrc run at the start of each runtime session, put syntax highlighting on by default 2011-03-06 03:17:54 +13:00
John Mair
d299f3be30 version 0.6.8pre4, changed Pry::Commands.dup to Pry::Commands.clone due to rubinius bug. Made .pryrc run on ordinary pry sessions (not just command line), still need to complete whereami command 2011-03-05 01:37:59 +13:00
John Mair
c0e494756c version 0.6.1 release, added optional return value to exit and exit-all commands, added !@ alias for exit-all, added :keep_retval option to command method in CommandBase, improved pry command line executable -e option 2011-02-26 04:32:54 +13:00
John Mair
5cda6865d4 Version 0.5.4. Added Pry.run_command
* Added Pry.run_command for running Pry commands outside of a session.
* Added more graceful error messages when trying to show-method on dynamically defined methods.
* Added tests for new Pry.run_command method
* Updated README with info on Pry.run_command
2011-02-19 06:01:21 +13:00
John Mair
f8f0919189 Got rid of show_imethod and show_idoc, merged into show-method and show-doc with special -M option. Changed all underscored command names to hyphenated-names, e.g jump-to instead of jump_to.
* added a bunch of new command options to ls command, supercharging it. Using optparse.
* added options to show-method and show-doc
* now showing file/line for show-method, show-doc, show-command commands
* cleaned up 'help', and got rid of aliases from help display; now showing aliases in primary command help output.
2011-02-17 05:27:55 +13:00
John Mair
8682e269eb Version 0.4.2
* Added alias_command and desc commands to Pry::CommandBase
* Added pry and version tasks to Rakefile to start a pry session and show current version
* Added tests for alias_command and desc commands
* made it so ls_methods and ls_imethods return sort arrays
* made it so show_method without a paramater displays current method, if exists, who displays error if not
2011-01-27 07:05:40 +13:00
John Mair
6aacc8721d Made it so defining methods on a pry'd on object puts the methods on the singleton class of the object rather than on the class. Added rubygems-test support.
Alternatively, if the object cannot support singleton methods, e.g immediates and Numerics, the method will go on the class instead.
2011-01-24 03:50:15 +13:00
John Mair
18553b4beb Updated more docs and formatting.
Changed tests to remove opts[:output] and then removed opts[:output]; replaced with output method, changed prompt in example_commands.rb to have a math* wait prompt. Added bullet points to examples in README.markdown. Added more info on TexPlay and Gosu for example_image_edit
2011-01-21 22:34:22 +13:00
John Mair
548b4f82d8 added import_from, delete, run to command API. Also added examples, added more tests, and changed the way that commands work using split instead of regex captures. Also added output and trget methods to Pry::CommandBase 2011-01-21 03:41:41 +13:00
John Mair
9e1e35e5f4 removed input.rb and output.rb 2011-01-19 22:15:58 +13:00
John Mair
f45e8bfbd0 finished updating and improving command API; now command API is as follows: command 'blah' do |x| puts x; end where x is a parameter passed to the command from the pry prompt 2011-01-18 03:38:09 +13:00
John Mair
ebdcfdf145 saving before refactor to implement action block instead of action proc for commands. All tests passing in 1.8 and 1.9. 2011-01-12 18:08:56 +11:00
John Mair
4ea554fcfd added completion (taken from irb). Remember to remove hardcoding expecation of command_info from Pry#re() method, need to turn command addition into DSL 2011-01-11 00:54:17 +11:00
John Mair
1666945e4b moved input select logic to Pry#readline; updated tests to reflect that Pry.input and Pry.output now accept duck-typed IOs 2011-01-10 18:49:11 +11:00
John Mair
70bc1222e2 changed get_prompt to select_prompt 2011-01-10 01:37:22 +13:00
John Mair
878ca414d7 adding back a bunch of tests, almost finished. Also renamed default_prompt to prompt and prompt to get_prompt, etc 2011-01-08 01:25:24 +13:00
John Mair
12758922e8 other tests passing: commands 2011-01-06 11:07:06 +13:00
John Mair
329f49afa1 updating tests to reflect new program organization/design 2011-01-05 16:23:11 +13:00
John Mair
f11806d2da Save before major refactor to split up Pry into pry_class and pry_instance 2010-12-26 02:51:34 +13:00
John Mair
294d46c02a commands now separated and pluggable as a hash, defined in commands.rb 2010-12-26 01:05:48 +13:00
John Mair
00ec4c84d3 passing ALL tests now for 1.8 AND 1.9 2010-12-25 16:21:16 +13:00
John Mair
06aa0b9bbc passing all tests. created a __binding__ method to return a binding unpolluted by Pry context, no longer using instance_eval, thanks to Mon_Ouie's trick. Added test for multi-line, added nest for class nesting 2010-12-25 15:36:39 +13:00
John Mair
5ae3b69667 all tests passing, new functionality in form of: hash args to Pry.start() for :input and :output 2010-12-24 21:30:51 +13:00
John Mair
aa03df81ca * added tests (test.rb and test_helper.rb files)
* defined input/output accessors for Pry class to set global defaults for input and output (overridable by specific instances).
* Added reset_defaults method to set input/output and prompt lambdas back to defaults
* added output callback for 'cd' command
* changed eval_string += val to eval_string << val in Pry#r method, for performance reasons (no copy made with <<)
2010-12-24 01:16:04 +13:00