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

19 commits

Author SHA1 Message Date
Conrad Irwin
2285a83330 Pager should also respect _pry_.config.color 2014-05-01 01:51:02 -07:00
Conrad Irwin
5d7c887129 Use Pry::Output to strip color when necessary
All credit to johnny5- for this idea:
952568b933

Pros: No longer need to check _pry_.config.color everywhere.
      All color is stripped (not just that added by pry)

Cons: Inefficient to add colors and then remove them again.
2014-05-01 01:51:02 -07:00
John Mair
9e1e35e5f4 removed input.rb and output.rb 2011-01-19 22:15:58 +13: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
329f49afa1 updating tests to reflect new program organization/design 2011-01-05 16:23:11 +13:00
John Mair
571612f4cf * completely merged Output and Commands classes, reduced Output to just a simple puts() method, a la Input and read()
* Commands now completely manages 'help', so that 'help' returns full command list/doco and 'help cmd' returns doc for just that command
* Turned out.session_start() and out.session_end() into hook methods: Pry.hooks :before_session, and :after_session
* Refactored Pry#initialize, so no longer individually setting accessors and hash options, instead using ConfigOptions to iterate over accessors and set their default value to Pry.send(accessor_name)
* TO DO: rewrite tests in terms of new program structure, since they're all failing due to major change (not because functionality is lacking but due to assumptions tests were making about program structure)
2010-12-27 23:56:55 +13:00
John Mair
630e9ef962 bringing most of output functionality into commands, since 99% of output is command output 2010-12-27 02:39:46 +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
John Mair
ec8f9ec71f Added out parameter to Output class, so can redirect standard output to any valid IO object. Renamed show_instance_method to show_imethod and method_doc to show_doc, and instance_method_doc to show_idoc, updated README. 2010-12-19 01:54:16 +13:00
John Mair
d2009e6de1 version bump 0.3.0, added method_doc and friends, added cat, updated README, adjusted Rakefile to use 0.2.0 method_source gem 2010-12-19 01:10:23 +13:00
John Mair
c6ee635460 Ripper for 1.9, RubyParser for 1.8. Fixed 1.8 inspect difficulties, added help for new commands, using method_source gem, updated README 2010-12-17 18:10:47 +13:00
John Mair
1471507b3a added ls/cd/cd.. 2010-12-15 15:21:13 +13:00
John Mair
23cb880422 version bump 0.2.5pre1, added valid_expression? using rue maneuver 2010-12-15 02:27:41 +13:00
John Mair
b243fa84b7 now object-based and added show_method command 2010-12-14 01:46:50 +13:00
John Mair
3542106257 fixed formatting, refactored and cleaned up some code 2010-12-12 10:53:14 +13:00
John Mair
9f07da8ee6 fixed output.rb formatting 2010-12-11 22:20:51 +13:00
John Mair
09685f360c * added new commands: help, status
* removed exit_at alias for jump_to, now only jump_to is valid
* updated documentation
* added another format for pry method, can now use 5.pry or pry(5)
2010-12-11 22:08:01 +13:00
John Mair
a25c40d2db version bump to 0.1.3 and slight aesthetic changes to code 2010-12-11 18:19:55 +13:00