Sha256: 6a518e2b739eebbe13e4262f87e4de5f933f182f43bdd33ab375e6a2210aae98

Contents?: true

Size: 1006 Bytes

Versions: 3

Compression:

Stored size: 1006 Bytes

Contents

require "thor"
require_relative "command"

module Lono
  class Template < Lono::Command
    class_option :quiet, type: :boolean, desc: "silence the output"
    class_option :noop, type: :boolean, desc: "noop mode, do nothing destructive"

    desc "generate", "Generate the CloudFormation templates"
    long_desc Lono::Help.text("template/generate")
    option :clean, type: :boolean, desc: "remove all output files before generating"
    def generate(blueprint=nil)
      Blueprint::Find.one_or_all(blueprint).each do |b|
        Generator.new(b, options).run
      end
    end

    desc "upload", "Uploads templates to configured s3 folder"
    def upload(blueprint)
      Upload.new(blueprint, options.clone).run
    end

    desc "bashify URL-OR-PATH", "Convert the UserData section of an existing CloudFormation Template to a starter bash script that is compatiable with lono"
    long_desc Lono::Help.text("template/bashify")
    def bashify(path)
      Bashify.new(path: path).run
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lono-5.1.1 lib/lono/template.rb
lono-5.1.0 lib/lono/template.rb
lono-5.0.1 lib/lono/template.rb