Sha256: e53552f924f59ffa3b67aaf9853be96433f18baac4cede050d7d292919c8c29f
Contents?: true
Size: 1.63 KB
Versions: 5
Compression:
Stored size: 1.63 KB
Contents
#!/usr/bin/env ruby $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) require 'makesure' require 'optparse' parser = OptionParser.new do |opts| opts.banner = "Usage: makesure-runner [options] COMMAND" opts.separator "" opts.separator "Options:" # opts.on("-c", "--cron <path to file>", "path to the file makesure should write your cron specs") do |path| # cron_path = path # end opts.on("-h", "--help", "Show this message") do puts opts exit end opts.separator "" opts.separator "Commands:" opts.separator " run COMMAND Runs the specified COMMAND and monitors its output" opts.separator " verify SYSTEM Verfies the state of the specified SYSTEM" opts.separator " summarize SYSTEM Collects summary data for the specified SYSTEM" end parser.parse! case ARGV[0] when 'run' cmd = ARGV[1] Makesure.load_system_defs Makesure::Runner.new(cmd).run! when 'verify' sys = ARGV[1] vrfy = ARGV[2] Makesure.load_system_defs system = Makesure.system_with_name(sys) abort "Couldn't find system: #{sys}" unless system verify = system.verify_with_name(vrfy) abort "Couldn't find verify: #{vrfy}" unless verify Makesure.log "Running verify #{sys} #{vrfy}" verify.run! when 'summarize' sys = ARGV[1] smrz = ARGV[2] Makesure.load_system_defs system = Makesure.system_with_name(sys) abort "Couldn't find system: #{sys}" unless system summarize = system.summarize_with_name(smrz) abort "Couldn't find summarize: #{smrz}" unless summarize Makesure.log "Running summarize #{sys} #{smrz}" summarize.run! else puts parser.help end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
makesure-0.0.6 | bin/makesure-runner |
makesure-0.0.5 | bin/makesure-runner |
makesure-0.0.4 | bin/makesure-runner |
makesure-0.0.2 | bin/makesure-runner |
makesure-0.0.1 | bin/makesure-runner |