Class: Kitchen::RakeTasks

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/kitchen/rake_tasks.rb

Overview

Kitchen Rake task generator.

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cfg = {}) {|self| ... } ⇒ RakeTasks

Creates Kitchen Rake tasks and allows the callee to configure it.

Yields:

  • (self)

    gives itself to the block



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/kitchen/rake_tasks.rb', line 30

def initialize(cfg = {})
  @loader = Kitchen::Loader::YAML.new(
    project_config: ENV["KITCHEN_YAML"],
    local_config: ENV["KITCHEN_LOCAL_YAML"],
    global_config: ENV["KITCHEN_GLOBAL_YAML"]
  )
  @config = Kitchen::Config.new(
    { loader: @loader }.merge(cfg)
  )
  Kitchen.logger = Kitchen.default_file_logger(nil, false)
  yield self if block_given?
  define
end

Instance Attribute Details

#configConfig (readonly)

Returns a Kitchen::Config.

Returns:

  • (Config)

    a Kitchen::Config



45
46
47
# File 'lib/kitchen/rake_tasks.rb', line 45

def config
  @config
end