Class: Jack::Config::Transmit
- Inherits:
-
Object
- Object
- Jack::Config::Transmit
- Includes:
- Util
- Defined in:
- lib/jack/config/transmit.rb
Instance Attribute Summary collapse
-
#local_config_path ⇒ Object
readonly
Returns the value of attribute local_config_path.
Instance Method Summary collapse
- #extract_name(path) ⇒ Object
-
#initialize(options = {}) ⇒ Transmit
constructor
A new instance of Transmit.
- #timestamp ⇒ Object
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 = {}) ⇒ 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 = @root = [:root] || '.' @env_name = [:env_name] @app_name = @options[:app] || app_name_convention(@env_name) @saved_configs = "#{@root}/.elasticbeanstalk/saved_configs" local_config_name = [:cfg] || @env_name @local_config_path = "jack/cfg/#{local_config_name}.cfg.yml" end |
Instance Attribute Details
#local_config_path ⇒ Object (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
#extract_name(path) ⇒ Object
26 27 28 |
# File 'lib/jack/config/transmit.rb', line 26 def extract_name(path) path.split('/').last.sub('.cfg.yml','') end |
#timestamp ⇒ Object
22 23 24 |
# File 'lib/jack/config/transmit.rb', line 22 def Time.now.strftime "%Y-%m-%d_%H-%M-%S" end |