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, #aws_bin, #check_aws_setup, #confirm, #eb, #eb_base_flags, #eb_bin, #ensure_folder_exist, #get_answer, #get_region, #prerequisites, #settings, #sh

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



28
29
30
# File 'lib/jack/eb_config/update.rb', line 28

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

#envObject



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

def env
  return @env if @env
  envs = describe_environments
  @env = envs[:environments].first
  unless @env
    abort("ERROR: Environment #{@env_name} not found.  Are you sure it exists?".colorize(:red))
  end
  @env
end

#platformObject



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

def platform
  env.solution_stack_name
end