diff --git a/.travis.yml b/.travis.yml index 9503b67..24d32ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,14 @@ script: rvm: - 1.9.2 - 1.9.3 + - 2.0.0 + - 2.1.5 + - 2.2.0 notifications: irc: "irc.freenode.org#pry" recipients: - - jrmair@gmail.com + - chris@ill-logic.com branches: only: diff --git a/CHANGELOG b/CHANGELOG old mode 100755 new mode 100644 diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 index acb63c7..bd50b7a --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,13 @@ License ------- -(The MIT License) +The MIT License -Copyright (c) 2011 John Mair (banisterfiend) +Copyright (c) 2015 Barry Allard (steakknife) + +Copyright (c) 2014 Chris Gahan (epitron) + +Copyright (c) 2011 John Mair (banister) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 313184e..2bf1fc0 --- a/README.md +++ b/README.md @@ -1,145 +1,25 @@ -pry-stack_explorer +pry-stack =========== -(C) John Mair (banisterfiend) 2011 +A Pry plugin to navigate the stack. -_Walk the stack in a Pry session_ +This gem is almost exactly the same as [pry-stack_explorer](http://github.com/pry/pry-stack_explorer), with three exceptions: -pry-stack_explorer is a plugin for the [Pry](http://pry.github.com) -REPL that enables the user to navigate the call-stack. +* Its name is shorter +* "up" and "down" actually move the stack pointer in those directions +* You can type "stack" instead of "show-stack" +* It has a fresh pine scent -From the point a Pry session is started, the user can move up the stack -through parent frames, examine state, and even evaluate code. - -Unlike `ruby-debug`, pry-stack_explorer incurs no runtime cost and -enables navigation right up the call-stack to the birth of the -program. - -pry-stack_explorer is currently designed to work on **Rubinius and MRI -Ruby 1.9.2+ (including 1.9.3)**. Support for other Ruby versions and -implementations is planned for the future. - -The `up`, `down`, `frame` and `show-stack` commands are provided. See -Pry's in-session help for more information on any of these commands. - -**How to use:** - -After installing `pry-stack_explorer`, just start Pry as normal (typically via a `binding.pry`), the stack_explorer plugin will be detected and used automatically. - -* Install the [gem](https://rubygems.org/gems/pry-stack_explorer): `gem install pry-stack_explorer` -* Read the [documentation](http://rdoc.info/github/banister/pry-stack_explorer/master/file/README.md) -* See the [source code](http://github.com/pry/pry-stack_explorer) -* See the [wiki](https://github.com/pry/pry-stack_explorer/wiki) for in-depth usage information. - -Example: Moving around between frames --------- - -``` -[8] pry(J)> show-stack - -Showing all accessible frames in stack: --- -=> #0 [method] c - #1 [block] block in b - #2 [method] b - #3 [method] alphabet - #4 [class] - #5 [block] block in
- #6 [eval]
- #7 [top]
-[9] pry(J)> frame 3 - -Frame number: 3/7 -Frame type: method - -From: /Users/john/ruby/projects/pry-stack_explorer/examples/example.rb @ line 10 in Object#alphabet: - - 5: - 6: require 'pry-stack_explorer' - 7: - 8: def alphabet(y) - 9: x = 20 - => 10: b - 11: end - 12: - 13: def b - 14: x = 30 - 15: proc { -[10] pry(J)> x -=> 20 -``` - -Example: Modifying state in a caller -------- - -``` -Frame number: 0/3 -Frame type: method - -From: /Users/john/ruby/projects/pry-stack_explorer/examples/example2.rb @ line 15 in Object#beta: - - 10: beta - 11: puts x - 12: end - 13: - 14: def beta - => 15: binding.pry - 16: end - 17: - 18: alpha -[1] pry(main)> show-stack - -Showing all accessible frames in stack: --- -=> #0 [method] beta - #1 [method] alpha - #2 [eval]
- #3 [top]
-[2] pry(main)> up - -Frame number: 1/3 -Frame type: method - -From: /Users/john/ruby/projects/pry-stack_explorer/examples/example2.rb @ line 10 in Object#alpha: - - 5: - 6: - 7: - 8: def alpha - 9: x = "hello" - => 10: beta - 11: puts x - 12: end - 13: - 14: def beta - 15: binding.pry -[3] pry(main)> x = "goodbye" -=> "goodbye" -[4] pry(main)> ^D - -OUTPUT: goodbye -``` - -Output from above is `goodbye` as we changed the `x` local inside the `alpha` (caller) stack frame. - -Limitations -------------------------- - -* First release, so may have teething problems. -* Limited to Rubinius, and MRI 1.9.2+ at this stage. - -Contact +License ------- -Problems or questions contact me at [github](http://github.com/banister) +The MIT License +Copyright (c) 2015 Barry Allard ([steakknife](http://github.com/steakknife)) -License -------- - -(The MIT License) +Copyright (c) 2014 Chris Gahan ([epitron](http://github.com/epitron)) -Copyright (c) 2011 John Mair (banisterfiend) +Copyright (c) 2011 John Mair ([banisterfiend](http://github.com/banister)) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/Rakefile b/Rakefile old mode 100755 new mode 100644 index f036e06..6ce7342 --- a/Rakefile +++ b/Rakefile @@ -1,112 +1,30 @@ -$:.unshift 'lib' +gem_version = File.read("VERSION").strip +gem_name = "pry-stack" -dlext = RbConfig::CONFIG['DLEXT'] -direc = File.dirname(__FILE__) - -PROJECT_NAME = "pry-stack_explorer" - -require 'rake/clean' -require 'rubygems/package_task' -require "#{PROJECT_NAME}/version" - -CLOBBER.include("**/*~", "**/*#*", "**/*.log") -CLEAN.include("**/*#*", "**/*#*.*", "**/*_flymake*.*", "**/*_flymake", - "**/*.rbc", "**/.#*.*") - -def apply_spec_defaults(s) - s.name = PROJECT_NAME - s.summary = "Walk the stack in a Pry session" - s.version = PryStackExplorer::VERSION - s.date = Time.now.strftime '%Y-%m-%d' - s.author = "John Mair (banisterfiend)" - s.email = 'jrmair@gmail.com' - s.description = s.summary - s.require_path = 'lib' - s.add_dependency("binding_of_caller",">= 0.7") - s.add_dependency("pry",">=0.9.11") - s.add_development_dependency("bacon","~>1.1.0") - s.add_development_dependency('rake', '~> 0.9') - s.homepage = "https://github.com/pry/pry-stack_explorer" - s.files = `git ls-files`.split("\n") - s.test_files = `git ls-files -- test/*`.split("\n") -end - -desc "run pry with plugin enabled" -task :pry do - exec("pry -rubygems -I#{direc}/lib/ -r #{direc}/lib/#{PROJECT_NAME}") -end - -desc "Run example" -task :example do - sh "ruby -rubygems -I#{direc}/lib/ #{direc}/examples/example.rb " +desc "Build the gem" +task :build do + system "gem build #{gem_name}.gemspec" end - -desc "Run example2" -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 " + +desc "Build and push the gem to rubygems.org" +task :release => :build do + system "gem push #{gem_name}-#{gem_version}.gem" end -desc "Show version" -task :version do - puts "PryStackExplorer version: #{PryStackExplorer::VERSION}" +desc "Build and install the gem" +task :install => :build do + system "gem install #{gem_name}-#{gem_version}.gem" end -desc "run tests" task :default => :test -desc "run tests" +desc "Run bacon tests" task :test do sh "bacon -Itest -rubygems -a -q" end -desc "generate gemspec" -task :gemspec => "ruby:gemspec" - -namespace :ruby do - spec = Gem::Specification.new do |s| - apply_spec_defaults(s) - s.platform = Gem::Platform::RUBY - end - - Gem::PackageTask.new(spec) do |pkg| - pkg.need_zip = false - pkg.need_tar = false - end - - desc "Generate gemspec file" - task :gemspec do - File.open("#{spec.name}.gemspec", "w") do |f| - f << spec.to_ruby - end - end -end - -desc "build all platform gems at once" -task :gems => [:clean, :rmgems, :gemspec, "ruby:gem"] - -desc "remove all platform gems" -task :rmgems => ["ruby:clobber_package"] - -desc "reinstall gem" -task :reinstall => :gems do - sh "gem uninstall pry-stack_explorer" rescue nil - sh "gem install -l #{direc}/pkg/#{PROJECT_NAME}-#{PryStackExplorer::VERSION}.gem" -end - -task :install => :reinstall - -desc "build and push latest gems" -task :pushgems => :gems do - chdir("#{File.dirname(__FILE__)}/pkg") do - Dir["*.gem"].each do |gemfile| - sh "gem push #{gemfile}" - end - end +desc "Load this checked out git repo in pry" +task :pry do + system "pry --gem" end -task :pushgem => :pushgems diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..8f0916f --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.5.0 diff --git a/examples/example.rb b/examples/example.rb index b1a8f28..2a595cd 100644 --- a/examples/example.rb +++ b/examples/example.rb @@ -1,9 +1,9 @@ -unless Object.const_defined? :PryStackExplorer +unless Object.const_defined? :PryStack $:.unshift File.expand_path '../../lib', __FILE__ require 'pry' end -require 'pry-stack_explorer' +require 'pry-stack' def alphabet(y) x = 20 diff --git a/examples/example2.rb b/examples/example2.rb index d5f1ae5..a3e41b4 100644 --- a/examples/example2.rb +++ b/examples/example2.rb @@ -1,9 +1,9 @@ -unless Object.const_defined? :PryStackExplorer +unless Object.const_defined? :PryStack $:.unshift File.expand_path '../../lib', __FILE__ require 'pry' end -require 'pry-stack_explorer' +require 'pry-stack' def alpha x = "hello" diff --git a/examples/example3.rb b/examples/example3.rb index 0861794..382559d 100644 --- a/examples/example3.rb +++ b/examples/example3.rb @@ -1,9 +1,9 @@ -unless Object.const_defined? :PryStackExplorer +unless Object.const_defined? :PryStack $:.unshift File.expand_path '../../lib', __FILE__ require 'pry' end -require 'pry-stack_explorer' +require 'pry-stack' def b x = 30 diff --git a/lib/pry-stack_explorer.rb b/lib/pry-stack.rb similarity index 83% rename from lib/pry-stack_explorer.rb rename to lib/pry-stack.rb index bbcc70a..b71eb6a 100755 --- a/lib/pry-stack_explorer.rb +++ b/lib/pry-stack.rb @@ -1,16 +1,12 @@ -# pry-stack_explorer.rb +# pry-stack.rb # (C) John Mair (banisterfiend); MIT license -require "pry-stack_explorer/version" -require "pry-stack_explorer/commands" -require "pry-stack_explorer/frame_manager" -require "pry-stack_explorer/when_started_hook" +require "pry-stack/commands" +require "pry-stack/frame_manager" +require "pry-stack/when_started_hook" require "binding_of_caller" -module PryStackExplorer - - # short-hand for `PryStackExplorer` - ::SE = self +module PryStack class << self # @return [Hash] The hash storing all frames for all Pry instances for @@ -40,7 +36,7 @@ def create_and_push_frame_manager(bindings, _pry_, options={}) # Update the Pry instance to operate on the specified frame for the # current frame manager. - # @param [PryStackExplorer::FrameManager] fm The active frame manager. + # @param [PryStack::FrameManager] fm The active frame manager. # @param [Hash] options The options hash. def push_helper(fm, options={}) options = { @@ -96,7 +92,7 @@ def clear_frame_managers(_pry_) alias_method :delete_frame_managers, :clear_frame_managers - # @return [PryStackExplorer::FrameManager] The currently active frame manager + # @return [PryStack::FrameManager] The currently active frame manager def frame_manager(_pry_) frame_hash[_pry_].last end @@ -115,20 +111,20 @@ def bindings_equal?(b1, b2) end Pry.config.hooks.add_hook(:after_session, :delete_frame_manager) do |_, _, _pry_| - PryStackExplorer.clear_frame_managers(_pry_) + PryStack.clear_frame_managers(_pry_) end -Pry.config.hooks.add_hook(:when_started, :save_caller_bindings, PryStackExplorer::WhenStartedHook.new) +Pry.config.hooks.add_hook(:when_started, :save_caller_bindings, PryStack::WhenStartedHook.new) -# Import the StackExplorer commands -Pry.config.commands.import PryStackExplorer::Commands +# Import the Stack commands +Pry.config.commands.import PryStack::Commands # monkey-patch the whereami command to show some frame information, # useful for navigating stack. Pry.config.commands.before_command("whereami") do |num| - if PryStackExplorer.frame_manager(_pry_) && !internal_binding?(target) - bindings = PryStackExplorer.frame_manager(_pry_).bindings - binding_index = PryStackExplorer.frame_manager(_pry_).binding_index + if PryStack.frame_manager(_pry_) && !internal_binding?(target) + bindings = PryStack.frame_manager(_pry_).bindings + binding_index = PryStack.frame_manager(_pry_).binding_index output.puts "\n" output.puts "#{Pry::Helpers::Text.bold('Frame number:')} #{binding_index}/#{bindings.size - 1}" diff --git a/lib/pry-stack_explorer/commands.rb b/lib/pry-stack/commands.rb similarity index 96% rename from lib/pry-stack_explorer/commands.rb rename to lib/pry-stack/commands.rb index 897e80d..f8a886b 100644 --- a/lib/pry-stack_explorer/commands.rb +++ b/lib/pry-stack/commands.rb @@ -1,17 +1,17 @@ -module PryStackExplorer +module PryStack module FrameHelpers private - # @return [PryStackExplorer::FrameManager] The active frame manager for + # @return [PryStack::FrameManager] The active frame manager for # the current `Pry` instance. def frame_manager - PryStackExplorer.frame_manager(_pry_) + PryStack.frame_manager(_pry_) end - # @return [Array] All the frame + # @return [Array] All the frame # managers for the current `Pry` instance. def frame_managers - PryStackExplorer.frame_managers(_pry_) + PryStack.frame_managers(_pry_) end # @return [Boolean] Whether there is a context to return to once @@ -231,11 +231,11 @@ def process end end - create_command "show-stack", "Show all frames" do + create_command "stack", "Show all frames" do include FrameHelpers banner <<-BANNER - Usage: show-stack [OPTIONS] + Usage: stack [OPTIONS] Show all accessible stack frames. e.g: show-stack -v BANNER @@ -295,7 +295,7 @@ def process content << "\n#{text.bold("Showing all accessible frames in stack (#{frame_manager.bindings.size} in total):")}\n--\n" base_frame_index, frames = selected_stack_frames - frames.each_with_index do |b, index| + frames.each_with_index.to_a.reverse.each do |b, index| i = index + base_frame_index if i == frame_manager.binding_index content << "=> ##{i} #{memoized_info(i, b, opts[:v])}\n" @@ -309,5 +309,8 @@ def process end end + + alias_command "show-stack", "stack" + end end diff --git a/lib/pry-stack_explorer/frame_manager.rb b/lib/pry-stack/frame_manager.rb similarity index 99% rename from lib/pry-stack_explorer/frame_manager.rb rename to lib/pry-stack/frame_manager.rb index 0974a11..216e5e8 100644 --- a/lib/pry-stack_explorer/frame_manager.rb +++ b/lib/pry-stack/frame_manager.rb @@ -1,4 +1,4 @@ -module PryStackExplorer +module PryStack # This class represents a call-stack. It stores the # frames that make up the stack and is responsible for updating the diff --git a/lib/pry-stack_explorer/when_started_hook.rb b/lib/pry-stack/when_started_hook.rb similarity index 91% rename from lib/pry-stack_explorer/when_started_hook.rb rename to lib/pry-stack/when_started_hook.rb index 0256e2c..65bd4c9 100644 --- a/lib/pry-stack_explorer/when_started_hook.rb +++ b/lib/pry-stack/when_started_hook.rb @@ -1,4 +1,4 @@ -module PryStackExplorer +module PryStack class WhenStartedHook include Pry::Helpers::BaseHelpers @@ -12,7 +12,7 @@ def caller_bindings(target) # Use the binding returned by #of_caller if possible (as we get # access to frame_type). # Otherwise stick to the given binding (target). - if !PryStackExplorer.bindings_equal?(target, bindings.first) + if !PryStack.bindings_equal?(target, bindings.first) bindings.shift bindings.unshift(target) end @@ -21,6 +21,7 @@ def caller_bindings(target) end def call(target, options, _pry_) + target ||= _pry_.binding_stack.first if _pry_ options = { :call_stack => true, :initial_frame => 0 @@ -38,7 +39,7 @@ def call(target, options, _pry_) bindings = caller_bindings(target) end - PryStackExplorer.create_and_push_frame_manager bindings, _pry_, :initial_frame => options[:initial_frame] + PryStack.create_and_push_frame_manager bindings, _pry_, :initial_frame => options[:initial_frame] end private diff --git a/lib/pry-stack_explorer/version.rb b/lib/pry-stack_explorer/version.rb deleted file mode 100755 index d9e1da5..0000000 --- a/lib/pry-stack_explorer/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module PryStackExplorer - VERSION = "0.4.9.1" -end diff --git a/pry-stack.gemspec b/pry-stack.gemspec new file mode 100644 index 0000000..bf6c262 --- /dev/null +++ b/pry-stack.gemspec @@ -0,0 +1,26 @@ +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = "pry-stack" + s.version = File.read("VERSION").strip + s.date = File.mtime("VERSION").strftime("%Y-%m-%d") + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + + s.authors = ["John Mair (banisterfiend)", "Chris Gahan (epitron)"] + s.email = ["jrmair@gmail.com", "chris@ill-logic.com"] + s.description = "Walk the stack in Pry, with STYLE." + s.summary = "Tired of your 'up' and 'down' commands going in the wrong direction? Longing for a shorter command to show the stack? Are your fingers raw from typing overly long gem names and unnecessary underscores? Then pry-stack is for you!" + s.homepage = "https://github.com/epitron/pry-stack" + s.licenses = ["MIT"] + + s.files = `git ls-files -z`.split("\0") + s.test_files = `git ls-files -z -- test/*`.split("\0") + s.extra_rdoc_files = ["README.md", "CHANGELOG"] + s.require_paths = ["lib"] + + s.add_dependency("binding_of_caller", "~> 0.7") + s.add_dependency("pry", ["~> 0.9", ">= 0.9.11"]) + s.add_development_dependency("bacon", "~> 1.1") + s.add_development_dependency("rake", "~> 0.9") +end diff --git a/pry-stack_explorer.gemspec b/pry-stack_explorer.gemspec deleted file mode 100644 index 88b4f2f..0000000 --- a/pry-stack_explorer.gemspec +++ /dev/null @@ -1,39 +0,0 @@ -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = "pry-stack_explorer" - s.version = "0.4.9.1" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["John Mair (banisterfiend)"] - s.date = "2013-08-03" - s.description = "Walk the stack in a Pry session" - s.email = "jrmair@gmail.com" - s.files = [".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "Gemfile", "LICENSE", "README.md", "Rakefile", "examples/example.rb", "examples/example2.rb", "examples/example3.rb", "lib/pry-stack_explorer.rb", "lib/pry-stack_explorer/commands.rb", "lib/pry-stack_explorer/frame_manager.rb", "lib/pry-stack_explorer/version.rb", "lib/pry-stack_explorer/when_started_hook.rb", "pry-stack_explorer.gemspec", "test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack_explorer.rb", "tester.rb"] - s.homepage = "https://github.com/pry/pry-stack_explorer" - s.require_paths = ["lib"] - s.rubygems_version = "2.0.3" - s.summary = "Walk the stack in a Pry session" - s.test_files = ["test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack_explorer.rb"] - - if s.respond_to? :specification_version then - s.specification_version = 4 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, [">= 0.7"]) - s.add_runtime_dependency(%q, [">= 0.9.11"]) - s.add_development_dependency(%q, ["~> 1.1.0"]) - s.add_development_dependency(%q, ["~> 0.9"]) - else - s.add_dependency(%q, [">= 0.7"]) - s.add_dependency(%q, [">= 0.9.11"]) - s.add_dependency(%q, ["~> 1.1.0"]) - s.add_dependency(%q, ["~> 0.9"]) - end - else - s.add_dependency(%q, [">= 0.7"]) - s.add_dependency(%q, [">= 0.9.11"]) - s.add_dependency(%q, ["~> 1.1.0"]) - s.add_dependency(%q, ["~> 0.9"]) - end -end diff --git a/test/helper.rb b/test/helper.rb index 12e43b7..286c2a2 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,17 +2,22 @@ require 'ostruct' require 'pry' -unless Object.const_defined? 'PryStackExplorer' +PRY_STACK_VERSION = File.read(File.expand_path '../../VERSION', __FILE__) + +unless Object.const_defined? 'PryStack' $:.unshift File.expand_path '../../lib', __FILE__ - require 'pry-stack_explorer' + require 'pry-stack' end require 'bacon' -puts "Testing pry-stack_explorer version #{PryStackExplorer::VERSION}..." +puts "---------------------------------------------------------" +puts "Testing" +puts "---------------------------------------------------------" +puts "pry-stack version: #{PRY_STACK_VERSION}" puts "Ruby version: #{RUBY_VERSION}" -PE = PryStackExplorer +PE = PryStack class << Pry alias_method :orig_reset_defaults, :reset_defaults diff --git a/test/test_commands.rb b/test/test_commands.rb index c8c0561..30c34ac 100644 --- a/test/test_commands.rb +++ b/test/test_commands.rb @@ -34,7 +34,7 @@ def bang end -describe PryStackExplorer::Commands do +describe PryStack::Commands do before do Pry.config.hooks.add_hook(:when_started, :save_caller_bindings, WhenStartedHook) @@ -346,7 +346,7 @@ def o.gamma() binding end call_stack = [o.alpha, o.beta, o.gamma] (1..3).each_with_index do |v, idx| redirect_pry_io(InputTester.new("frame -#{v}", - "@frame_number = PryStackExplorer.frame_manager(_pry_).binding_index", + "@frame_number = PryStack.frame_manager(_pry_).binding_index", "exit-all"), out=StringIO.new) do Pry.start(o, :call_stack => call_stack) end diff --git a/test/test_frame_manager.rb b/test/test_frame_manager.rb index b3aa980..087d6cc 100644 --- a/test/test_frame_manager.rb +++ b/test/test_frame_manager.rb @@ -2,7 +2,7 @@ Pry.config.output = StringIO.new -describe PryStackExplorer::FrameManager do +describe PryStack::FrameManager do before do @pry_instance = Pry.new diff --git a/test/test_stack_explorer.rb b/test/test_stack.rb similarity index 95% rename from test/test_stack_explorer.rb rename to test/test_stack.rb index e276953..c67c067 100644 --- a/test/test_stack_explorer.rb +++ b/test/test_stack.rb @@ -1,6 +1,6 @@ require 'helper' -describe PryStackExplorer do +describe PryStack do describe "Pry.start" do before do @@ -152,7 +152,7 @@ def o.gamma() binding end end end - describe "unit tests for PryStackExplorer class methods" do + describe "unit tests for PryStack class methods" do before do @pry_instance = Pry.new @bindings = [binding, binding] @@ -162,7 +162,7 @@ def o.gamma() binding end PE.clear_frame_managers(@pry_instance) end - describe "PryStackExplorer.create_and_push_frame_manager" do + describe "PryStack.create_and_push_frame_manager" do it "should create and push one new FrameManager" do PE.create_and_push_frame_manager(@bindings, @pry_instance) @@ -179,8 +179,8 @@ def o.gamma() binding end it 'should save prior binding in FrameManager instance' do _pry_ = Pry.new _pry_.binding_stack.push(b=binding) - PryStackExplorer.create_and_push_frame_manager(@bindings, _pry_) - PryStackExplorer.frame_manager(_pry_).prior_binding.should == b + PryStack.create_and_push_frame_manager(@bindings, _pry_) + PryStack.frame_manager(_pry_).prior_binding.should == b end describe ":initial_frame option" do @@ -208,8 +208,8 @@ def o.gamma() binding end it 'should save prior backtrace in FrameManager instance' do _pry_ = Pry.new _pry_.backtrace = ["my backtrace"] - PryStackExplorer.create_and_push_frame_manager(@bindings, _pry_) - PryStackExplorer.frame_manager(_pry_).prior_backtrace.should == _pry_.backtrace + PryStack.create_and_push_frame_manager(@bindings, _pry_) + PryStack.frame_manager(_pry_).prior_backtrace.should == _pry_.backtrace end it "should create and push multiple FrameManagers" do @@ -228,7 +228,7 @@ def o.gamma() binding end end end - describe "PryStackExplorer.frame_manager" do + describe "PryStack.frame_manager" do it "should have the correct bindings" do PE.create_and_push_frame_manager(@bindings, @pry_instance) PE.frame_manager(@pry_instance).bindings.should == @bindings @@ -251,7 +251,7 @@ def o.gamma() binding end end end - describe "PryStackExplorer.pop_frame_manager" do + describe "PryStack.pop_frame_manager" do it "should remove FrameManager from stack" do PE.create_and_push_frame_manager(@bindings, @pry_instance) PE.create_and_push_frame_manager(@bindings, @pry_instance) @@ -349,7 +349,7 @@ def o.gamma() binding end end end - describe "PryStackExplorer.clear_frame_managers" do + describe "PryStack.clear_frame_managers" do it "should clear all FrameManagers for a Pry instance" do PE.create_and_push_frame_manager(@bindings, @pry_instance) PE.create_and_push_frame_manager(@bindings, @pry_instance)