Sha256: 77233615c613bde8113573135b251591a9c472ee45c9882d80f9afd73a7d1f36

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') unless $LOAD_PATH.include?(File.dirname(__FILE__) + '/../lib')

require 'trollop'
require "rjobs/jobs_file"
require "rjobs/job"
require "rjobs/job_handler"
require 'rjobs/cli_helper'
include  Rjobs::CliHelper   

p = Trollop::Parser.new do
  banner <<-EOS
Get the status of jobs described in the jobs file.

Usage:
       rjstatus [options] <filename>
where [options] are:
EOS
  
end

opts = Trollop::with_standard_exception_handling p do
  o = p.parse ARGV
  raise Trollop::HelpNeeded if ARGV.empty? # show help screen
end

jobs_file = ARGV[0]

jobs = get_jobs_info(jobs_file)

jobs.each do |job|        
  puts "#{job.name} - #{job.status_with_color}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rjobs-0.2.0.alpha bin/rjstatus
rjobs-0.1.0.alpha bin/rjstatus