Class: Jack::Config::Transmit

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/jack/config/transmit.rb

Direct Known Subclasses

Download, Sort, Upload

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util

#app_name_convention, #do_cmd, #eb

Constructor Details

#initialize(options = {}) ⇒ Transmit

Returns a new instance of Transmit.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/jack/config/transmit.rb', line 10

def initialize(options={})
  @options = options
  @root = options[:root] || '.'
  @env_name = options[:env_name]
  @app_name = @options[:app_name] || app_name_convention(@env_name)

  @saved_configs = "#{@root}/.elasticbeanstalk/saved_configs"

  local_config_name = options[:cfg] || config_name_convention(@env_name)
  @local_config_path = "jack/cfg/#{local_config_name}.cfg.yml"
end

Instance Attribute Details

#local_config_pathObject (readonly)

Returns the value of attribute local_config_path.



9
10
11
# File 'lib/jack/config/transmit.rb', line 9

def local_config_path
  @local_config_path
end

Instance Method Details

#eb_config_pathObject



22
23
24
# File 'lib/jack/config/transmit.rb', line 22

def eb_config_path
  "#{@root}/.elasticbeanstalk/config.yml"
end

#sync_eb_config_yml(force = false) ⇒ Object



26
27
28
29
30
31
# File 'lib/jack/config/transmit.rb', line 26

def sync_eb_config_yml(force=false)
  # should break out to another class but too much work right now
  create = Create.new(@options)
  create.ensure_eb_init
  do_sync_eb_config_yml(force)
end