Class: Composer::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/composer/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Config

Returns a new instance of Config.



6
7
8
9
# File 'lib/composer/config.rb', line 6

def initialize(args)
  log_level = args[:log_level]
  @logger = ComposerLogger.new :log_level => log_level
end

Instance Attribute Details

#aws_access_keyObject

Returns the value of attribute aws_access_key.



3
4
5
# File 'lib/composer/config.rb', line 3

def aws_access_key
  @aws_access_key
end

#aws_secret_keyObject

Returns the value of attribute aws_secret_key.



3
4
5
# File 'lib/composer/config.rb', line 3

def aws_secret_key
  @aws_secret_key
end

#loggerObject

Returns the value of attribute logger.



3
4
5
# File 'lib/composer/config.rb', line 3

def logger
  @logger
end

#regionObject

Returns the value of attribute region.



3
4
5
# File 'lib/composer/config.rb', line 3

def region
  @region
end

Instance Method Details

#configure_awsObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/composer/config.rb', line 11

def configure_aws
  options = { :access_key_id     => aws_access_key,
              :secret_access_key => aws_secret_key,
              :region            => region }

  if https_proxy
    options[:proxy_uri] = https_proxy
  end

  ::AWS.config options
end