Sha256: c3a7e4348c432377b383c5d9bf5741fc01021c6bcf8c801b6c4aaeb4cd491923
Contents?: true
Size: 992 Bytes
Versions: 4
Compression:
Stored size: 992 Bytes
Contents
#!/usr/bin/env ruby require 'pathname' require 'pp' require 'yaml' require 'json' require 'fileutils' require 'cmds' require 'qb' require 'nrser/refinements' using NRSER DEBUG_ARGS = ['-D', '--DEBUG'] def set_debug! args if DEBUG_ARGS.any? {|arg| args.include? arg} ENV['QB_DEBUG'] = 'true' QB.debug "ON" DEBUG_ARGS.each {|arg| args.delete arg} end end def main args set_debug! args QB.debug args: args QB.check_ansible_version QB.debug "Switch arg", args[0] status = case args[0] when nil, '-h', '--help', 'help' QB::CLI.help when 'play' QB::CLI.play args.rest when 'run' QB::CLI.run args.rest when 'setup' state_args = args.rest case state_args[0] when nil QB::CLI.setup end else # default to `run` on the full args QB::CLI.run args end QB.debug "Exit status", status # exit status exit status end main(ARGV) # if __FILE__ == $0 # doesn't work with gem stub or something?
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
qb-0.3.8 | exe/qb |
qb-0.3.7 | exe/qb |
qb-0.3.6 | exe/qb |
qb-0.3.5 | exe/qb |