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

25 commits

Author SHA1 Message Date
Conrad Irwin
44463e7d85 Stop using compatibility aliases for Pry.config 2014-05-01 01:51:01 -07:00
Robert Gleeson
74135c1890 allow for tests to be run with ease.
'bacon spec/config_spec.rb' instead of 'bacon -I spec spec/config_spec.rb'
2014-03-14 05:31:24 +01:00
Jonas Arvidsson
a987a8e7c2 Fix bug in edit regarding file names with path but no suffix
There was a bug in Command::Edit#probably_a_file? due to missing
parentheses in a method call followed by an operator.
2014-01-25 22:55:47 +01:00
Ryan Fitzgerald
46288ab002 Ignore -n and disable_auto_reload in tempfile cases 2013-07-26 16:52:15 -07:00
Conrad Irwin
bd320550c5 Hack in all the places 2013-03-24 20:46:15 -07:00
Conrad Irwin
9add537c93 Hack around rubinius code cache in specs
In real life it's highly unlikely anyone will be able to make a
meaningful change to a file in under a second, so the cache will
probably not interfere.
2013-03-24 20:29:04 -07:00
Conrad Irwin
b10403894a Annotate 1.9-only spec 2013-03-22 23:35:27 -07:00
Conrad Irwin
ef09e90af1 Use load instead of eval [Fixes #880] 2013-03-22 23:26:52 -07:00
Conrad Irwin
2c60f93b2d Merge branch 'wip.refactor'
Conflicts:
	lib/pry/completion.rb
	lib/pry/pry_instance.rb
	spec/commands/play_spec.rb
	spec/pry_defaults_spec.rb
2013-01-18 00:19:38 -08:00
John Mair
f649e283ae 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)
2013-01-15 20:06:44 +01:00
Kyrylo Silin
92a1b86e1e Fix errors in "edit_spec.rb" and "editor_spec.rb"
Basically, the condition was a bit wrong. Let's hope this commit fixes
it.
2013-01-14 18:43:19 +02:00
Kyrylo Silin
05d4d13f37 Fix errors on Rubinius and JRuby
These implementations have slightly different APIs for getting your
temp directory path.
2013-01-14 16:44:09 +01:00
Kyrylo Silin
24ac5b04f4 Remove redundant call to Shellwords.escape
The "edit" command already intelligently escapes arguments, if need.
This commit also fixes four failing tests on Windows.
2013-01-14 16:44:09 +01:00
Kyrylo Silin
ae3f534b35 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`.
2013-01-14 16:44:09 +01:00
Conrad Irwin
4044682704 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.
2013-01-14 16:44:09 +01:00
Kyrylo Silin
e66d2083c1 Edit: handle blanks in filenames correctly
Also, move path escaping to `Editor` class. The test is currently
failing (looks like a bug in `Editor`).
2013-01-14 16:44:09 +01:00
John Mair
503e6bb63f 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 ?
2013-01-11 20:47:46 +01:00
Larry Gilbert
611708386e 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.
2013-01-07 15:02:39 -08:00
Ryan Fitzgerald
8e289528cd Merge branch 'master' into wip.refactor 2013-01-05 19:30:14 -08:00
John Mair
68758e49ab be brave, fully remove the 'edit-method' command
All functionality has been successfully moved to 'edit' command, with all tests passing.
2013-01-01 01:25:43 +01:00
Ryan Fitzgerald
1ea1927b43 Rename accept_line to eval 2012-12-27 22:06:50 -08:00
Conrad Irwin
bef1b1972a No passing eval_str in edit_spec.rb 2012-12-18 00:51:21 -08:00
John Mair
9a279461c1 PryTestHelpers methods are now module_functions, included into Bacon::Context by default 2012-12-07 23:08:49 +01:00
John Mair
31a9578228 cleaned up lib/pry/test/helper.rb
* removed most historicla junk from lib/pry/test/helper.rb
* relocated recalcitrant junk to the local spec/helper.rb (this isn't exposed to 3rd parties)
2012-12-07 21:41:05 +01:00
☈king
848b6bdbeb Rename for tabcompletion-friendliness. 2012-11-15 18:59:51 -06:00
Renamed from test/test_commands/test_edit.rb (Browse further)