-
Notifications
You must be signed in to change notification settings - Fork 0
/
.irbrc
53 lines (37 loc) · 1 KB
/
.irbrc
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env ruby
require 'irb/completion'
require 'irb/ext/save-history'
IRB.conf[:PROMPT_MODE] = :SIMPLE
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
# Break out of the Bundler jail
# from https://github.com/ConradIrwin/pry-debundle/blob/master/lib/pry-debundle.rb
if defined? Bundler
Gem.post_reset_hooks.reject! { |hook| hook.source_location.first =~ %r{/bundler/} }
Gem::Specification.reset
load 'rubygems/custom_require.rb'
end
if defined? Rails
begin
require 'hirb'
Hirb.enable({:width => 155, :height => 500})
puts "Enabled Hirb, to disable use Hirb.disable in the console"
rescue LoadError
puts "Yo, you forgot to install the hirb gem: '$ gem install hirb'"
end
end
if defined? Current
begin
Current.account = 1
puts "About to create contact_with_email"
puts "Current account is set to #{Current.account}"
rescue Exception => e
puts e.message
end
end
def y(obj)
puts obj.to_yaml
end
def reload
reload!
end