Add support for pry --gem

I am always doing pry -I./lib -r<gemname>.
This commit is contained in:
Conrad Irwin 2013-02-03 00:04:53 -08:00 committed by Kyrylo Silin
parent aac1ef2312
commit 19bfc13aa8
1 changed files with 7 additions and 0 deletions

View File

@ -161,6 +161,13 @@ Copyright (c) 2013 John Mair (banisterfiend)
$LOAD_PATH.unshift(*load_path)
end
on "gem", "Shorthand for -I./lib -rgemname" do |load_path|
$LOAD_PATH.unshift("./lib")
Dir["./lib/*.rb"].each do |file|
Pry.config.requires << file
end
end
on :v, :version, "Display the Pry version" do
puts "Pry version #{Pry::VERSION} on Ruby #{RUBY_VERSION}"
exit