class EbDeployer::DefaultComponent

Public Class Methods

new(env, creation_opts, strategy_name, eb_driver) click to toggle source
# File lib/eb_deployer/default_component.rb, line 3
def initialize(env, creation_opts, strategy_name, eb_driver)
  @env = env
  @eb_driver = eb_driver
  @creation_opts = creation_opts
  @strategy = DeploymentStrategy.create(self, strategy_name)
end

Public Instance Methods

cname_prefix() click to toggle source
# File lib/eb_deployer/default_component.rb, line 10
def cname_prefix
  @creation_opts[:cname_prefix] || default_cname_prefix
end
deploy(version_label, eb_settings, inactive_settings=[]) click to toggle source
# File lib/eb_deployer/default_component.rb, line 14
def deploy(version_label, eb_settings, inactive_settings=[])
  @strategy.test_compatibility(@creation_opts)
  @strategy.deploy(version_label, eb_settings, inactive_settings)
end
new_eb_env(suffix=nil, cname_prefix_overriding=nil) click to toggle source
# File lib/eb_deployer/default_component.rb, line 19
def new_eb_env(suffix=nil, cname_prefix_overriding=nil)
  EbEnvironment.new(@env.app_name,
                    [@env.name, suffix].compact.join('-'),
                    @eb_driver,
                    @creation_opts.merge(:cname_prefix => cname_prefix_overriding || cname_prefix))
end

Private Instance Methods

default_cname_prefix() click to toggle source
# File lib/eb_deployer/default_component.rb, line 28
def default_cname_prefix
  [@env.app_name, @env.name].join('-')
end