lib/build-cloud.rb in build-cloud-0.0.12 vs lib/build-cloud.rb in build-cloud-0.0.13
- old
+ new
@@ -59,11 +59,11 @@
else
# the :include key is a scalar, so just standardise that path
include_files.push( File.expand_path( include_yaml, File.dirname( File.absolute_path(first_config_file) ) ) )
end
end
-
+
include_files.each do |include_path|
if File.exists?( include_path )
@log.info( "Including YAML file #{include_path}" )
included_conf = YAML::load( File.open( include_path ) )
@@ -199,11 +199,11 @@
end
def self.search( type, options )
BuildCloud::dispatch[type].search(options)
end
-
+
def recursive_interpolate_config(h)
# Work through the given config replacing all strings matching
# %{..x..} by looking up ..x.. in the existing @config hash and
# substituting the template with the value
@@ -226,11 +226,11 @@
if @config.has_key?(var.to_sym)
val = @config[var.to_sym]
else
raise "Attempt to interpolate with non-existant key '#{var}'"
end
-
+
h.gsub!(/%\{#{var}\}/, val)
end
h
@@ -244,12 +244,12 @@
def connect_fog
@mock and Fog.mock!
fog_options_regionless = {
- :aws_access_key_id => @config[:aws_access_key_id] ||= ENV['AWS_ACCESS_KEY'],
- :aws_secret_access_key => @config[:aws_secret_access_key] ||= ENV['AWS_SECRET_KEY'],
+ :aws_access_key_id => @config[:aws_access_key_id] ||= ENV['AWS_ACCESS_KEY_ID'],
+ :aws_secret_access_key => @config[:aws_secret_access_key] ||= ENV['AWS_SECRET_ACCESS_KEY'],
}
fog_options = fog_options_regionless.merge( { :region => @config[:aws_region] } )
@fog_interfaces = {
@@ -259,12 +259,11 @@
:as => Fog::AWS::AutoScaling.new( fog_options ),
:elb => Fog::AWS::ELB.new( fog_options ),
:iam => Fog::AWS::IAM.new( fog_options_regionless ),
:rds => Fog::AWS::RDS.new( fog_options ),
:elasticache => Fog::AWS::Elasticache.new( fog_options ),
- :r53 => Fog::DNS::AWS.new( fog_options_regionless )
+ :r53 => Fog::DNS::AWS.new( fog_options_regionless )
}
end
end
-