Module: Lono::Core
Defined Under Namespace
Classes: Config
Instance Method Summary collapse
- #config ⇒ Object
- #env ⇒ Object
- #root ⇒ Object
-
#suffix ⇒ Object
Precedence (highest to lowest) 1.
Instance Method Details
#config ⇒ Object
8 9 10 |
# File 'lib/lono/core.rb', line 8 def config Config.new end |
#env ⇒ Object
19 20 21 22 23 |
# File 'lib/lono/core.rb', line 19 def env ufo_env = env_from_profile(ENV['AWS_PROFILE']) || 'development' ufo_env = ENV['LONO_ENV'] if ENV['LONO_ENV'] # highest precedence ufo_env end |
#root ⇒ Object
13 14 15 16 |
# File 'lib/lono/core.rb', line 13 def root path = ENV['LONO_ROOT'] || '.' Pathname.new(path) end |
#suffix ⇒ Object
Precedence (highest to lowest)
1. LONO_SUFFIX
2. .current/lono
3. config/settings.yml
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/lono/core.rb', line 30 def suffix suffix = ENV['LONO_SUFFIX'] # highest precedence suffix ||= Cfn::Current.suffix unless suffix settings = Setting.new.data suffix ||= settings["stack_name_suffix"] # lowest precedence end return if suffix&.empty? suffix end |