Sha256: 96eaa0ba33ca8c2abcbbd546a4b3fec0dd7d3465c016e93b5f7fe648e49f5c4f
Contents?: true
Size: 746 Bytes
Versions: 7
Compression:
Stored size: 746 Bytes
Contents
namespace :praxis do desc "Run interactive pry/irb console" task :console do have_pry = false begin # Use pry if available; require pry _before_ environment to maximize # debuggability. require 'pry' have_pry = true rescue LoadError # Fall back on irb require 'irb' require 'irb/ext/multi-irb' end Rake::Task['praxis:environment'].invoke if have_pry Praxis::Application.instance.pry else # Use some special initialization magic to ensure that 'self' in the # IRB session refers to Praxis::Application.instance. IRB.setup nil IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context IRB.irb(nil, Praxis::Application.instance) end end end
Version data entries
7 entries across 7 versions & 1 rubygems