Class: Idlc::Build::Config

Inherits:
Object
  • Object
show all
Extended by:
Helpers
Includes:
Helpers
Defined in:
lib/iapi-idlc-sdk-build/config.rb

Class Method Summary collapse

Instance Method Summary collapse

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.message}\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_varsObject



23
24
25
# File 'lib/iapi-idlc-sdk-build/config.rb', line 23

def dump_build_vars
  @build_vars.join(' ')
end