module Akashi

Constants

VERSION

Attributes

application[RW]
environment[RW]
manifest[R]

Public Class Methods

build() click to toggle source
# File lib/akashi.rb, line 24
def build
  Akashi::Builder.new.build
end
destroy() click to toggle source
# File lib/akashi.rb, line 28
def destroy
  fail "Not implemented"
end
klass(service, object, role = nil) click to toggle source
# File lib/akashi.rb, line 37
def klass(service, object, role = nil)
  context = "Akashi::#{service.to_s.camelize}::#{object.to_s.camelize}"
  context << "::#{role.to_s.camelize}" if !!role
  context.constantize
end
manifest=(new_value) click to toggle source
# File lib/akashi.rb, line 17
def manifest=(new_value)
  @manifest = Hashie::Mash.new(new_value)
  unless @manifest.role.all? { |role_name, _| role_names.include?(role_name.intern) }
    fail "Unknown role exists"
  end
end
name(separator: "-") click to toggle source
# File lib/akashi.rb, line 32
def name(separator: "-")
  fail "Invalid configurations" unless (!!application && !!environment)
  application + separator + environment
end
role_names() click to toggle source
# File lib/akashi.rb, line 43
def role_names
  @role_names ||= [
    :elb,
    :gateway,
    :rds,
    :web,
  ]
end