Class: R10K::Action::Deploy::Environment

Inherits:
Object
  • Object
show all
Includes:
Visitor, Logging, Util::Setopts
Defined in:
lib/r10k/action/deploy/environment.rb

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Method Summary collapse

Methods included from Visitor

#visit

Methods included from Logging

debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level

Constructor Details

#initialize(opts, argv) ⇒ Environment

Returns a new instance of Environment.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/r10k/action/deploy/environment.rb', line 14

def initialize(opts, argv)
  @opts = opts
  @argv = argv.map { |arg| arg.gsub(/\W/,'_') }
  setopts(opts, {
    :config     => :self,
    :puppetfile => :self,
    :purge      => :self,
    :trace      => :self
  })

  @purge = true
end

Instance Method Details

#callObject



27
28
29
30
31
32
# File 'lib/r10k/action/deploy/environment.rb', line 27

def call
  @visit_ok = true
  deployment = R10K::Deployment.load_config(@config)
  deployment.accept(self)
  @visit_ok
end