Sha256: 5fc0dc501072e910ada1d722f4b9a981404e171b95348c7cc8219acd48b26e1e

Contents?: true

Size: 1.15 KB

Versions: 29

Compression:

Stored size: 1.15 KB

Contents

module Lono
  class Code < Lono::Command
    desc "import SOURCE", "Imports CloudFormation template and converts it to Ruby code."
    long_desc Help.text("code/import")
    option :blueprint, default: nil, desc: "final blueprint name"
    option :casing, default: "as-is", desc: "Controls casing of logical ids. IE: as-is, camelcase or underscore"
    option :summary, default: true, type: :boolean, desc: "provide template summary after import"
    option :template, default: nil, desc: "final template name of downloaded template without extension"
    option :template_name_casing, default: "dasherize", desc: "camelcase or dasherize the template name"
    option :type, default: "dsl", desc: "import as a DSL or ERB template"
    def import(source)
      Importer.new(options.merge(source: source)).run
    end

    desc "convert SOURCE", "Converts snippet of JSON or YAML CloudFormation templates to Ruby code."
    long_desc Help.text("code/convert")
    option :casing, default: "as-is", desc: "Controls casing of logical ids. IE: as-is, camelcase or underscore"
    def convert(source)
      Importer::Converter.new(options.merge(source: source)).run
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lono-7.5.2 lib/lono/code.rb
lono-7.5.1 lib/lono/code.rb
lono-7.5.0 lib/lono/code.rb
lono-7.4.11 lib/lono/code.rb
lono-7.4.10 lib/lono/code.rb
lono-7.4.9 lib/lono/code.rb
lono-7.4.8 lib/lono/code.rb
lono-7.4.7 lib/lono/code.rb
lono-7.4.6 lib/lono/code.rb
lono-7.4.5 lib/lono/code.rb
lono-7.4.4 lib/lono/code.rb
lono-7.4.3 lib/lono/code.rb
lono-7.4.2 lib/lono/code.rb
lono-7.4.1 lib/lono/code.rb
lono-7.4.0 lib/lono/code.rb
lono-7.3.2 lib/lono/code.rb
lono-7.3.1 lib/lono/code.rb
lono-7.3.0 lib/lono/code.rb
lono-7.2.3 lib/lono/code.rb
lono-7.2.2 lib/lono/code.rb