Skip to content

Commit

Permalink
Symbolize Account definition keys recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
benton committed Mar 16, 2012
1 parent 00bd0a5 commit 5c13b5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/fog_tracker/tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def create_trackers
# Changes Strings to Symbols in Account keys
def validate_accounts
@accounts.each do |name, account|
account.symbolize_keys(recursive = false)
account.symbolize_keys
raise "Account #{name} defines no service" if not account[:service]
raise "Account #{name} defines no provider" if not account[:provider]
raise "Account #{name} defines no credentials" if not account[:credentials]
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/fog_tracker/tracker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module FogTracker
'provider' => 'AWS',
:service => 'Compute',
:credentials => {
:aws_access_key_id => 'X',
:aws_secret_access_key => 'X'
'aws_access_key_id' => 'X',
'aws_secret_access_key' => 'X'
}, 'exclude_resources' => [ 'spot_requests' ]
},
"fake account 2" => {
Expand Down

0 comments on commit 5c13b5b

Please sign in to comment.