class Flock::Sandbox::Context

Attributes

definition[RW]
runner[RW]

Public Class Methods

new(runner, definition) click to toggle source
# File lib/flock/sandbox.rb, line 54
def initialize(runner, definition)
  self.runner = runner
  self.definition = definition
end

Public Instance Methods

consul_key(key) click to toggle source
# File lib/flock/sandbox.rb, line 66
def consul_key(key)
  open(definition.config[:consul] + "/v1/kv/" + key + "?raw").read
end
host(container) click to toggle source
# File lib/flock/sandbox.rb, line 58
def host(container)
  case runner.target
  when "docker"
    container
  when "vagrant"
    definition.config[:private_network]
  end
end