Class: EbDeployer::DefaultComponent
- Inherits:
-
Object
- Object
- EbDeployer::DefaultComponent
- Defined in:
- lib/eb_deployer/default_component.rb
Instance Method Summary collapse
- #cname_prefix ⇒ Object
- #deploy(version_label, eb_settings, inactive_settings = []) ⇒ Object
-
#initialize(env, creation_opts, strategy_name, eb_driver) ⇒ DefaultComponent
constructor
A new instance of DefaultComponent.
- #new_eb_env(suffix = nil, cname_prefix_overriding = nil) ⇒ Object
Constructor Details
#initialize(env, creation_opts, strategy_name, eb_driver) ⇒ DefaultComponent
Returns a new instance of DefaultComponent.
3 4 5 6 7 8 |
# 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 |
Instance Method Details
#cname_prefix ⇒ Object
10 11 12 |
# 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 = []) ⇒ Object
14 15 16 17 |
# 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) ⇒ Object
19 20 21 22 23 24 |
# 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 |