Created
January 4, 2010 15:38
-
-
Save akitaonrails/268597 to your computer and use it in GitHub Desktop.
super powered IRB. requires my hirb, bond, akitaonrails-utility_belt gems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
IRB.conf[:AUTO_INDENT] = false | |
IRB.conf[:USE_READLINE] = true | |
class Object | |
# easy way to list an object's methods without clutter | |
def local_methods | |
(methods - Object.instance_methods).sort | |
end | |
end | |
begin | |
require 'bond' | |
require 'bond/completion' | |
IRB.conf[:LOAD_MODULES] = [] unless IRB.conf.key?(:LOAD_MODULES) | |
unless IRB.conf[:LOAD_MODULES].include?('irb/completion') | |
IRB.conf[:LOAD_MODULES] << 'irb/completion' | |
end | |
rescue => e | |
puts "Error Loading Bond: #{e}" | |
end | |
begin | |
gem "akitaonrails-utility_belt" | |
require 'utility_belt' | |
UtilityBelt.equip(:command_history) | |
UtilityBelt.equip(:hash_math) | |
UtilityBelt.equip(:clipboard) | |
UtilityBelt.equip(:interactive_editor) | |
UtilityBelt.equip(:irb_options) | |
UtilityBelt.equip(:print_methods) | |
UtilityBelt.equip(:wirble) | |
UtilityBelt.equip(:with) | |
UtilityBelt::Themes.background(:light) | |
Wirble.init | |
Wirble.colorize | |
rescue => e | |
puts "Error loading Utility Belt: #{e}" | |
end | |
begin | |
require 'hirb' | |
self.send(:extend, Hirb::Console) | |
Hirb.enable | |
rescue => e | |
puts "Error Loading Hirb: #{e}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment