1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

new format for rakefile (preparing to support having multiple configured accounts)

This commit is contained in:
Wesley Beary 2009-11-22 15:58:42 -08:00
parent 0f77090963
commit cc1e573bdb
2 changed files with 13 additions and 7 deletions

View file

@ -102,12 +102,18 @@ namespace :fog do
desc 'Provide a sample yaml file for credentials'
task :yml do
puts('Copy the following sample to ~/.fog and fill in with your credentials as needed:')
print("\n")
print(":aws_access_key_id: INTENTIONALLY_LEFT_BLANK\n")
print(":aws_secret_access_key: INTENTIONALLY_LEFT_BLANK\n")
print(":rackspace_api_key: INTENTIONALLY_LEFT_BLANK\n")
print(":rackspace_username: INTENTIONALLY_LEFT_BLANK\n")
print("\n")
yml = <<YML
:default:
:aws:
:aws_access_key_id: INTENTIONALLY_LEFT_BLANK
:aws_secret_access_key: INTENTIONALLY_LEFT_BLANK
:rackspace:
:rackspace_api_key: INTENTIONALLY_LEFT_BLANK
:rackspace_username: INTENTIONALLY_LEFT_BLANK
YML
print(yml)
end
end

View file

@ -41,7 +41,7 @@ module Fog
@credentials ||= begin
credentials = {}
File.open(path) do |file|
credentials = YAML.load(file.read)
credentials = YAML.load(file.read)[:default]
end
credentials
end