/instiki/svnpassword

To download this project, use:
bzr branch https://golem.ph.utexas.edu/~distler/code/instiki/svn/
1 by Jacques Distler
Checkout of Instiki Trunk 1/21/2007.
1 
#!/usr/bin/env ruby
2 
irb = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb'
3 
4 
require 'optparse'
5 
options = { :sandbox => false, :irb => irb }
6 
OptionParser.new do |opt|
7 
 opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |options[:sandbox]| }
8 
 opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { |options[:irb]| }
9 
 opt.parse!(ARGV)
10 
end
11 
12 
libs = " -r irb/completion"
13 
libs << " -r #{File.dirname(__FILE__)}/../config/environment"
14 
libs << " -r console_sandbox" if options[:sandbox]
15 
16 
ENV['RAILS_ENV'] = ARGV.first || 'development'
17 
if options[:sandbox]
18 
 puts "Loading #{ENV['RAILS_ENV']} environment in sandbox."
19 
 puts "Any modifications you make will be rolled back on exit."
20 
else
21 
 puts "Loading #{ENV['RAILS_ENV']} environment."
22 
end
23 
exec "#{options[:irb]} #{libs} --prompt-mode simple"

AltStyle によって変換されたページ (->オリジナル) /