Skip to content
Browse files

rackspace auth url only prepend protocol as needed.

  • Loading branch information...
1 parent 7ef3139 commit d1dc40cc8e5ebe9612b311cea8d3fcde951eaee5 @xtoddx xtoddx committed with geemus Jun 15, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/fog/providers/rackspace.rb
View
4 lib/fog/providers/rackspace.rb
@@ -11,7 +11,9 @@ module Rackspace
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({

0 comments on commit d1dc40c

Please sign in to comment.
Something went wrong with that request. Please try again.