From 337c7560a8486bae676ad735b8876034b02dd703 Mon Sep 17 00:00:00 2001 From: Eugene Howe Date: Thu, 19 Jan 2017 12:02:54 -0500 Subject: [PATCH] 1.8 fixes --- lib/fog/aws/requests/iam/list_policies.rb | 2 +- tests/models/iam/instance_profile_tests.rb | 4 ++-- tests/requests/iam/instance_profile_tests.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fog/aws/requests/iam/list_policies.rb b/lib/fog/aws/requests/iam/list_policies.rb index 82f184567..d557bbb9f 100644 --- a/lib/fog/aws/requests/iam/list_policies.rb +++ b/lib/fog/aws/requests/iam/list_policies.rb @@ -65,7 +65,7 @@ module Fog end if options["PathPrefix"] - data_set.select! { |p| p["Path"].match(/^#{options["PathPrefix"]}/) } + data_set = data_set.select { |p| p["Path"].match(/^#{options["PathPrefix"]}/) } end data = data_set.slice!(0, limit || 100) diff --git a/tests/models/iam/instance_profile_tests.rb b/tests/models/iam/instance_profile_tests.rb index 258143a88..1fb30f126 100644 --- a/tests/models/iam/instance_profile_tests.rb +++ b/tests/models/iam/instance_profile_tests.rb @@ -1,6 +1,6 @@ Shindo.tests("Fog::AWS[:iam] | instance_profiles", ['aws', 'iam']) do - model_tests(Fog::AWS[:iam].instance_profiles, {name: uniq_id('fog-instance-profile')}) do - @role = Fog::AWS[:iam].roles.create(rolename: uniq_id('fog-role')) + model_tests(Fog::AWS[:iam].instance_profiles, {:name => uniq_id('fog-instance-profile')}) do + @role = Fog::AWS[:iam].roles.create(:rolename => uniq_id('fog-role')) tests("#add_role('#{@role.rolename}')") do returns(true) { @instance.add_role(@role.rolename) } diff --git a/tests/requests/iam/instance_profile_tests.rb b/tests/requests/iam/instance_profile_tests.rb index 7b9879a9e..b5d7f1cee 100644 --- a/tests/requests/iam/instance_profile_tests.rb +++ b/tests/requests/iam/instance_profile_tests.rb @@ -11,7 +11,7 @@ Shindo.tests("AWS::IAM | instance profile requests", ['aws']) do Fog::AWS[:iam].get_instance_profile(profile_name).body end - @role = Fog::AWS[:iam].roles.create(rolename: uniq_id('instance-profile-role')) + @role = Fog::AWS[:iam].roles.create(:rolename => uniq_id('instance-profile-role')) tests("#add_role_to_instance_profile('#{@role.rolename}', '#{profile_name}')").formats(BASIC) do Fog::AWS[:iam].add_role_to_instance_profile(@role.rolename, profile_name).body