Sha256: d8f62e0da89d3316c3d88dbf3896e0b17ac6f7507220a5ff95c68fc810f9806f

Contents?: true

Size: 411 Bytes

Versions: 35

Compression:

Stored size: 411 Bytes

Contents

#!/usr/bin/env ruby
require "rubygems"
require "mandy"

if ARGV.size==0
  puts "USAGE: mandy-reduce my_script.rb 'Job Name' [payload]"
  exit
end

def absolute_path(path)
  path =~ /^\// ? path : File.join(Dir.pwd, path)
end

if ARGV.size > 2
  payload = ARGV[2]
  Mandy::Packer.unpack(payload)
end

file   = absolute_path(ARGV[0])
job_name = ARGV[1]

require file

Mandy::Job.find_by_name(job_name).run_reduce

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
trafficbroker-mandy-0.2.10 bin/mandy-reduce
trafficbroker-mandy-0.2.11 bin/mandy-reduce
trafficbroker-mandy-0.2.12 bin/mandy-reduce
trafficbroker-mandy-0.2.13 bin/mandy-reduce
trafficbroker-mandy-0.2.4.5 bin/mandy-reduce
trafficbroker-mandy-0.2.4.6 bin/mandy-reduce
trafficbroker-mandy-0.2.5.1 bin/mandy-reduce
trafficbroker-mandy-0.2.5 bin/mandy-reduce
trafficbroker-mandy-0.2.6 bin/mandy-reduce
trafficbroker-mandy-0.2.7 bin/mandy-reduce
trafficbroker-mandy-0.2.8 bin/mandy-reduce
mandy-0.5.9 bin/mandy-reduce
mandy-0.5.8 bin/mandy-reduce
mandy-0.5.7 bin/mandy-reduce
mandy-0.5.6 bin/mandy-reduce
mandy-0.5.5 bin/mandy-reduce
mandy-0.5.3 bin/mandy-reduce
mandy-0.5.2 bin/mandy-reduce
mandy-0.5.1 bin/mandy-reduce
mandy-0.5 bin/mandy-reduce