Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.79 KB  |  hits: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Pry.config.editor = "gvim --remote-silent"
  2.  
  3. Pry.hooks.add_hook(:after_session, :say_bye) do
  4.   puts "fuck off Gnida"
  5. end
  6.  
  7. Pry.prompt = [Proc.new{ |obj, nest_level| "#{RUBY_VERSION}-#{RUBY_PATCHLEVEL} (#{obj}):#{nest_level} > " },
  8.               Proc.new{ |obj, nest_level| "#{RUBY_VERSION} (#{obj}):#{nest_level} * " } ]
  9.  
  10.  
  11. cmd_aliases = {
  12.   'continue'  => 'c',
  13.   'step'      => 's',
  14.   'next'      => 'n'
  15. }
  16. cmd_aliases.each do |_cmd, _alias|
  17.   Pry.commands.alias_command _alias, _cmd if Pry.commands[_cmd]
  18. end
  19.  
  20. %w(hirb).each { |gem| require gem }
  21.  
  22. Hirb.enable
  23.  
  24. Pry.config.print = Proc.new do |output, value|
  25.   Hirb::View.view_or_page_output(value) || Pry::DEFAULT_PRINT.call(output, value)
  26. end
  27.  
  28. # fix for NoMethodError: undefined method `reload!' for main:Object
  29. include Rails::ConsoleMethods if defined? Rails