Skip to content

Commit

Permalink
Fix get_role_secrets to return a hash instead of an array of hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Chesler committed Jan 31, 2018
1 parent 3f85155 commit 4ff8e85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/movable_ink/aws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def get_role_secrets(environment: mi_env, role:)
with_decryption: true,
next_token: resp.next_token
)
secrets += extract_parameters(resp.parameters, path)
secrets.merge!(extract_parameters(resp.parameters, path))
end

secrets
Expand All @@ -378,8 +378,8 @@ def get_role_secrets(environment: mi_env, role:)

def extract_parameters(parameters, path)
parameters.map do |param|
{ param.name.gsub("#{path}/", '') => param.value }
end
[ param.name.gsub("#{path}/", ''), param.value ]
end.to_h
end
end
end

0 comments on commit 4ff8e85

Please sign in to comment.