Sha256: bc6f3a61728c7100df6e377a07c9ea0fb7957bb9853d7e3a31799c20d1992d9a

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

class TerraspaceBundler::CLI
  class Bundle < TerraspaceBundler::Command
    terrafile_option = Proc.new {
      option :terrafile, default: ENV['TB_TERRAFILE'] || "Terrafile", desc: "Terrafile to use"
    }

    desc "list", "List bundled modules included by Terrafile."
    long_desc Help.text("bundle/list")
    terrafile_option.call
    def list
      TB::List.new(options).run
    end

    desc "info MOD", "Provide info about a bundled module."
    long_desc Help.text("bundle/info")
    terrafile_option.call
    def info(mod)
      TB::Info.new(options.merge(mod: mod)).run
    end

    desc "install", "Install modules from the Terrafile."
    long_desc Help.text("bundle/install")
    terrafile_option.call
    def install
      Runner.new(options).run
    end

    desc "purge_cache", "Purge cache."
    long_desc Help.text("bundle/purge_cache")
    def purge_cache
      PurgeCache.new(options).run
    end

    desc "update [MOD]", "Update bundled modules."
    long_desc Help.text("bundle/update")
    terrafile_option.call
    def update(*mods)
      Runner.new(options.merge(mods: mods, mode: "update")).run
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
terraspace-bundler-0.2.0 lib/terraspace_bundler/cli/bundle.rb