Merged tracks-mu-import branch changes r113:130 into the trunk

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@131 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
nic 2005-08-08 01:54:05 +00:00
parent 2d2f9fcca8
commit 91641500a7
75 changed files with 4054 additions and 1375 deletions

View file

@ -1,16 +1,17 @@
#!/usr/bin/ruby
#!/usr/bin/ruby1.8
irb = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb'
require 'optparse'
options = {}
options = { :sandbox => false, :irb => irb }
OptionParser.new do |opt|
opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |options[:sandbox]| }
opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { |options[:irb]| }
opt.parse!(ARGV)
end
libs = " -r #{File.dirname(__FILE__)}/../config/environment"
libs << " -r #{File.dirname(__FILE__)}/console_sandbox" if options[:sandbox]
libs << " -r irb/completion"
libs = " -r irb/completion"
libs << " -r #{File.dirname(__FILE__)}/../config/environment"
libs << " -r console_sandbox" if options[:sandbox]
ENV['RAILS_ENV'] = ARGV.first || 'development'
if options[:sandbox]
@ -19,4 +20,4 @@ if options[:sandbox]
else
puts "Loading #{ENV['RAILS_ENV']} environment."
end
exec "#{irb} #{libs}"
exec "#{options[:irb]} #{libs} --prompt-mode simple"