Sha256: 8ffe4b87d0ea586925a117696eb10ed6dd2cbee022d7fca871d3185776581650
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
# frozen_string_literal: true require "cri" require "cfer/auster/cli/_shared" module Cfer module Auster module CLI def self.json Cri::Command.define do name "json" usage "json aws-region/config-set count-or-tag" description "Generates the CloudFormation JSON for this step." CLI.standard_options(self) option :o, :"output-file", "Saves the JSON output to a file (otherwise prints to stdout)", argument: :required run do |opts, args, cmd| if args.length < 2 puts cmd.help exit 1 else CLI.repo_from_options(opts) do |repo| config_set = repo.config_set(args[0]) step = repo.step_by_count_or_tag(args[1]) ret = step.json(config_set) if opts[:"output-file"] IO.write(opts[:"output-file"], ret) else puts ret end end end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
auster-0.2.2 | lib/cfer/auster/cli/json.rb |