Sha256: 3e94f9b056becd360b9f534aa3c7a313415c0c18721a3b182a9c2ba170ed45ac
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
#!/usr/bin/env ruby unless Gem.respond_to?(:latest_spec_for) fail 'right_develop command line tools require rubygems v1.8+' end require "trollop" require "right_develop" gemspec = Gem.latest_spec_for("right_develop") commands = {} RightDevelop::Commands.constants.each do |konst| name = konst.to_s.downcase commands[name] = RightDevelop::Commands.const_get(konst.to_sym) end # Use a Trollop parser for help/banner display, but do not actually parse anything # just yet. command_list = commands.keys.map { |c| " * #{c}" }.join("\n") p = Trollop::Parser.new do version "right_develop #{gemspec.version} (c) 2013- RightScale, Inc." banner <<-EOS A command-line interface to various tools offered by the right_develop gem. Usage: right_develop <command> [options] Where <command> is one of: #{command_list} To get help on a command: right_develop <command> --help EOS stop_on commands.keys end opts = Trollop::with_standard_exception_handling p do raise Trollop::HelpNeeded if ARGV.empty? p.parse ARGV cmd = ARGV.shift commands[cmd].create.run end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
right_develop-2.2.0 | bin/right_develop |