From 2cc781e6a9b90ff215db3407d145bc70637d5ae5 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sun, 24 Jul 2016 03:34:59 +0200 Subject: [PATCH] Make Ransack's `rake console` great again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - make it work again 🍾 - and have it load the Ransack test data 🍰 Please let me know if this can be improved :) TODO: same thing for `rake mongoid_console`. --- Rakefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 215d944..b82afb1 100644 --- a/Rakefile +++ b/Rakefile @@ -26,11 +26,12 @@ end desc "Open an irb session with Ransack and the sample data used in specs" task :console do - require 'irb' - require 'irb/completion' - require 'console' + require 'rspec' + require File.expand_path('../spec/spec_helper.rb', __FILE__) + require File.expand_path('../spec/console.rb', __FILE__) + require File.expand_path('../spec/support/schema.rb', __FILE__) ARGV.clear - IRB.start + Pry.start end desc "Open an irb session with Ransack, Mongoid and the sample data used in specs"