Sha256: ad2676709ee3da70037adacff2b47784724838e22864d922a3970c9738d346de

Contents?: true

Size: 771 Bytes

Versions: 1

Compression:

Stored size: 771 Bytes

Contents

require "thor"
require "fileutils"
require "beaker/subcommands/subcommand_util"

module Beaker
  class Subcommand < Thor
    SubcommandUtil = Beaker::Subcommands::SubcommandUtil

    desc "init", "Initialises the beaker test environment configuration"
    option :hypervisor, :type => :string, :enum => %w{vagrant vmpooler}
    option :help, :type => :boolean, :hide => true
    long_desc <<-LONGDESC
      Initialises a beaker environment configuration
    LONGDESC
    def init()
      if options[:help]
        invoke :help, [], ["init"]
        return
      end
      SubcommandUtil.require_tasks()
      SubcommandUtil.init_hypervisor(options)
      say "Writing host config to .beaker/acceptance/config/default_#{options[:hypervisor]}_hosts.yaml"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
beaker-3.12.0 lib/beaker/subcommand.rb