Sha256: 27e6224fa1ed518ddb39b7ea5c536458d38688bb001be9a7d187857d39b08762

Contents?: true

Size: 669 Bytes

Versions: 4

Compression:

Stored size: 669 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] BATCH_FILE"
  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

4 entries across 4 versions & 1 rubygems

Version Path
batch_manager-0.3.9 bin/bm_exec
batch_manager-0.3.8 bin/bm_exec
batch_manager-0.3.7 bin/bm_exec
batch_manager-0.3.6 bin/bm_exec