Sha256: 01ea4b8014db44dbee03b70fafa01af77adea2b534633e1cf6b86704f925419f
Contents?: true
Size: 668 Bytes
Versions: 15
Compression:
Stored size: 668 Bytes
Contents
#!/usr/bin/env ruby $:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require 'optparse' require 'batch_manager' options = {} batch_file = nil ARGV.clone.options do |opts| opts.banner = "Usage: batch [options] file_name" opts.on("-f", "--force", "Force to run") { options[:force] = true } opts.on("-w", "--wet", "Wet run") { options[:wet] = true } opts.order! { |o| batch_file ||= o } rescue retry end ARGV.delete(batch_file) APP_PATH = File.join('.', 'config', 'application') require APP_PATH #ENV["RAILS_ENV"] = options[:environment] || "development" Rails.application.require_environment! BatchManager::Executor.exec(batch_file, options)
Version data entries
15 entries across 15 versions & 1 rubygems