lib/fog/aws/iam.rb in fog-0.11.0 vs lib/fog/aws/iam.rb in fog-1.0.0

- old
+ new

@@ -1,5 +1,7 @@ +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'aws')) + module Fog module AWS class IAM < Fog::Service class EntityAlreadyExists < Fog::AWS::IAM::Error; end @@ -108,15 +110,17 @@ require 'fog/core/parser' require 'multi_json' @aws_access_key_id = options[:aws_access_key_id] @aws_secret_access_key = options[:aws_secret_access_key] + @connection_options = options[:connection_options] || {} @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key) - @host = options[:host] || 'iam.amazonaws.com' - @path = options[:path] || '/' - @port = options[:port] || 443 - @scheme = options[:scheme] || 'https' - @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", options[:persistent]) + @host = options[:host] || 'iam.amazonaws.com' + @path = options[:path] || '/' + @persistent = options[:persistent] || false + @port = options[:port] || 443 + @scheme = options[:scheme] || 'https' + @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options) end def reload @connection.reset end