Changeset 1041
- Timestamp:
- 03/31/05 00:36:38 (3 years ago)
- Files:
-
- tools/conductor/script/console (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/conductor/script/console
r1027 r1041 3 3 4 4 require 'optparse' 5 options = { }5 options = { :sandbox => false, :profile => false, :irb => irb } 6 6 OptionParser.new do |opt| 7 7 opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |options[:sandbox]| } 8 opt.on('--profile', 'Profile the session and print results on exit.') { |options[:profile]| } 9 opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { |options[:irb]| } 8 10 opt.parse!(ARGV) 9 11 end … … 11 13 libs = " -r #{File.dirname(__FILE__)}/../config/environment" 12 14 libs << " -r #{File.dirname(__FILE__)}/console_sandbox" if options[:sandbox] 15 libs << " -runprof" if options[:profile] 13 16 libs << " -r irb/completion" 14 17 … … 20 23 puts "Loading #{ENV['RAILS_ENV']} environment." 21 24 end 22 exec "#{ irb} #{libs}"25 exec "#{options[:irb]} #{libs}"