From c3f893709ddbb9e9de15ee3322eb10509e8560b8 Mon Sep 17 00:00:00 2001 From: epitron Date: Sun, 26 Aug 2012 13:28:12 -0400 Subject: [PATCH 01/17] Slight improvements: * For conceptual coherence, show-stack was flipped, so that 'up' actually goes up and 'down' actually goes down. * 'show-stack' command was renamed to 'stack', and 'show-stack' is now an alias to 'stack' (for backwards compatability) --- lib/pry-stack_explorer/commands.rb | 9 ++++++--- pry-stack_explorer.gemspec | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/pry-stack_explorer/commands.rb b/lib/pry-stack_explorer/commands.rb index de3cf6b..6e8e9e3 100644 --- a/lib/pry-stack_explorer/commands.rb +++ b/lib/pry-stack_explorer/commands.rb @@ -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/pry-stack_explorer.gemspec b/pry-stack_explorer.gemspec index 6678ac2..ad4a10c 100644 --- a/pry-stack_explorer.gemspec +++ b/pry-stack_explorer.gemspec @@ -6,13 +6,13 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["John Mair (banisterfiend)"] - s.date = "2012-07-13" + s.date = "2012-08-26" 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/banister" s.require_paths = ["lib"] - s.rubygems_version = "1.8.24" + s.rubygems_version = "1.8.23" 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"] From b3e4a2a3a7b2f1fa534da912dd8b839c3247132a Mon Sep 17 00:00:00 2001 From: Jordan Anderson Date: Fri, 3 Oct 2014 18:03:48 -0400 Subject: [PATCH 02/17] Get rid of this SE global constant --- lib/pry-stack_explorer.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/pry-stack_explorer.rb b/lib/pry-stack_explorer.rb index bbcc70a..5b097b6 100755 --- a/lib/pry-stack_explorer.rb +++ b/lib/pry-stack_explorer.rb @@ -9,9 +9,6 @@ module PryStackExplorer - # short-hand for `PryStackExplorer` - ::SE = self - class << self # @return [Hash] The hash storing all frames for all Pry instances for # the current thread. From b7cef0ae97a3d84ad25d8e14459f1f3d1d8ca4f7 Mon Sep 17 00:00:00 2001 From: epitron Date: Sat, 8 Nov 2014 01:00:30 -0500 Subject: [PATCH 03/17] Changed gem name --- pry-stack_explorer.gemspec => pry-stack.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename pry-stack_explorer.gemspec => pry-stack.gemspec (98%) diff --git a/pry-stack_explorer.gemspec b/pry-stack.gemspec similarity index 98% rename from pry-stack_explorer.gemspec rename to pry-stack.gemspec index ad4a10c..7781be6 100644 --- a/pry-stack_explorer.gemspec +++ b/pry-stack.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| - s.name = "pry-stack_explorer" + s.name = "pry-stack" s.version = "0.4.5" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= From 44c59589adfae0d2c33c8476233fa0d60059cf9c Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 10:10:23 -0800 Subject: [PATCH 04/17] s/(_e|E)xplorer//g --- README.md | 29 ++++++++-------- Rakefile | 12 +++---- examples/example.rb | 4 +-- examples/example2.rb | 4 +-- examples/example3.rb | 4 +-- lib/{pry-stack_explorer.rb => pry-stack.rb} | 34 +++++++++---------- .../commands.rb | 10 +++--- .../frame_manager.rb | 2 +- lib/pry-stack/version.rb | 3 ++ .../when_started_hook.rb | 6 ++-- lib/pry-stack_explorer/version.rb | 3 -- pry-stack.gemspec | 10 +++--- test/helper.rb | 8 ++--- test/test_commands.rb | 4 +-- test/test_frame_manager.rb | 2 +- .../{test_stack_explorer.rb => test_stack.rb} | 20 +++++------ 16 files changed, 78 insertions(+), 77 deletions(-) rename lib/{pry-stack_explorer.rb => pry-stack.rb} (83%) rename lib/{pry-stack_explorer => pry-stack}/commands.rb (97%) rename lib/{pry-stack_explorer => pry-stack}/frame_manager.rb (99%) create mode 100755 lib/pry-stack/version.rb rename lib/{pry-stack_explorer => pry-stack}/when_started_hook.rb (92%) delete mode 100755 lib/pry-stack_explorer/version.rb rename test/{test_stack_explorer.rb => test_stack.rb} (95%) diff --git a/README.md b/README.md index 313184e..5401ae6 100755 --- a/README.md +++ b/README.md @@ -1,21 +1,21 @@ -pry-stack_explorer +pry-stack =========== (C) John Mair (banisterfiend) 2011 _Walk the stack in a Pry session_ -pry-stack_explorer is a plugin for the [Pry](http://pry.github.com) +pry-stack is a plugin for the [Pry](http://pry.github.com) REPL that enables the user to navigate the call-stack. 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 +Unlike `ruby-debug`, pry-stack 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 +pry-stack 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. @@ -24,12 +24,12 @@ 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. +After installing `pry-stack`, just start Pry as normal (typically via a `binding.pry`), the stack 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. +* Install the [gem](https://rubygems.org/gems/pry-stack): `gem install pry-stack` +* Read the [documentation](http://rdoc.info/github/epitron/pry-stack/master/file/README.md) +* See the [source code](http://github.com/epitron/pry-stack) +* See the [wiki](https://github.com/epitron/pry-stack/wiki) for in-depth usage information. Example: Moving around between frames -------- @@ -52,10 +52,10 @@ Showing all accessible frames in stack: Frame number: 3/7 Frame type: method -From: /Users/john/ruby/projects/pry-stack_explorer/examples/example.rb @ line 10 in Object#alphabet: +From: /Users/john/ruby/projects/pry-stack/examples/example.rb @ line 10 in Object#alphabet: 5: - 6: require 'pry-stack_explorer' + 6: require 'pry-stack' 7: 8: def alphabet(y) 9: x = 20 @@ -76,7 +76,7 @@ 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: +From: /Users/john/ruby/projects/pry-stack/examples/example2.rb @ line 15 in Object#beta: 10: beta 11: puts x @@ -100,7 +100,7 @@ Showing all accessible frames in stack: Frame number: 1/3 Frame type: method -From: /Users/john/ruby/projects/pry-stack_explorer/examples/example2.rb @ line 10 in Object#alpha: +From: /Users/john/ruby/projects/pry-stack/examples/example2.rb @ line 10 in Object#alpha: 5: 6: @@ -131,7 +131,7 @@ Limitations Contact ------- -Problems or questions contact me at [github](http://github.com/banister) +Problems or questions contact me at [github](http://github.com/epitron) License @@ -139,6 +139,7 @@ License (The MIT License) +Copyright (c) 2014 Chris Gahan (epitron) Copyright (c) 2011 John Mair (banisterfiend) Permission is hereby granted, free of charge, to any person obtaining diff --git a/Rakefile b/Rakefile index f036e06..b621538 100755 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,7 @@ $:.unshift 'lib' dlext = RbConfig::CONFIG['DLEXT'] direc = File.dirname(__FILE__) -PROJECT_NAME = "pry-stack_explorer" +PROJECT_NAME = "pry-stack" require 'rake/clean' require 'rubygems/package_task' @@ -16,7 +16,7 @@ CLEAN.include("**/*#*", "**/*#*.*", "**/*_flymake*.*", "**/*_flymake", def apply_spec_defaults(s) s.name = PROJECT_NAME s.summary = "Walk the stack in a Pry session" - s.version = PryStackExplorer::VERSION + s.version = PryStack::VERSION s.date = Time.now.strftime '%Y-%m-%d' s.author = "John Mair (banisterfiend)" s.email = 'jrmair@gmail.com' @@ -26,7 +26,7 @@ def apply_spec_defaults(s) 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.homepage = "https://github.com/epitron/pry-stack" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- test/*`.split("\n") end @@ -53,7 +53,7 @@ end desc "Show version" task :version do - puts "PryStackExplorer version: #{PryStackExplorer::VERSION}" + puts "PryStack version: #{PryStack::VERSION}" end desc "run tests" @@ -94,8 +94,8 @@ 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" + sh "gem uninstall pry-stack" rescue nil + sh "gem install -l #{direc}/pkg/#{PROJECT_NAME}-#{PryStack::VERSION}.gem" end task :install => :reinstall 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..7691f28 100755 --- a/lib/pry-stack_explorer.rb +++ b/lib/pry-stack.rb @@ -1,16 +1,16 @@ -# 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/version" +require "pry-stack/commands" +require "pry-stack/frame_manager" +require "pry-stack/when_started_hook" require "binding_of_caller" -module PryStackExplorer +module PryStack - # short-hand for `PryStackExplorer` - ::SE = self + # short-hand for `PryStack` + ::S = self class << self # @return [Hash] The hash storing all frames for all Pry instances for @@ -40,7 +40,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 +96,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 +115,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 97% rename from lib/pry-stack_explorer/commands.rb rename to lib/pry-stack/commands.rb index eeb1f27..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 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/version.rb b/lib/pry-stack/version.rb new file mode 100755 index 0000000..84c723e --- /dev/null +++ b/lib/pry-stack/version.rb @@ -0,0 +1,3 @@ +module PryStack + VERSION = "0.4.9.1" +end diff --git a/lib/pry-stack_explorer/when_started_hook.rb b/lib/pry-stack/when_started_hook.rb similarity index 92% rename from lib/pry-stack_explorer/when_started_hook.rb rename to lib/pry-stack/when_started_hook.rb index 0256e2c..a1741fb 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 @@ -38,7 +38,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 index c090f72..df8d8cd 100644 --- a/pry-stack.gemspec +++ b/pry-stack.gemspec @@ -5,16 +5,16 @@ Gem::Specification.new do |s| 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.authors = ["Chris Gahan (epitron)"] + s.date = "2014-11-07" 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.email = "chris@ill-logic.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.rb", "lib/pry-stack/commands.rb", "lib/pry-stack/frame_manager.rb", "lib/pry-stack/version.rb", "lib/pry-stack/when_started_hook.rb", "pry-stack.gemspec", "test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack.rb", "tester.rb"] s.homepage = "https://github.com/epitron/pry-stack" 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"] + s.test_files = ["test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack.rb"] if s.respond_to? :specification_version then s.specification_version = 4 diff --git a/test/helper.rb b/test/helper.rb index 12e43b7..3789b8c 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,17 +2,17 @@ require 'ostruct' require 'pry' -unless Object.const_defined? 'PryStackExplorer' +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 "Testing pry-stack version #{PryStack::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) From e44282ddf11291dbbbd80075b64db878388d5014 Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 10:39:33 -0800 Subject: [PATCH 05/17] Fixed NoMethodError: private method`eval' called for nil:NilClass --- lib/pry-stack/when_started_hook.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pry-stack/when_started_hook.rb b/lib/pry-stack/when_started_hook.rb index a1741fb..65bd4c9 100644 --- a/lib/pry-stack/when_started_hook.rb +++ b/lib/pry-stack/when_started_hook.rb @@ -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 From 328285d77305eff15df078c2b9de77ee17832b0a Mon Sep 17 00:00:00 2001 From: epitron Date: Thu, 12 Feb 2015 22:58:53 -0500 Subject: [PATCH 06/17] Updated rhetoric, documentation, and gemspecs --- CHANGELOG | 0 LICENSE | 0 README.md | 142 ++++------------------------------------------ Rakefile | 0 pry-stack.gemspec | 13 +++-- 5 files changed, 18 insertions(+), 137 deletions(-) mode change 100755 => 100644 CHANGELOG mode change 100755 => 100644 LICENSE mode change 100755 => 100644 README.md mode change 100755 => 100644 Rakefile diff --git a/CHANGELOG b/CHANGELOG old mode 100755 new mode 100644 diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 313184e..646394e --- a/README.md +++ b/README.md @@ -1,145 +1,23 @@ -pry-stack_explorer +pry-stack =========== -(C) John Mair (banisterfiend) 2011 +A Pry plugin to navigate the stack. -_Walk the stack in a Pry session_ - -pry-stack_explorer is a plugin for the [Pry](http://pry.github.com) -REPL that enables the user to navigate the call-stack. - -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 -------- - -Problems or questions contact me at [github](http://github.com/banister) +This gem is almost exactly the same as [pry-stack_explorer](http://github.com/pry/pry-stack_explorer), with three exceptions: +* 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 License ------- (The MIT License) -Copyright (c) 2011 John Mair (banisterfiend) +Copyright (c) 2015 Barry Allard ([steakknife](http://github.com/steakknife)) +Copyright (c) 2014 Chris Gahan ([epitron](http://github.com/epitron)) +Copyright (c) 2011 John Mair ([banisterfiend](http://github.com/banisterfiend)) 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 diff --git a/pry-stack.gemspec b/pry-stack.gemspec index c090f72..2c47411 100644 --- a/pry-stack.gemspec +++ b/pry-stack.gemspec @@ -5,15 +5,18 @@ Gem::Specification.new do |s| 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.authors = ["John Mair (banisterfiend)", "Chris Gahan (epitron)"] + s.email = ["jrmair@gmail.com", "chris@ill-logic.com"] + s.date = "2015-02-12" + + 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.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/epitron/pry-stack" 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 From 0c365bcdb3e3663f3a293764bb4bac4798c0a392 Mon Sep 17 00:00:00 2001 From: epitron Date: Thu, 12 Feb 2015 23:04:07 -0500 Subject: [PATCH 07/17] Simplifying the Rakefile and the gemspec --- pry-stack.gemspec => .gemspec | 21 +++--- Rakefile | 116 ++++------------------------------ VERSION | 1 + 3 files changed, 24 insertions(+), 114 deletions(-) rename pry-stack.gemspec => .gemspec (52%) create mode 100644 VERSION diff --git a/pry-stack.gemspec b/.gemspec similarity index 52% rename from pry-stack.gemspec rename to .gemspec index 2c47411..c193335 100644 --- a/pry-stack.gemspec +++ b/.gemspec @@ -1,20 +1,23 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| - s.name = "pry-stack" - s.version = "0.4.9.1" + 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.date = "2015-02-12" + 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.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`.lines.map(&:strip) + s.extra_rdoc_files = %w[README.md CHANGELOG] + s.require_paths = ["lib"] - 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/epitron/pry-stack" - s.require_paths = ["lib"] s.rubygems_version = "2.0.3" s.test_files = ["test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack_explorer.rb"] diff --git a/Rakefile b/Rakefile index f036e06..4bf58b3 100644 --- a/Rakefile +++ b/Rakefile @@ -1,112 +1,18 @@ -$:.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}") +task :build do + system "gem build .gemspec" end - -desc "Run example" -task :example do - sh "ruby -rubygems -I#{direc}/lib/ #{direc}/examples/example.rb " -end - -desc "Run example2" -task :example2 do - sh "ruby -I#{direc}/lib/ #{direc}/examples/example2.rb " + +task :release => :build do + system "gem push #{gem_name}-#{gem_version}.gem" end -desc "Run example3" -task :example3 do - sh "ruby -I#{direc}/lib/ #{direc}/examples/example3.rb " +task :install => :build do + system "gem install #{gem_name}-#{gem_version}.gem" end -desc "Show version" -task :version do - puts "PryStackExplorer version: #{PryStackExplorer::VERSION}" -end - -desc "run tests" -task :default => :test - -desc "run 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 +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 From d8536c332ecb42e8bb205ff82b5508d8525e0e8a Mon Sep 17 00:00:00 2001 From: epitron Date: Thu, 12 Feb 2015 23:11:56 -0500 Subject: [PATCH 08/17] Removed version.rb --- lib/pry-stack/version.rb | 3 --- test/helper.rb | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) delete mode 100755 lib/pry-stack/version.rb diff --git a/lib/pry-stack/version.rb b/lib/pry-stack/version.rb deleted file mode 100755 index 84c723e..0000000 --- a/lib/pry-stack/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module PryStack - VERSION = "0.4.9.1" -end diff --git a/test/helper.rb b/test/helper.rb index 3789b8c..286c2a2 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,6 +2,8 @@ require 'ostruct' require 'pry' +PRY_STACK_VERSION = File.read(File.expand_path '../../VERSION', __FILE__) + unless Object.const_defined? 'PryStack' $:.unshift File.expand_path '../../lib', __FILE__ require 'pry-stack' @@ -9,7 +11,10 @@ require 'bacon' -puts "Testing pry-stack version #{PryStack::VERSION}..." +puts "---------------------------------------------------------" +puts "Testing" +puts "---------------------------------------------------------" +puts "pry-stack version: #{PRY_STACK_VERSION}" puts "Ruby version: #{RUBY_VERSION}" PE = PryStack From 23898286dc47109764e0b6f363441bb497de85ca Mon Sep 17 00:00:00 2001 From: epitron Date: Thu, 12 Feb 2015 23:23:10 -0500 Subject: [PATCH 09/17] Removed a bunch of errors and warnings from the Gemspec, added testing to Rakefile, removed version require --- .gemspec | 28 +++++++--------------------- Rakefile | 12 ++++++++++++ lib/pry-stack.rb | 1 - 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.gemspec b/.gemspec index e0f4c2b..de34085 100644 --- a/.gemspec +++ b/.gemspec @@ -15,30 +15,16 @@ Gem::Specification.new do |s| s.licenses = ["MIT"] s.files = `git ls`.lines.map(&:strip) - s.extra_rdoc_files = %w[README.md CHANGELOG] + s.extra_rdoc_files = ["README.md", "CHANGELOG"] s.require_paths = ["lib"] - s.rubygems_version = "2.0.3" + s.rubygems_version = "2.4.5" s.test_files = ["test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack.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 + s.specification_version = 4 + 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/Rakefile b/Rakefile index 4bf58b3..7af1288 100644 --- a/Rakefile +++ b/Rakefile @@ -1,18 +1,30 @@ gem_version = File.read("VERSION").strip gem_name = "pry-stack" +desc "Build the gem" task :build do system "gem build .gemspec" end +desc "Build and push the gem to rubygems.org" task :release => :build do system "gem push #{gem_name}-#{gem_version}.gem" end +desc "Build and install the gem" task :install => :build do system "gem install #{gem_name}-#{gem_version}.gem" end +task :default => :test + +desc "Run bacon tests" +task :test do + sh "bacon -Itest -rubygems -a -q" +end + +desc "Load this checked out git repo in pry" task :pry do system "pry --gem" end + diff --git a/lib/pry-stack.rb b/lib/pry-stack.rb index 8900791..b71eb6a 100755 --- a/lib/pry-stack.rb +++ b/lib/pry-stack.rb @@ -1,7 +1,6 @@ # pry-stack.rb # (C) John Mair (banisterfiend); MIT license -require "pry-stack/version" require "pry-stack/commands" require "pry-stack/frame_manager" require "pry-stack/when_started_hook" From 3d11fa7788a41e4875074f03c728c3dea31ae164 Mon Sep 17 00:00:00 2001 From: epitron Date: Thu, 12 Feb 2015 23:47:20 -0500 Subject: [PATCH 10/17] Banisterfiend's link fixed --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 646394e..5872f0e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ License Copyright (c) 2015 Barry Allard ([steakknife](http://github.com/steakknife)) Copyright (c) 2014 Chris Gahan ([epitron](http://github.com/epitron)) -Copyright (c) 2011 John Mair ([banisterfiend](http://github.com/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 From 9187628aa20c389ceaab0033d54d860f3bdc00e2 Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 21:14:19 -0800 Subject: [PATCH 11/17] Rename .gemspec to pry-stack.gemspec --- .gemspec => pry-stack.gemspec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .gemspec => pry-stack.gemspec (100%) diff --git a/.gemspec b/pry-stack.gemspec similarity index 100% rename from .gemspec rename to pry-stack.gemspec From 2cb163c60a744791be2773a0e1af45d3f2141c8d Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 21:14:46 -0800 Subject: [PATCH 12/17] Update Rakefile --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 7af1288..6ce7342 100644 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,7 @@ gem_name = "pry-stack" desc "Build the gem" task :build do - system "gem build .gemspec" + system "gem build #{gem_name}.gemspec" end desc "Build and push the gem to rubygems.org" From b8e82c09d973085a5b58a36c287bfe75465ba959 Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 21:25:29 -0800 Subject: [PATCH 13/17] Cleanup gemspec --- pry-stack.gemspec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pry-stack.gemspec b/pry-stack.gemspec index de34085..73cd727 100644 --- a/pry-stack.gemspec +++ b/pry-stack.gemspec @@ -14,15 +14,11 @@ Gem::Specification.new do |s| s.homepage = "https://github.com/epitron/pry-stack" s.licenses = ["MIT"] - s.files = `git ls`.lines.map(&:strip) + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- test/*`.split("\n") s.extra_rdoc_files = ["README.md", "CHANGELOG"] s.require_paths = ["lib"] - s.rubygems_version = "2.4.5" - - s.test_files = ["test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack.rb"] - - s.specification_version = 4 s.add_dependency("binding_of_caller", "~> 0.7") s.add_dependency("pry", ["~> 0.9", ">= 0.9.11"]) s.add_development_dependency("bacon", "~> 1.1") From 8d3737ca49a1b3c9f66ddf4b1cc6742e08f6af61 Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 21:29:42 -0800 Subject: [PATCH 14/17] Update README.md Minor readme markdown stuff --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5872f0e..2bf1fc0 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,12 @@ This gem is almost exactly the same as [pry-stack_explorer](http://github.com/pr License ------- -(The MIT License) +The MIT License Copyright (c) 2015 Barry Allard ([steakknife](http://github.com/steakknife)) + Copyright (c) 2014 Chris Gahan ([epitron](http://github.com/epitron)) + Copyright (c) 2011 John Mair ([banisterfiend](http://github.com/banister)) Permission is hereby granted, free of charge, to any person obtaining From d154043a66a310db94148053502ee29bb780322e Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 21:34:35 -0800 Subject: [PATCH 15/17] Update LICENSE For tasty consistency --- LICENSE | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index acb63c7..bd50b7a 100644 --- 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 From 022705d5f5810d1ef5becbecdd60ab8ec6d370d0 Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Thu, 12 Feb 2015 21:36:52 -0800 Subject: [PATCH 16/17] Update .travis.yml --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: From d6e413d7cedbee7fce6f5745841a831d896e6f11 Mon Sep 17 00:00:00 2001 From: Barry Allard Date: Fri, 13 Feb 2015 05:21:26 -0800 Subject: [PATCH 17/17] Update pry-stack.gemspec --- pry-stack.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pry-stack.gemspec b/pry-stack.gemspec index 73cd727..bf6c262 100644 --- a/pry-stack.gemspec +++ b/pry-stack.gemspec @@ -14,8 +14,8 @@ Gem::Specification.new do |s| s.homepage = "https://github.com/epitron/pry-stack" s.licenses = ["MIT"] - s.files = `git ls-files`.split("\n") - s.test_files = `git ls-files -- test/*`.split("\n") + 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"]