Class: Idlc::Build::Config
- Inherits:
-
Object
- Object
- Idlc::Build::Config
- Extended by:
- Helpers
- Includes:
- Helpers
- Defined in:
- lib/iapi-idlc-sdk-build/config.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_build_var_v2(key, value) ⇒ Object
- #dump_build_vars ⇒ Object
-
#initialize(region) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(region) ⇒ Config
Returns a new instance of Config.
13 14 15 16 17 18 19 20 21 |
# File 'lib/iapi-idlc-sdk-build/config.rb', line 13 def initialize(region) @region = region @build_vars = [] Idlc::Utility.check_for_creds rescue Idlc::Utility::MissingCredentials => e msg("WARN: #{e.}\nFalling back to implicit authentication.") end |
Class Method Details
.add_build_var(key, value) ⇒ Object
8 9 10 |
# File 'lib/iapi-idlc-sdk-build/config.rb', line 8 def add_build_var(key, value) ENV[key] = value end |
Instance Method Details
#add_build_var_v2(key, value) ⇒ Object
27 28 29 30 31 |
# File 'lib/iapi-idlc-sdk-build/config.rb', line 27 def add_build_var_v2(key, value) ENV[key] = value @build_vars << "-var '#{key}=#{value}'" end |
#dump_build_vars ⇒ Object
23 24 25 |
# File 'lib/iapi-idlc-sdk-build/config.rb', line 23 def dump_build_vars @build_vars.join(' ') end |