Sha256: a12c53b756919066676c33e9e23ed24270be12303e591056480e2bc118ac5c58
Contents?: true
Size: 1.29 KB
Versions: 3
Compression:
Stored size: 1.29 KB
Contents
require 'trollop' module SimpleDeploy module CLI class Outputs def show opts = Trollop::options do version SimpleDeploy::VERSION banner <<-EOS Show outputs of a stack. simple_deploy outputs -n STACK_NAME -e ENVIRONMENT EOS opt :help, "Display Help" opt :environment, "Set the target environment", :type => :string opt :log_level, "Log level: debug, info, warn, error", :type => :string, :default => 'warn' opt :name, "Stack name to manage", :type => :string end CLI::Shared.valid_options? :provided => opts, :required => [:environment, :name] config = Config.new.environment opts[:environment] logger = SimpleDeployLogger.new :log_level => opts[:log_level] stack = Stack.new :environment => opts[:environment], :name => opts[:name], :config => config, :logger => logger # we need a little whitespace puts outputs = stack.outputs outputs.each do |hash| puts "%s: %s" % [hash['OutputKey'], hash['OutputValue']] end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simple_deploy-0.6.4 | lib/simple_deploy/cli/outputs.rb |
simple_deploy-0.6.3 | lib/simple_deploy/cli/outputs.rb |
simple_deploy-0.6.2 | lib/simple_deploy/cli/outputs.rb |