Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: pry/pry
...
head fork: pry/pry
This comparison is big! We're only showing the most recent 250 commits
Commits on Dec 15, 2012
@rf- rf- Fix failures in pry_defaults_spec 1fb571f
@ConradIrwin ConradIrwin Remove extra newline from output specs [Fixes #34] 26307d5
@ConradIrwin ConradIrwin Stop using rep in pry_spec.rb ed3d043
@ConradIrwin ConradIrwin Don't replace by empty string ee8e314
Commits on Dec 16, 2012
@ConradIrwin ConradIrwin Remove trailing newline from more specs f06fc64
@ConradIrwin ConradIrwin expose an API so that we can test input stacks
This is hopefully temporary...
30c72dc
@rf- rf- Fix failures in command_integration_spec 0a4c819
@ConradIrwin ConradIrwin replicate error handler for commands 6232dc9
@rf- rf- Uglier, more working impl of #interactive? 1d3d2d6
@rf- rf- Write lines from InputTester into history
Separate the check for whether to print a newline at EOF from the
check for whether to write input into the history, by inlining the
former.
36f54d9
@rf- rf- Replace r_body with accept_line 0d180c3
Commits on Dec 17, 2012
@rf- rf- Make target state downstream of r() 9ad2ec9
@rf- rf- Rename target to current_binding, add push_binding method 2cfc469
@rf- rf- Remove more target params d9d0215
Commits on Dec 18, 2012
@rf- rf- Require the first target to be given at initialization 6cd8851
@rf- rf- Fix calls to repl() in tests 5da52a0
@ConradIrwin ConradIrwin Fix PryTester edd3970
@ConradIrwin ConradIrwin s/context=/push_binding 47ad5fd
@rf- rf- Pass a real binding to :when_started hook f02ba76
@rf- rf- Minor fixes in completion spec edf455f
@ConradIrwin ConradIrwin Remove more rep() from spec/pry_spec.rb d319677
@ConradIrwin ConradIrwin Remove final rep(o) 1d81803
@rf- rf- Remove rep and re 432e077
@ConradIrwin ConradIrwin Don't pass target to run_command either 8a434a7
@rf- rf- Remove various eval_str params (failing specs) ec1ad5f
@ConradIrwin ConradIrwin Remove arg from select_prompt in the specs 94bf5d6
@rf- rf- Use accept_line in amend_line_spec instead of passing eval_string d80e049
@ConradIrwin ConradIrwin Don't use stdout... cc8bcb2
@ConradIrwin ConradIrwin No passing eval_str in edit_spec.rb bef1b19
@ConradIrwin ConradIrwin No passing eval_str in bang_spec.rb b7758db
@rf- rf- Fix play_spec and command_integration_spec 7313581
@rf- rf- Don't pass eval_string in show_input_spec 9b575e1
@ConradIrwin ConradIrwin Don't define methods on Object when testing prompt e85e9d8
@rf- rf- Pass toplevel_binding to :when_started if appropriate a8393db
Commits on Dec 20, 2012
@ConradIrwin ConradIrwin Stop tinkering with pry_instance in Pry.start
This will let us wrap the instance in a driver more easily.
e0f4f77
@ConradIrwin ConradIrwin Move initialization out of repl_prologue 3dfac68
@ConradIrwin ConradIrwin Add Pry::Driver to handle the reading and looping eeb6768
Commits on Dec 21, 2012
@rf- rf- Backtrace does not have a backtrace :musical_note: 46caa09
@rf- rf- s/Driver/REPL 9d48aba
@ConradIrwin ConradIrwin accept_eof -> accept_line(nil) 37b2f20
@ConradIrwin ConradIrwin Pry.accept_line returns a 'should continue?' boolean 4d4c0ab
@ConradIrwin ConradIrwin Simplify accept_line a bit 827ccdd
Commits on Dec 22, 2012
@ConradIrwin ConradIrwin Readd Pry#repl 141f692
@ConradIrwin ConradIrwin Re-add (deprecated) Pry#repl for @robgleeson 0093976
Commits on Dec 23, 2012
@rf- rf- Add integration tester, failing spec 6ee0f4a
@rf- rf- Fix first bug from spec 2cfbd49
@rf- rf- Slightly refactor REPL initialization 3c6ffaf
@rf- rf- Hacky fix for bug where command_state isn't initialized before cding f82cd15
@rf- rf- ReplTester API changes; add failing spec 4edafae
@rf- rf- Test command mutating eval_string instead of Ruby doing it
It probably isn't actually important to support Ruby mutating
eval_string.
00c2fc9
Commits on Dec 24, 2012
@rf- rf- Fix ivar leakage 0e1ae0f
@rf- rf- Switch from fibers to threads :broken_heart: 988b27c
@rf- rf- Fix tester for nested-instance case 4b5d47c
@rf- rf- Record initial prompt too ba34576
@rf- rf- Update existing pry_repl test e82eaad
Commits on Dec 28, 2012
@rf- rf- Fix `@backtace` typo, add spec 26a4e43
@rf- rf- Simplify interface of Pry#push_initial_binding a0cb2d2
@rf- rf- Rename reset_line to reset_eval_string 48481a1
@rf- rf- Various doc tweaks 06370d6
@rf- rf- Rename `accept_line` to `eval` 1ea1927
@rf- rf- Rename `repl` to `loop` 9fc0ee5
@rf- rf- Rename `retrieve_line` to `read` b8999b0
@ConradIrwin ConradIrwin Make hist command just use _pry_.eval a61277d
@ConradIrwin ConradIrwin Merge branch 'master' into wip.refactor
Conflicts:
	lib/pry.rb
	spec/command_integration_spec.rb
	spec/control_d_handler_spec.rb
bf3024b
@ConradIrwin ConradIrwin Fix Ctrl-D in nested pry's
I'm not convinced this is the correct fix, but it seems to mostly
preserve existing behaviour.
a28b2b0
@ConradIrwin ConradIrwin Make interactive? explicit a5d72a1
@ConradIrwin ConradIrwin Remove input_stack and fix REPLFileLoader 9ce0397
@ConradIrwin ConradIrwin Tidier test for BasicObject support b9117c8
@ConradIrwin ConradIrwin Rename loop to rep 2c95c99
@ConradIrwin ConradIrwin Refactor completion API (git diff -w) fdb703a
Commits on Dec 29, 2012
@ConradIrwin ConradIrwin Use correct_indent not auto_indent...
Prior to this change, when auto_indent was set to true for some tests,
the green dots would be cleared half-way through.

We should probably re-consider these options, but it seems useful to
explicitly disable ANSI code rewriting during specs while leaving
indentation mutating read lines (before this change, there was a bug
in REPL that did not manifest because auto_indent was false).
8a23c9a
@ConradIrwin ConradIrwin Docstrings for Pry::REPL 7c13b1f
@ConradIrwin ConradIrwin write to history incrementally
This makes it less essential for drivers to finalize the pry instance.
09160e7
@ConradIrwin ConradIrwin Remove unused method dd1cf6b
@ConradIrwin ConradIrwin Un-break pusher abstraction 3ee084e
@ConradIrwin ConradIrwin Re-instate linewise saver e378f02
@rf- rf- History doc tweaks and other misc faffing c1f8c3f
@rf- rf- Replace PryTester#simulate_repl with Pry#eval 351d8b6
@rf- rf- Pull out Indent#should_correct_indentation? 04dbded
@rf- rf- Clean up various docs for Pry::REPL 7df023b
@rf- rf- Fix YARD warning 20386c3
Commits on Jan 01, 2013
@rf- rf- Make the .gemspec canonical instead of generated fcad0a4
@rf- rf- Merge pull request #790 from pry/live_gemspec
Make the .gemspec canonical instead of generated
9f4ef13
@banister banister pull more show-source/show-doc methods into their superclass c4dc8cf
@banister banister refactor Pry::Command::ShowInfo to make codeclimate happier 3da2c4d
Commits on Jan 02, 2013
@banister banister minor cleanup to whereami command dcdea09
@banister banister bunch of random refactorings to different commands 4d38473
@banister banister Pry::Editor, Pry::Command::Whereami: more refactorings e647957
@banister banister MethodPatcher#with_method_transactions: alias --> alias_method ef8b71a
@banister banister amend-line: refactor + overengineer the f*ck out of it, for the lulz ba1f761
Commits on Jan 03, 2013
@banister banister Pry::Command::Edit: renamed some methods to improve grokkability 5302e3a
@banister banister Pry::WrappedModule::Candidate: break up some large methods e41a9e1
@banister banister Pry::WrappedModule: attempt to simplify a conditional f81dc1b
@kyrylo kyrylo Extract absolute path finding into its own method
Indent some wrongly indented code, too.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
88c6956
@kyrylo kyrylo Rename "fn" to "filename" in some places
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
0206505
@kyrylo kyrylo Fix indentation of the protected method
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
d4ba9ff
@kyrylo kyrylo Simplify method chain (use 'map.with_index')
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
a1f0a00
@kyrylo kyrylo Simplify `Pry::Code#to_s`
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
79dcf24
@kyrylo kyrylo Ensure `max_width` is always an Integer
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
f3a6242
@kyrylo kyrylo Break up `Pry::Code#between`
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
eb7ada1
@kyrylo kyrylo Refactor `Pry::Code#between`
Split some parts of it into small methods.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
59e0a89
@kyrylo kyrylo Add comments to protected methods of `Pry::Code`
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
84f6604
@kyrylo kyrylo Revert "Simplify method chain (use 'map.with_index')"
This reverts commit a1f0a00.

It doesn't compatible with 1.8.7, ree, rbx-18mode, jruby-18mode.
73167e0
@banister banister Slightly refactor help command bcfa5eb
@banister banister find-method command: break up large/complicated methods a1a6306
@banister banister minor refactor to wtf command a42eec8
@banister banister find-method refactor: 'pattern' becomes a method 1dda70c
Commits on Jan 04, 2013
@kyrylo kyrylo Assign default value to `:listing` option
When you create a class command, there is a problem with `:listing`
option, which doesn't carry the correct default value. Consider the
example:

  class MakeMeHappy < Pry::ClassCommand
    match 'woot'
  end

`MakeMeHappy` command matches against 'woot' String, but its `:listing`
option is set to the "nil" String, which is incorrect. We can fix it by
setting `:listing` explicitly:

  command_options :listing => 'woot'

It's a repetitive task, so we can automate it. Holy smoke, this why we
all use computers, after all!

With help of this commit there is no need to set `:listing` manually.
Pry will handle it for you.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
ad5bb4c
@kyrylo kyrylo Rename "Fixnum" to "Integer" in YARD docs
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
7623740
Commits on Jan 05, 2013
@kyrylo kyrylo Extract out some code from Code class
Create a new class called `LOC`, which represents a tuple of a line and
a line number (lineno). `LOC` contains methods that operate on a line.
For example, you can colorize it, or add a line number. The idea is to
make the code of `Pry::Code` more readable. It is clear to me that the
current code allows us to single out a new unit: a line of code.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2abf232
@kyrylo kyrylo Add some comments for `Pry::Code::LOC`
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
8b2fb32
@kyrylo kyrylo Rename `add_line_numbers` to `add_line_number`
Rename the instance method of `Pry::Code::LOC`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
e006cee
@kyrylo kyrylo Document `Pry::Code::LOC#add_marker`
I thought about some changes that I could make with this method, but
then I realised that it's already quite good.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
97f3d76
@kyrylo kyrylo Change @yield YARD tag for `Pry::Code#select`
It yields `LOC` now. Oh, and also prettify some default method
arguments.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
cb4b114
@kyrylo kyrylo Implement `Pry::Code::CodeRange`
Extract some protected methods from `Pry::Code` and add them into its
own class. Name it `CodeRange`, because it operates on numbers and
represents a range of lines of code.

This commit simplifies `Pry::Code`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
62c0666
@kyrylo kyrylo Move `LOC` and `CodeRange` to their own files
`Pry::Code` is not cluttered anymore.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
80e612b
@banister banister renamed reload-method to reload-code and extended functionality
Should now be able to reload any valid code object, including: methods, modules, commands, procs, etc
38e49b1
@banister banister reload-code: use obj_name (rather than code_object) in output strings 6254b8a
@banister banister Allow 'edit self' and 'reload-code self'
This didn't work due to a quirk in Pry::CodeObject.lookup() which purposely ignores 'expressions'
as they can be methods, which are dangerous to lookup. We now make an exception when the expression is 'self'

This code needs to be refactored as we have ridiculosu method names like  `def variable_or_constant_or_self?`
and we have methods like this in a couple of places. Refactor pls.
f1654d8
@banister banister Pry::CodeObject, Pry::WrappedModule: introduce safe_to_evaluate? method
Unsure where to put safe_to_evaluate? method, so it's currently duplicated in
both the mentioned modules. If we can simply switch to a defined?(str) != "method" test
then we could put the method on Pry::Method.looks_like_a_method?(str, binding) and call it from both locations, avoiding duplication.

https://www.evernote.com/shard/s130/sh/4e839419-387e-43ab-81d5-06f87aa2cbac/2c640432e3ecccb2035c69c347f63af1
470c938
Commits on Jan 06, 2013
@rf- rf- Merge branch 'master' into wip.refactor 8e28952
@banister banister set_file_and_dir(): now takes optional _pry_ and target args d77bfe2
@banister banister refactor cat command
Put each output formatter (input expression, exception, file) into its own class.
92fe82d
Commits on Jan 07, 2013
@kyrylo kyrylo Code: extract `#max_lineno_width` from `#to_s`
"Code" means `Pry::Code`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
7daf1d2
@kyrylo kyrylo Code::LOC: tuple should be "reader"
There is no need to expose the "writer" method.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
13f8c1e
@kyrylo kyrylo Code::LOC: add #== and use it in Code#==
And fix a typo in comments.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
8a610e4
@kyrylo kyrylo Create Pry::Code::EXTENSIONS
There is no need to create the hash of supported languages all the time
as the method gets called.

As always, fix some stylistics und stuff :-)

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
f6fe795
@kyrylo kyrylo Code#to_s: standardise method chain
Make it as in `Code#raw` (they both do similar things).

And fix typos, typos, typos.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
b63e8ff
@kyrylo kyrylo Use `block` instead of `blk` across-the-board
Everywhere else in the code it's the very `block`.

Rename `Code#get_abs_path` to `#abs_path`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
5ec0bfa
@kyrylo kyrylo Code#to_s: don't loop thrice
One loop is enough to complete the task.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
8779d50
@kyrylo kyrylo Code: simplify `.from_file` class method
1. Use a temporary variable to hold code;
2. Instantiate `Pry::Code` only in one place;
3. Refactor reading from a file (a credit flies to John Mair).

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
28bdf09
@L2G L2G Fix calls to Tempfile.new (GH issue #792)
Suffix of "*.rb" caused temp files to be named with "*.rb"
at the end, literally.  Not all file systems like that, and
it's almost certainly not what was intended.
6117083
Commits on Jan 08, 2013
@kyrylo kyrylo Merge pull request #796 from L2G/gh-792
Fix calls to Tempfile.new (GH issue #792)
3e1590c
@kyrylo kyrylo Remove legacy methods from helpers
From BaseHelpers:

  * #stub_proc
  * #create_command_stub

From CommandHelpers:

  * #retrieve_code_object_from_string
  * #file_and_line_from_binding
  * #make_header

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
a4e4ef0
@kyrylo kyrylo Extract out gem related code to Pry::Rubygem
And fix some typos, and prettify some lines.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
3c60ee8
@rking rking Intermediate merge step 4e89649
@rking rking Immediate output from Guard
(So you know it's not Guard lag, but test suite start)
e1f6580
@rking rking ls columns improvement
Now is like /bin/ls, sorting downward, shrink-wrapping columns, and
minimizing row usage as best as I know how.
f9b9598
@rking rking Downgrade each_with_object to manual accumulation 889ace4
@rking rking Fix my goofy indentation 0eccbbb
@rking rking More lenient assertion for whereami -n 982b4fa
Commits on Jan 09, 2013
@kyrylo kyrylo Implement `Rubygem::install`
Use the code of `gem-install` command as a basis.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
4c56c73
@banister banister Pry::Command::Cat::FileFormatter: make format() private 8620676
@banister banister Reimplemented play, save-file with Pry::Command::CodeCollector
Pry::Command::CodeCollector is a mixin that extracts out shared
functionality from play, save-file and gist. Gist is yet to be
reimplemented.
439c5c6
@banister banister Pry::CodeObject: binding_lookup --> empty_lookup 0608c0e
@banister banister implement whereami -n (exclude line numbers) 32eb6ca
@banister banister Pry::Command::CodeCollector: replace module inclusion with delegation
And implement play and save-file using the new delegator. 'gist' still needs
to be re-implemented using CodeCollector.

************
TODO:
**************
Couldn't write a test for `play --lines 4..5` with implied target.eval("__FILE__") parameter,
need to come up with a decent test.
4a059fd
@ConradIrwin ConradIrwin Add support for ENV["LINES"] which works
ENV["ROWS"] doesn't for me.
44710d9
@banister banister WrappedModule now ignores def_delegator methods, fixes #801
If a class had most of its methods defined by def_delegators, the module extraction code would break.
This was due to Pry::WrappedModule looking for the class definition in fowardable.rb. We now
just simply reject all methods that have source_location.first =~ /forwardable\.rb/
de9a839
@banister banister Try to simplify edit.rb
* Remove ContextLocator, inlining the class in edit.rb instead.
* Pass explicit parameters into MethodPatcher and ExceptionPatcher, rather than passing 'self'
  and using def_delegators

Hopefully this won't upset codeclimate too much!
9cc95f9
@banister banister oops, forgot to remove context_locator require 3669832
@kyrylo kyrylo Prettify command descriptions, switches and stuff
Wrap command descriptions to 80 characters. Convert some string options
to symbols (where possible). Align options in code. Remove dots in the
end of switch descriptions.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
256f354
@banister banister Improve Pry::Command::Edit
* put all file and line location logic into FileAndLineLocator module
* pass explicit parameters to ExceptionPatcher and MethodPatcher (rather than just 'self')
e171029
@rking rking Extract Table to its own file 139a2a7
Commits on Jan 11, 2013
@banister banister Pry::CodeObject: remove unnecessary 'target' parameter
Since we can access 'target' via _pry_.current_context

* We also update a few files (code_collector/show_info) that need to be updated for this change
7ae55b3
@banister banister edit command: add --method option
* --method doesn't accept any parameters, it only edits the 'current' method associated
with the binding. It's equivalent to 'edit-method' (with no args).
* This option is necessary as 'edit' by itself edits the last expression.
* Note that --method doesn't just edit the current method, if no method exists (i.e binding.pry was not put
inside a method context) then it edits the current OBJECT instead.

TODO:
* explicitly restrict --method to *just* methods and not allow it to fall back to objects?
* allow --method to take a parameter that must be a method object? e.g --method Pry#repl works
but --method Pry would fail ?
503e6bb
@rking rking Update show-file docs 3b52fcb
Commits on Jan 12, 2013
@swarley swarley Fixed using a preprocessor just looking for --no-plugins in the ARGV …
…array using slop. Dirty and effective fix.

Took out the trash from the dev process
06bff9a
@kyrylo kyrylo edit: Add example for `--ex --patch` combination
And make the two-column examples.
18e3877
@ConradIrwin ConradIrwin Pass SyntaxErrors to error handler too. [Fixes #774] d3d29c4
@banister banister add edit-method stub: deprecation warning, use edit f94eb5a
@banister banister Improved Pry::CodeCollector so it accept multiple -i/o ranges
i.e play -i 1..3 -i 5..9 now works
21b5337
@banister banister added spec for save-file for multiple -i ranges 0ebc315
@banister banister updated play_spec.rb to check for errors
Also added play spec for multi-ranged -i options but does not work
for some weird reason?!
8732bb1
@banister banister added fix-indent command
Re-indents the eval_string, useful for amend_line and play, etc
54baa7a
@banister banister show-source: prettier error messages a604fd6
@banister banister play and amend-line: now use fix-indent to correct broken indentation 703f42b
@kyrylo kyrylo Add headings for methods in the output of `ls`
You will see headings when a table has more than 35 methods.
Otherwise, there is no need in them.
1c33a73
@AndrewVos AndrewVos refactor #process 17d485b
@AndrewVos AndrewVos refactor the #process method
This has created a whole lot of additional methods. Perhaps these should
be moved into some sort of Presenter (puke) classes.
96bca02
@AndrewVos AndrewVos stop passing so many parameters around
The write_out* methods all use to take multiple parameters which were
actually available without having to pass them around. Made these
parameters ivars and attr_reader'ed all of them.
cc4df82
@AndrewVos AndrewVos don't use unneccessary meta-programming 3e8c703
@AndrewVos AndrewVos readability in write_out methods
thanks to @locks for this one
0dfdf7b
@AndrewVos AndrewVos refactor raise_errors_if_arguments_are_weird as per @rking advice 2c4c784
@AndrewVos AndrewVos clean up redundant code 05487af
@AndrewVos AndrewVos extract method on redundant code cee34d9
Commits on Jan 14, 2013
@kyrylo kyrylo Revert "Add headings for methods in the output of `ls`"
This reverts commit 1c33a73.

Looks unpleasant for most of Pry users.
dac10c6
@Mon-Ouie Mon-Ouie Made sure completions proc do not return nil
The completion proc returning nil causes errors in input systems that only
expect strings (e.g. Coolline).
2fe52d6
@kyrylo kyrylo gist_spec: remove some repetitive code 5871054
@kyrylo kyrylo Edit: handle blanks in filenames correctly
Also, move path escaping to `Editor` class. The test is currently
failing (looks like a bug in `Editor`).
e66d208
@ConradIrwin ConradIrwin Only shellword escape filenames in system calls on linux 15caf5f
@ConradIrwin ConradIrwin Remove needless old_editor restoration
Unfortunately nested assignments to @old_editor meant that the
original @old_editor was permanently lost. This caused sporadic
failures of spec/editor_spec.rb which was relying on Pry.config.editor
containing a string.
4044682
@ConradIrwin ConradIrwin Fix indentation (HARDER) d29f6b5
@kyrylo kyrylo Use proper temp directories for each OS
Also, there was a failing test on Windows ("should shell-escape files").
You will see it if you're running tests on Windows. Make it conditional.
9df4723
@kyrylo kyrylo Fix errors in tests on Windows
Some tests are still failing, though. This commit fixes wrong usage of
temporary paths on Windows. Please, note: the `edit` command is working
well; the issue is in poor tests.

Prettify some ugly code in `spec/editor_spec.rb`.
ae3f534
@kyrylo kyrylo Remove redundant call to Shellwords.escape
The "edit" command already intelligently escapes arguments, if need.
This commit also fixes four failing tests on Windows.
24ac5b0
@kyrylo kyrylo Fix errors on Rubinius and JRuby
These implementations have slightly different APIs for getting your
temp directory path.
05d4d13
@banister banister play specs: rewrite -i spec to use redirect_pry_io
This is because pry_tester doesn't work when the eval_string is mutated by a command
75d1380
@banister banister Pry.config.collision_warning = true by default
Let's try this, if it annoys people, we'll just revert it in a patch level
0847496
@kyrylo kyrylo Fix errors in "edit_spec.rb" and "editor_spec.rb"
Basically, the condition was a bit wrong. Let's hope this commit fixes
it.
92a1b86
@ConradIrwin ConradIrwin Remove output.write
Many plugins only define a puts method on the output object. This change
removse the ability to customize the formatter used when outputting
variables in `ls`. We should reconsider the best way to do this.
1aacb10
@kyrylo kyrylo Fix indentations for the gist command description 5ceab36
@kyrylo kyrylo [GEM] Depend on Slop "~> 3.4"
Slop v3.4.0 includes new syntax for subcommands. And we're going to
utilise it.
8f65c58
@kyrylo kyrylo Remove old subcommands cruft
  * use a plain old Slop instance instead of `Options`;
  * remove `ClassCommand::Options` and its tests;
  * add clearer subcommand example (for `Command#subcommand` method);
  * refactor `ClassCommand#slop`;
  * refactor `ClassCommand#complete`.

Slop v3.4.0 has introduced full-featured subcommands. There is no need
in Pry specific code anymore.
c38eb20
@kyrylo kyrylo Update relevant tests in "command_spec.rb"
Make them use the new Slop syntax.
bebf91f
@kyrylo kyrylo Update examples for ClassCommand#subcommands 61326c0
@kyrylo kyrylo Update hist command to the new Slop API
It was creating a new Slop instance for its own needs, thus and so
remove the previous abstraction for Slop commands. The
`ClassCommand::Options` class should be removed because we don't need it
anymore.
83aebd1
@banister banister save-file passes on windows :D e63a833
Commits on Jan 15, 2013
@banister banister Pry::Command::CodeCollector: add #file attribute
This allows callers to know that CC is working on a file rather than ruby code.
08ac190
@banister banister edit: ensure 'edit --ex' always edits the exception
There was a bug where if 'edit --ex' was invoked in a patched method context
it would instead to the equivalent of 'edit --method' (patching the current method
rather than the exception)
f649e28
@banister banister gist: Use Pry::CodeCollector (like play/save-file)
This enables a simplified UI, i.e: gist my_file.rb instead of gist -f my_file.rb
and `gist my_method` instead of `gist -m my_method`. Unfortunately, we had to kill our
tests in the process of doing this (gist_spec.rb is just commented out) - however since play
and save-file have tests and they use the same Pry::CodeCollector object 'gist' is indirectly
tested. Nonetheless, we should re-add tests at some point
b6b7815
@banister banister Add deprecated_commands API
And rewrite edit-method / show-command to use this API.
0531b8a
@banister banister Thread.current -> Pry.current 5e3a3f0
@banister banister turn Pry.config.collision_warnings back off
This was a horrible mistake, it's stupidly annoying

* in the case of 'rake pry' it warngs every time we do 'cd' (since 'cd' is a top-levle method
  defined by rake)

That's all i can think of right now, but that's still annoying enough.
79a4b30
@kyrylo kyrylo Remove "notes.yml" f172177
Commits on Jan 16, 2013
@kyrylo kyrylo Prepare CHANGELOG for the new release 2fd0e1b
@banister banister Edit::MethodPatcher: remove unnecessary assignment e53af39
@banister banister Version 0.9.11 release
Final adjustments made to CHANGELOG and CONTRIBUTORS
3700aed
@banister banister v0.9.11.1 bugfix
* forgot to remove 'no_arg' from Pry::Command::CodeCollector, this method no longer exists
and so 'gist' (when not given any params) would break. Replaced no_arg with empty string ""
so that 'gist' gists current object/method by default.
f7a11a6
@banister banister updated CHANGELOG for 0.9.11.1 6fdb393
@banister banister gist: window's fix for broken clipboard 19aa778
@banister banister 0.9.11.2 bugfix for windows
minor bug fix for gist on windows, rescuing Jist::ClipboardError
rather than letting the scary error spill out to users and potentially
have them think the gist didnt post.
80e772a
Commits on Jan 17, 2013
@kyrylo kyrylo Command: fix typo in comments 24437c7
@banister banister gist: re-add 'jist' gem dependency with :requires_gem
Oops, forgetting this meant that 'gist' command would error out with
ugly messages rather than prompting the user to 'install-command'
c10017f
@banister banister Fix Pry.run_command
The problem was that Pry#rep() no longer works on its own, it's
necessary to use Pry#repl() instead. This is because many new API, like
Pry::CodeObject.lookup now get the target binding directly from the _pry_ instance
(Pry#current_context), rather than requiring it to be passed in
separately. This saves us a parameter.

The reason Pry#rep doesnt work with Pry::CodeObject.lookup (and so
show-source/show-doc etc) is that the binding_stack is only set up in
Pry#repl_prologue, and it is the binding_stack (via Pry#current_context)
that is accessed by Pry::CodeObject and pals.
aac76dd
@banister banister add some missing pieces from CHANGELOG e1d9152
@rking rking Bump version (it was conflicted anyway) fd392b6
@rking rking Add Pry.auto_resize! to respond to width changes.
- Opt-in because we aren't sure where it doesn't work
- Not Coolline-aware
- Otherwise a big improvement
5b346bc
@rking rking Adjusting ls output for voluminous output
The previous table output was geared mostly for `ls _pry_`, which isn't
a common of hierarchy. After feedback from users such as @envygeeks, we
found a few tweaks that would help the really-small layers such as those
found in Rails or in small classes, namely:

- Rolling it up onto one line, if possible
- Highlighting the heading in the colors familiar to users of GNU ls for
  "directory" style

Additionally, I took the opportunity for toning down the
private/protected method colors, because before they were green and
yellow, now they're both "muted terminal blue"

Without the ability to really get in and really distinguish colors (e.g.
using 256 colors), giving "protected" such a loud color seems wrong.

Before recoloring:
  #813 (comment)
After:
  #813 (comment)
14283aa
Commits on Jan 18, 2013
@banister banister Fix failing specs on ree/ruby18
We put a conditional around tests so that we skip those those using
show-source (namely the one in run_command_spec.rb) on ree/ruby18
de12f25
@banister banister improve help for 'edit' command 81b69e0
@banister banister version 0.9.11.3 bugix release
* fix Pry.run_command
* improve `ls` output
* add :requires_gem => "jist" to 'gist' command (so deps can be installed
	via install-command)
* improve help for 'edit' command
64f48d4
@ConradIrwin ConradIrwin Merge branch 'wip.refactor'
Conflicts:
	lib/pry/completion.rb
	lib/pry/pry_instance.rb
	spec/commands/play_spec.rb
	spec/pry_defaults_spec.rb
2c60f93
@ConradIrwin ConradIrwin Remove confusing rescue raise 2e17c21
Commits on Jan 19, 2013
@epitron epitron Some fixes to the pager.
We didn't send any flags to the pager, as a result ansi codes
were not applied unless the user had properly set up their LESS
env variable. This was often not the case, resulting in broken
and ugly output. This commit sends along the proper flags whenever
we use the pager, regardless of the user's LESS variable
9488494
@banister banister pager.rb: Ensure we explicitly rescue LoadError
a bare 'rescue' will not catch a LoadError
6c083f1
Commits on Jan 20, 2013
@banister banister add Pry.last_internal_error
This is set to the last CommandError, SlopError, etc. Most often
raised by commands. This info is useful to pry devs debugging
otherwise opaque command errors.
0cb9a49
Commits on Jan 24, 2013
@kyrylo kyrylo SimplePager: take into account the info bar
Fix issue #786 (SimplePager is a bit neglectful)

The info bar takes exactly 3 lines.
6138218
@kyrylo kyrylo Rename "DEPRECATED" to "DISABLED"
Fix issue #817 (DEPRECATED: Use `edit` instead.)

Rename `CommandSet#deprecated_command` to `#disabled_command`. Rename
the file in "commands/", too.
0bfad58
@kyrylo kyrylo SimplePager: fix my goofy indentation (c) 743f76f
@amanelis amanelis Added license to config in gemspec 941febd
@rf- rf- Merge pull request #824 from amanelis/gemspec-license
Added license to config in gemspec
b494431
Commits on Jan 25, 2013
@ConradIrwin ConradIrwin Fix NoMethodError __id__ on ruby-1.9.2 b1c797c
@kyrylo kyrylo Command: replace `Slop::parse` with `Slop::new`
Fix issue #828 (bizarre option parsing bug)

banister
--------
> commands like hist and friends behave differently when -r option is
> passed to the pry executable, this is really weird, see here:
> http://showterm.io/9896520588d7e799738a4
b3d525b
Commits on Jan 26, 2013
@kyrylo kyrylo Pager: use TerminalInfo API for `::page_size`
Fix issue #829 (NoMethodError: undefined method `winsize'
for #<IO:<STDOUT>>, The Same Error as #549 But On The Latest Version
(0.9.11.4))
584aea1
Commits on Jan 27, 2013
@kyrylo kyrylo Helpers::tablify: fix FloatDomainError
Before this commit the following snippet didn't work:

  pry(main)> Pry::Helpers.tablify(['foobar', 'baz'], 5)
  #=> FloatDomainError

There was a divison by zero in `Helpers::Table#_recolumn`.

The problem is incorrectly written `until` loop condition. Note that the
longest element in the array has 6 characters. But the second argument
tells `::tablify` that the line width is only 5 characters long.

This commit changes the condition. Now, if you run the same snippet, you
would see that the elements form one column (and the code doesn't blow
up your program).

Possibly, in the described case, the table has unwanted blanks. However,
I'm not very competent in the code, so I'd better not touch it, because
it works.
9074613
@ConradIrwin ConradIrwin All passing arguments to `rake pry`. d40527a
@rf- rf- Always pass `inherit` param to `Module#constants`
This fixes the `ls Module` case, because it makes the singleton method
`Module.constants` call the instance method. :notes:
28afdd5
@rf- rf- Add regression test for 28afdd5 d7b3363
Commits on Jan 28, 2013
@rf- rf- Better fix for 28afdd5
That solution doesn't work on MRI 1.8.
1cec311
@rf- rf- Add ruby-head to Travis c151900
@rf- rf- Remove unnecessary default from documentation 533136c
@rf- rf- Split EOF handling up from other error handling 1373ef4
@rf- rf- Remove Coolline special-casing da71f68
@rf- rf- Factor out set_completion_proc method b5b072f
@rf- rf- Refactor error handling into separate methods c2edd8d
@rf- rf- Pass prompt into read from repl b6f5dd0
@rf- rf- Factor out fix_indentation ee46e93
@rf- rf- Minor refactoring of #repl 7dc9113
@rf- rf- Use alias_method_chain to handle layering f623f83