1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

rackspace auth url only prepend protocol as needed.

This commit is contained in:
Todd Willey 2011-06-15 13:19:58 -07:00 committed by geemus
parent 7ef3139ce6
commit d1dc40cc8e

View file

@ -11,7 +11,9 @@ module Fog
def self.authenticate(options)
rackspace_auth_url = options[:rackspace_auth_url] || "auth.api.rackspacecloud.com"
connection = Fog::Connection.new("https://" + rackspace_auth_url)
url = rackspace_auth_url.match(/^https?:/) ? \
rackspace_auth_url : 'https://' + rackspace_auth_url
connection = Fog::Connection.new(url)
@rackspace_api_key = options[:rackspace_api_key]
@rackspace_username = options[:rackspace_username]
response = connection.request({