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

15 commits

Author SHA1 Message Date
Shannon Skipper
16c08857a6 Append to Strings with #<< rather than #+. 2013-11-24 14:58:31 -08:00
Kyrylo Silin
2d4dc78899 Show{Source,Doc}: refactor assuming definitions from the context
I hope you're pleased now, @banister!
2013-05-03 23:42:19 +03:00
Kyrylo Silin
3546a3acd5 Show{Source,Doc}: assume super definitions from the context
Fix issue #877 (show-source -s doesn't work (when no method arg is
given))

This behaviour is shared between `show-source` and `show-doc`. So with
one fix I kill two bugs.

Add tests and rewrite some of the existing ones (related to the
`--super` switch).
2013-03-27 23:47:32 +02:00
John Mair
342648f61f show-source: Indicate all monkeypatches can be shown with -a
Fixes #849
2013-03-12 20:52:10 +02:00
Conrad Irwin
d6ef67cfa7 Remove warnings [Fixes #869] 2013-03-02 16:01:55 -08:00
John Mair
4ca59800f2 Make show-source/show-doc fall-back to superclass
When performing show-source/show-doc on a class whose code
cannot be extracted we now fall-back to its first accessible superclass
and show its code together with a warning.

Example:

class Model < ActiveRecord::Base
end

show-source Model #=> shows ActiveRecord::Base code
2013-02-07 15:57:46 +01:00
Kyrylo Silin
7aba5c2615 ShowInfo: remove --flood switch
We don't support this switch anymore.
2013-02-01 16:46:46 +02:00
Conrad Irwin
30ad1743e2 Don't interpolate on ? or $ [Fixes #835] 2013-01-29 23:48:04 -08:00
John Mair
b7e70db004 show-source/show-doc: Show the first module candidate with source/docs
Prior to this change `show-source ActiveRecord::Base` would fail, as the highest ranked
candidate couldn't be discovered.
2013-01-29 15:25:05 +01:00
John Mair
2e40eb24c6 re-add reload-method as an alias for reload-code
Turns out some people actually used reload-method, so we re-add it to avoid them getting angry
2013-01-29 15:25:05 +01:00
John Mair
7ae55b3a8a 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
2013-01-11 20:47:46 +01:00
Kyrylo Silin
256f35422a 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>
2013-01-09 22:23:19 +02:00
John Mair
3da2c4d897 refactor Pry::Command::ShowInfo to make codeclimate happier 2013-01-01 23:26:14 +01:00
John Mair
c4dc8cffcd pull more show-source/show-doc methods into their superclass 2013-01-01 22:45:51 +01:00
John Mair
a5a4218660 Define a command superclass for show-source and show-doc
Pry::Command::ShowInfo is an abstract base class.
2013-01-01 21:25:23 +01:00