All the pry plugins that work on Ruby 1.8
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.document
.gitignore
Gemfile
Gemfile.lock
LICENSE.txt
README.md
README.md.erb
Rakefile
in.yml
pry-full18.gemspec

README.md

pry-full

Get up and going with a good set of pry tools right away.

Dependent Gems

pry-nav

Like its bigger, 1.9 brother pry-debugger, allows basic stepping

  • Making the basic "require'pry';binding.pry" from a script come alive.

  • In conjunction with pry-rescue, to explore failing tests.

  • Following calls into other libs.

pry-rescue

Provides Pry.rescue do … end to capture any exceptions and start pry from the context of the source of the exception.

pry-remote

Starts Pry, listening on a socket, that you can then connect to.

  • Debugging odd glitches, like ones that only occur in production.

  • Cases like with pry-remote but where encryption/auth is needed.

  • …TODO: fill this list out

pry-doc

Allows you to look into the Ruby builtin classes with the ? and $ commands.

  • ? [].pop

  • $ [].pop

  • …etc.

pry-awesome_print

An alternative printing style. A little funky, but more detailed than default Pry, especially for complex objects.

  • Compare the output of the large _pry_ object with and without this.

  • Array indices are shown, so you can enter them in the next REPL line.

  • If you want to see the old output, you can obj.inspect

pry-git

Method-level git commands.

  • Blame/diff a specific method.

pry-highlight

Reformat strings with pretty-printing. Auto-detects JSON/XML/Ruby.

  • After a method produces ugly XML, do ">>" by itself to see it prettied.

  • Pass in the string as an arg, e.g., >> '{"a":1}'

  • Pass in any Ruby as an arg, >> File.read("/var/www/foo.html")

pry-theme

Alternative syntax highlighting.

  • Being more snazzy

  • Making pry more like your editor, so you can scan more easily.

pry-pretty-numeric

A very simple, but nice, plugin. Turns 12345689 into 12_345_689 on output (Which is legal Ruby input). Note that this currently gets hidden with the awesome_print output.

  • Any time you have big numbers.

pry-syntax-hacks

Cirwin's wild bag of tricks. The caveat is that it's pretty wild and tricky. Especially since input with @s can get rewritten as an instance_variable_get. Still, this is only a matter of understanding the dialect used, and adapting accordingly.

  • Direct member access; User.new.@secret_password

  • Calling private methods; User.new.!hash_password('foo')

  • Accessing Pry outer bindings; cd (a = Object.new) then puts ../a

Other tips

As an alternative to bundle open somegem, there's this cool sequence: gem-cd somegem .zsh

This will drop you into a temporary shell in the install dir of the gem, where you can use ack and cat **/* | vim - +setf\ ruby and other familiar tools to explore new codebases.