Switch branches/tags
Commits on Jan 18, 2017
  1. Merge pull request #13 from taylorkearns/update-curl-url-in-readme

    ConradIrwin committed Jan 18, 2017
    Update URL for curl'ing the raw .pryrc
Commits on Jan 13, 2014
  1. bump version

    ConradIrwin committed Jan 13, 2014
  2. Merge pull request #9 from brainopia/patch-1

    ConradIrwin committed Jan 13, 2014
    Foolproof debundle
Commits on Jan 9, 2014
  1. Foolproof debundle

    brainopia committed Jan 9, 2014
    Gem::Specification.reset is not enough, since it would pick up the same GEM_HOME which was set by bundler. So we need to restore it first, then clear gem paths (to pickup a change in ENV) and then continue with previous hack.
Commits on Apr 28, 2013
  1. v0.7

    ConradIrwin committed Apr 28, 2013
  2. Merge pull request #7 from rf-/master

    ConradIrwin committed Apr 28, 2013
    Doesn't work with Rubygems 2.0
Commits on Apr 27, 2013
Commits on Sep 28, 2012
Commits on Sep 23, 2012
  1. typo (thanks @rking)

    ConradIrwin committed Sep 23, 2012
Commits on Aug 31, 2012
Commits on Jul 30, 2012
  1. Add :when_started hook

    kyrylo committed Jul 30, 2012
    First of all, let's describe `:when_started` and `:before_session` hooks.
    The description is provided by John Mair:
    * `:when_started` is invoked in Pry.start, and lets you make core
      changes like even change which binding the session starts on;
    * `:before_session` is invoked after the binding is already decided upon
      so it's too late to change, but invoked prior to the repl loop
      starting up.
    Currently, "pry-debundle" has a problem with `:before_session` hook. The
    problem with it is a bit tricky and not really transparent. Let me
    explain that by showing a real-world example. I will take
    "pry-theme"[1] plugin as an example.
    Let's imagine that we have a Rails project and we want to use Pry
    instead of IRB. We don't want to include all the Pry plugins that we use
    locally into our Gemfile, because they are specific for each taken
    separately programmer. Everyone uses his own plugins, so we don't want
    to clutter our Gemfile. Now then, we add only "pry-rails" and
    "pry-debundle" gems into our Gemfile:
      gem "pry-rails", :group => :development
      gem "pry-debundle", :group => :development
    Next, we do `bundle install` and launch our Rails console: `rails
    c`. Boom! Did you notice that too? The "pry-theme" doesn't work
    properly![2] But why is it so? The filthy worm hides in the boondocks of
    the Pry hooks. The problem is that currently "pry-debundle" uses
    `:before_session` hook. Every time you load a Rails console, Pry itself
    loads only those plugins that are defined in your Gemfile. Fathom this.
    *Only the plugins from your Gemfile*, if the file is present. Only
    "pry-rails" and "pry-debundle" gems in our particular case. Remember
    that we didn't add any of local Pry plugins to the Gemfile apart from
    these two? Yes, and "pry-theme" isn't loaded either by now.
    What happens next is that "pry-debundle" comes into play. It reloads
    your Pry plugins without taking the Gemfile into account. Why? Well,
    that's what "pry-debundle" is about. It activates *all* your local Pry
    plugins, so there is no need to include them manually to your Gemfile.
    Looks about right, isn't it? OK, let's lean back, take a good cup of
    strong black tea (with a lemon), get our breath and try summarize
    what was said before (in chronological order):
      1) Pry loads all Pry plugins from Gemfile, if any;
      2) "pry-debundle" loads and activates other Pry plugins installed in
         the system.
    But it still doesn't work properly. "pry-theme" is messed up for some
    reason. What the hell is going on? Good question, sir. Fortunately, I
    know the answer. And the answer is that "pry-debundle" lacks the proper
    hook to fire its own `debundle!` method. That's very simple:
    "pry-debundle" does not take into account hooks like `:when_started`
    defined in other Pry plugins. Such hooks are loaded by "pry-debundle",
    but never executed.  It's an unreachable code. "pry-theme" uses
    `:when_started` hook of Pry to set a default colour theme, but it
    doesn't work nicely with "pry-debundle".
    What wasn't transparent is the difference between `:when_started` and
    `:before_session`. As we can see, there is a big difference between
    Fix the problem by adding `:when_started` hook to "pry-debundle". That
    would allow to execute `:when_started` hooks of other Pry plugins.
    [1]: "pry-theme" is a Pry plugin, which colours Ruby code with help of
         ".prytheme" files.
    [2]: There is a relevant issue in "pry-theme" bug tracker. Check it out:
    Signed-off-by: Kyrylo Silin <>
    Acked-by: Conrad Irwin <>
Commits on May 12, 2012
  1. Work when source_location doesn't.

    ConradIrwin committed May 12, 2012
    I was trying to be clever by requiring the absolute path to rubygems,
    but actually it's easier to just rely on the fact that rubygems will be
    in the load path.
Commits on Apr 7, 2012
  1. Add link to Bundler bug.

    ConradIrwin committed Apr 7, 2012
  2. Version 0.1

    ConradIrwin committed Apr 7, 2012