This file contains 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 'irb/completion' | |
require 'irb/ext/save-history' | |
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] | |
IRB.conf[:SAVE_HISTORY] = 100 | |
if ENV['RAILS_ENV'] | |
rr = IRB.conf[:LOAD_MODULES].detect{|x| x =~ /environment$/}.gsub(/config\/environment$/, '') | |
IRB.conf[:HISTORY_FILE] = File.join(rr, '.irb_history') | |
else | |
IRB.conf[:HISTORY_FILE] = File.join(ENV['HOME'], '.irb_history') |
This file contains 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
// TODO | |
// show spinner on loading | |
// | |
// element.identify() is a prototype function -- remove it so | |
// there are less methods to overwrite when switching backend | |
// also: addClassName / RemoveClassName | |
// | |
// clean up the namespace -- instead of long function names in the window | |
// have descriptive names in their own class | |
// |
This file contains 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 'yaml' | |
def spit_context context, level=0 | |
spaces = " " * level | |
puts "#{spaces}context '#{context[0]}' do" | |
puts "#{spaces} setup do\n#{spaces} end\n\n" | |
spit_specs(context[1], level) | |
puts "#{spaces}end\n\n" | |
end |
NewerOlder