Advertisement
umuro

pryrc

May 27th, 2015
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.60 KB | None | 0 0
  1. if defined?(Rails) && Rails.env
  2.   if defined?(Rails::ConsoleMethods)
  3.     include Rails::ConsoleMethods
  4.   else
  5.     def reload!(print=true)
  6.       puts "Reloading..." if print
  7.       ActionDispatch::Reloader.cleanup!
  8.       ActionDispatch::Reloader.prepare!
  9.       true
  10.     end
  11.   end
  12. end
  13.  
  14. Pry.config.editor = proc { |file, line| "kate -l#{line} #{file}" }
  15.  
  16. if defined?(PryByebug)
  17.   Pry.commands.alias_command 'c', 'continue'
  18.   Pry.commands.alias_command 's', 'step'
  19.   Pry.commands.alias_command 'n', 'next'
  20.   Pry.commands.alias_command 'f', 'finish'
  21. end
  22.  
  23. require "awesome_print"
  24. AwesomePrint.pry!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement