Permalink
Browse files

version 0.4.3 release, do NOT require pry in plugins

  • Loading branch information...
1 parent 146f516 commit 5646f2794f54781b3594bde71a5625c508b5177f @banister banister committed Jul 12, 2012
Showing with 13 additions and 10 deletions.
  1. +5 −0 Rakefile
  2. +0 −1 lib/pry-stack_explorer.rb
  3. +6 −8 lib/pry-stack_explorer/commands.rb
  4. +1 −1 lib/pry-stack_explorer/version.rb
  5. +1 −0 test/helper.rb
View
@@ -47,6 +47,11 @@ task :example2 do
sh "ruby -I#{direc}/lib/ #{direc}/examples/example2.rb "
end
+desc "Run example3"
+task :example3 do
+ sh "ruby -I#{direc}/lib/ #{direc}/examples/example3.rb "
+end
+
desc "Show version"
task :version do
puts "PryStackExplorer version: #{PryStackExplorer::VERSION}"
@@ -5,7 +5,6 @@
require "pry-stack_explorer/commands"
require "pry-stack_explorer/frame_manager"
require "pry-stack_explorer/when_started_hook"
-require "pry"
require "binding_of_caller"
module PryStackExplorer
@@ -1,5 +1,3 @@
-require 'pry'
-
module PryStackExplorer
module FrameHelpers
private
@@ -96,22 +94,22 @@ def find_frame_by_regex(regex, up_or_down)
frame_index
else
raise Pry::CommandError, "No frame that matches #{regex.source} found!"
- end
+ end
end
def find_frame_by_object_regex(class_regex, method_regex, up_or_down)
frame_index = find_frame_by_block(up_or_down) do |b|
class_match = b.eval("self.class").to_s =~ class_regex
meth_match = b.eval("__method__").to_s =~ method_regex
-
+
class_match && meth_match
end
if frame_index
frame_index
else
raise Pry::CommandError, "No frame that matches #{class_regex.source}" + '#' + "#{method_regex.source} found!"
- end
+ end
end
def find_frame_by_block(up_or_down)
@@ -190,7 +188,7 @@ def process
end
elsif match = /^([A-Z]+[^#.]*)(#|\.)(.+)$/.match(inc)
new_frame_index = find_frame_by_object_regex(Regexp.new(match[1]), Regexp.new(match[3]), :down)
- frame_manager.change_frame_to new_frame_index
+ frame_manager.change_frame_to new_frame_index
elsif inc =~ /^[^-].*$/
new_frame_index = find_frame_by_regex(Regexp.new(inc), :down)
frame_manager.change_frame_to new_frame_index
@@ -222,7 +220,7 @@ def process
frame_manager.change_frame_to args[0].to_i
elsif match = /^([A-Z]+[^#.]*)(#|\.)(.+)$/.match(args[0])
new_frame_index = find_frame_by_object_regex(Regexp.new(match[1]), Regexp.new(match[3]), :up)
- frame_manager.change_frame_to new_frame_index
+ frame_manager.change_frame_to new_frame_index
elsif args[0] =~ /^[^-].*$/
new_frame_index = find_frame_by_regex(Regexp.new(args[0]), :up)
frame_manager.change_frame_to new_frame_index
@@ -309,7 +307,7 @@ def process
stagger_output content
end
end
-
+
end
end
end
@@ -1,3 +1,3 @@
module PryStackExplorer
- VERSION = "0.4.2"
+ VERSION = "0.4.3"
end
View
@@ -1,5 +1,6 @@
require 'rubygems'
require 'ostruct'
+require 'pry'
unless Object.const_defined? 'PryStackExplorer'
$:.unshift File.expand_path '../../lib', __FILE__

0 comments on commit 5646f27

Please sign in to comment.