public
Description: my configuration files
Homepage:
Clone URL: git://github.com/fnando/dotfiles.git
dotfiles / irbrc
100644 35 lines (29 sloc) 0.738 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
gems = %w(rubygems irb/completion irb/ext/save-history pp wirble hirb ruby-debug)
 
gems.each do |gem_name|
  begin
    require gem_name
  rescue LoadError
    STDOUT << "Cannot load #{gem_name.inspect}\n"
  end
end
 
if defined?(IRB)
  IRB.conf[:SAVE_HISTORY] = 100
  IRB.conf[:HISTORY_FILE] = "#{ENV["HOME"]}/.irb_history"
  IRB.conf[:PROMPT_MODE] = :SIMPLE
  IRB.conf[:AUTO_INDENT] = true
  IRB.conf[:EVAL_HISTORY] = 100
  IRB.conf[:USE_READLINE] = false
end
 
if defined?(Wirble)
  Wirble.init
  Wirble.colorize
end
 
if defined?(Hirb)
  Hirb.enable
  extend Hirb::Console
end
 
# Log to STDOUT if in Rails
if ENV.include?("RAILS_ENV") && !defined?(RAILS_DEFAULT_LOGGER)
 require "logger"
 RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end