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

14 commits

Author SHA1 Message Date
Kyrylo Silin
f33d82779a rubocop: fix offences of the Style/HashSyntax cop 2018-10-13 03:09:29 +08:00
Kyrylo Silin
96c6958cc6 specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
Matijs van Zuijlen
96b61f14aa Fix some warnings 2015-01-23 14:03:36 +01:00
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
Danielle Sucher
858f7d3b88 Show method docs for Foo() and class docs for Foo 2013-09-06 14:58:12 -07: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
John Mair
92c345aa12 module_candidate.rb improved class lookup regex
Bug prevented lookup of Deeply::Nested::Class::Definitions.

Also properly differentiate when looking up docs/source for *commands* and for the class that represents the command, i.e:
show-doc show-source #=> displays show-source --help
show-doc Pry::Command::ShowSource #=> comments above class definition (as with any other class)
2012-12-27 23:02:53 +01:00
Kyrylo Silin
5cb356f731 Refactor 'command_lookup'
Thanks to Bacon we can use `before` method to simplify our life.
And, blimey, I accidentally left some unwanted code after myself!

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-12-27 13:29:27 +02:00
Kyrylo Silin
73820fa08a Ensure nil doesn't freak out #find_command
When you pass `nil` to `BaseHelpers#find_command` and a command in `set`
doesn't have the `:listing` option (for example, when your command is a
regular Ruby class), `#find_command` will return that command (even if
it doesn't match at all).

  command.options[:listing] #=> nil
  name = nil
  command.options[:listing] == name #=> true

Add tests to "code_object_spec.rb", because that's how I found this
shortage and it seems to be a natural test.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-12-27 13:29:27 +02:00
John Mair
2f0c4c28a6 Pry::CodeObject, allow lookups for methods of the form: local#method
the '#' used to be interpreted as a comment and so only 'local' and not the associated method was looked up.
Fixed this by letting strings of the form /\S#\S/ pass through to Pry::Method lookup
2012-12-22 22:59:03 +01:00
John Mair
81554dda0a migrating show-source over to new Pry::CodeObject API 2012-12-20 18:05:42 +01:00
John Mair
405aacf76d added ability to extract an implicit object from binding when no string is given 2012-12-20 18:05:42 +01:00
John Mair
bbd4df87d4 started code_object stuff 2012-12-20 18:05:42 +01:00