Module: Runpuppet

Defined in:
lib/runpuppet/agent.rb,
lib/runpuppet.rb,
lib/runpuppet/client.rb,
lib/runpuppet/config.rb,
lib/runpuppet/logger.rb,
lib/runpuppet/version.rb

Overview

http client

Defined Under Namespace

Classes: Agent, Client, Config, Logger

Constant Summary collapse

VERSION =
File.read( File.join(File.dirname(__FILE__),'..', '..','VERSION') ).strip

Class Method Summary collapse

Class Method Details

.setup_context(options = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/runpuppet.rb', line 18

def self.setup_context(options={})
  ctx = Dim::Container.new

  ctx.register(:run_options) do
    options
  end

  ctx.register(:config) do
    Runpuppet::Config.find_system_config
  end

  ctx.register(:client) do |context|
    Runpuppet::Client.new(context)
  end

  ctx.register(:agent) do |context|
    Runpuppet::Agent.new(context)
  end

  ctx.register(:logger) do
    Runpuppet::Logger
  end

  return ctx
end