Sha256: 5b9bc208589bd64fead519fd8d37dc2a7b4ca855b1eb47716d705d57dcbd64e2

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

require "thor"
require_relative "command"

class Lono::Template < Lono::Command
  autoload :Help, 'lono/template/help'
  autoload :Helpers, 'lono/template/helpers'
  autoload :Bashify, 'lono/template/bashify'
  autoload :DSL, 'lono/template/dsl'
  autoload :Template, 'lono/template/template'
  autoload :Upload, 'lono/template/upload'
  autoload :AwsServices, 'lono/template/aws_services'

  class_option :quiet, type: :boolean, aliases: "-q", desc: "silence the output"
  class_option :noop, type: :boolean, desc: "noop mode, do nothing destructive"

  desc "generate", "Generate the CloudFormation templates"
  Help.generate
  option :clean, type: :boolean, aliases: "-c", desc: "remove all output files before generating"
  option :pretty, type: :boolean, default: true, desc: "json pretty the output.  only applies with json format"
  def generate
    DSL.new(options.clone).run
  end

  desc "upload", "Uploads templates to configured s3 folder"
  def upload
    Upload.new(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"
  Help.bashify
  def bashify(path)
    Bashify.new(path: path).run
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lono-3.5.0 lib/lono/template.rb