From f023072d4f7c4493041bc1d33f5766b114cdb2ee Mon Sep 17 00:00:00 2001 From: Josh Hagins Date: Mon, 4 Jan 2016 15:51:32 -0500 Subject: [PATCH] Use pry in rake console task pry is a *much* better REPL than irb, with much nicer formatting and debugging tools to boot! --- Rakefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 2633828110..8160443eb1 100644 --- a/Rakefile +++ b/Rakefile @@ -3,6 +3,8 @@ require 'rake/testtask' require 'rspec/core/rake_task' require 'rubocop/rake_task' +$LOAD_PATH.unshift(File.expand_path('../lib', __FILE__)) + Coveralls::RakeTask.new Rake::TestTask.new do |t| @@ -21,6 +23,12 @@ end task :test => [:minitest, :spec, 'coveralls:push'] task :default => [:test, :rubocop] +desc 'Open a REPL for debugging and experimentation' task :console do - sh 'irb -Ilib -rvendor/homebrew-fork/global -rhbc' + require 'pry' + require 'pry-byebug' + require 'vendor/homebrew-fork/global' + require 'hbc' + ARGV.clear + Hbc.pry end