lib/build-cloud/iammanagedpolicy.rb in build-cloud-1.1.6 vs lib/build-cloud/iammanagedpolicy.rb in build-cloud-1.1.7

- old
+ new

@@ -36,11 +36,15 @@ policy = fog_object end end + # Fog only partly implements collection behaviour for managed policies + # Work around this using each() - and not, for example, select() def read - @iam.managed_policies.select { |r| r.name == @options[:name] }.first + @iam.managed_policies.each do |item| + return item if item.name == @options[:name] + end end alias_method :fog_object, :read def delete