Class: Jack::EbConfig::Update

Inherits:
Base
  • Object
show all
Defined in:
lib/jack/eb_config/update.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#ensure_eb_init, #sync, #write_eb_config_yml

Methods included from Util

#app_name_convention, #do_cmd, #eb, #ensure_folder_exist, #settings

Constructor Details

#initialize(options = {}) ⇒ Update

Returns a new instance of Update.



5
6
7
# File 'lib/jack/eb_config/update.rb', line 5

def initialize(options={})
  super
end

Instance Attribute Details

#eb_config_pathObject (readonly)

Returns the value of attribute eb_config_path.



4
5
6
# File 'lib/jack/eb_config/update.rb', line 4

def eb_config_path
  @eb_config_path
end

Instance Method Details

#app_nameObject



13
14
15
# File 'lib/jack/eb_config/update.rb', line 13

def app_name
  env.application_name
end

#describe_environmentsObject

useful for specs



24
25
26
# File 'lib/jack/eb_config/update.rb', line 24

def describe_environments
  eb.describe_environments(environment_names: [@env_name])
end

#envObject



17
18
19
20
21
# File 'lib/jack/eb_config/update.rb', line 17

def env
  return @env if @env
  envs = describe_environments
  @env = envs[:environments].first
end

#platformObject



9
10
11
# File 'lib/jack/eb_config/update.rb', line 9

def platform
  env.solution_stack_name
end