Sha256: 68193e53dc52f978744973da2d854ea984f906d0bace218eb209a025935b2b92
Contents?: true
Size: 687 Bytes
Versions: 4
Compression:
Stored size: 687 Bytes
Contents
require 'optparse' options = { :environment => "development" } ARGV.options do |opts| script_name = File.basename($0) opts.banner = "Usage: runner 'puts Person.find(1).name' [options]" opts.separator "" opts.on("-e", "--environment=name", String, "Specifies the environment for the runner to operate under (test/development/production).", "Default: development") { |options[:environment]| } opts.separator "" opts.on("-h", "--help", "Show this help message.") { puts opts; exit } opts.parse! end ENV["RAILS_ENV"] = options[:environment] #!/usr/local/bin/ruby require File.dirname(__FILE__) + '/../config/environment' eval(ARGV.first)
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
rails-0.13.1 | bin/runner |
rails-0.13.0 | bin/runner |
rails_product-0.5 | bin/runner |
rails_product-0.6 | bin/runner |