Class: Beaker::Tasks::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/beaker/tasks/rake_task.rb

Constant Summary collapse

DEFAULT_ACCEPTANCE_ROOT =
"./acceptance"
COMMAND_OPTIONS =
%i[fail_mode
hosts
helper
keyfile
log_level
options_file
preserve_hosts
tests
type
acceptance_root
name]

Instance Method Summary collapse

Constructor Details

#initialize(*args, &task_block) ⇒ RakeTask

Sets up the predefine task checking if no additonal arguments are defined such as parameters it will default to [:hosts,:type]

Parameters:

  • args (Array)

    First argument is always the name of the task



32
33
34
35
36
37
38
39
40
# File 'lib/beaker/tasks/rake_task.rb', line 32

def initialize(*args, &task_block)
  super

  @name = args.shift || 'beaker:test'
  args = %i[hosts type] if args.empty?
  @acceptance_root = DEFAULT_ACCEPTANCE_ROOT
  @options_file = nil
  define(args, &task_block)
end