Sha256: a25e22bec535d08999e6b7809e1988964e32201b904c2fd59d9a86ff041063d6

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 KB

Contents

require 'thor'
require 'lono/cli/help'

module Lono
  class CLI < Thor

    desc "new [NAME]", "Generates lono starter project"
    Help.new_long_desc
    option :force, type: :boolean, aliases: "-f", desc: "override existing starter files"
    option :quiet, type: :boolean, aliases: "-q", desc: "silence the output"
    def new(project_root)
      Lono::New.new(options.clone.merge(project_root: project_root)).run
    end

    desc "generate", "Generate the cloudformation templates"
    Help.generate
    option :clean, type: :boolean, aliases: "-c", desc: "remove all output files before generating"
    option :project_root, default: ".", aliases: "-r", desc: "project root"
    option :quiet, type: :boolean, aliases: "-q", desc: "silence the output"
    option :pretty, type: :boolean, default: true, desc: "json pretty the output"
    def generate
      Lono::DSL.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)
      Lono::Bashify.new(path: path).run
    end

    desc "version", "Prints version"
    def version
      puts Lono::VERSION
    end

  end  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lono-0.5.2 lib/lono/cli.rb
lono-0.5.1 lib/lono/cli.rb