Class: Jack::EbConfig::Create
Instance Attribute Summary collapse
-
#eb_config_path ⇒ Object
readonly
Returns the value of attribute eb_config_path.
Instance Method Summary collapse
- #app_name ⇒ Object
-
#initialize(options = {}) ⇒ Create
constructor
A new instance of Create.
- #latest_docker_platform ⇒ Object
- #platform ⇒ Object
- #solution_stacks ⇒ Object
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
Constructor Details
#initialize(options = {}) ⇒ Create
Returns a new instance of Create.
5 6 7 8 |
# File 'lib/jack/eb_config/create.rb', line 5 def initialize(={}) super @app_name = [:app] || app_name_convention(@env_name) end |
Instance Attribute Details
#eb_config_path ⇒ Object (readonly)
Returns the value of attribute eb_config_path.
4 5 6 |
# File 'lib/jack/eb_config/create.rb', line 4 def eb_config_path @eb_config_path end |
Instance Method Details
#app_name ⇒ Object
14 15 16 |
# File 'lib/jack/eb_config/create.rb', line 14 def app_name @app_name end |
#latest_docker_platform ⇒ Object
18 19 20 |
# File 'lib/jack/eb_config/create.rb', line 18 def latest_docker_platform solution_stacks.grep(/Docker/).reject {|x| x =~ /Preconfigured/}.sort.last end |
#platform ⇒ Object
10 11 12 |
# File 'lib/jack/eb_config/create.rb', line 10 def platform CreateYaml.new.data['Platform'] || latest_docker_platform end |
#solution_stacks ⇒ Object
22 23 24 |
# File 'lib/jack/eb_config/create.rb', line 22 def solution_stacks eb.list_available_solution_stacks.solution_stacks end |