From 4ff8e859deccdd7308a689307693ec05bc9b364d Mon Sep 17 00:00:00 2001 From: Matt Chesler Date: Wed, 31 Jan 2018 11:11:31 -0500 Subject: [PATCH] Fix get_role_secrets to return a hash instead of an array of hashes --- lib/movable_ink/aws.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/movable_ink/aws.rb b/lib/movable_ink/aws.rb index 87962c9..0d43b84 100644 --- a/lib/movable_ink/aws.rb +++ b/lib/movable_ink/aws.rb @@ -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 @@ -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