1
by Jacques Distler
Checkout of Instiki Trunk 1/21/2007.
1
#!/usr/bin/env ruby
4
options = { :environment => "development" }
7
script_name = File.basename(0ドル)
8
opts.banner = "Usage: runner 'puts Person.find(1).name' [options]"
12
opts.on("-e", "--environment=name", String,
13
"Specifies the environment for the runner to operate under (test/development/production).",
14
"Default: development") { |options[:environment]| }
18
opts.on("-h", "--help",
19
"Show this help message.") { puts opts; exit }
24
ENV["RAILS_ENV"] = options[:environment]
28
require File.dirname(__FILE__) + '/../config/environment'