fog 0.2.26 → 0.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/fog.gemspec CHANGED
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.2.26'
11
- s.date = '2010-08-18'
10
+ s.version = '0.2.27'
11
+ s.date = '2010-08-19'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
data/lib/fog.rb CHANGED
@@ -41,7 +41,7 @@ require 'fog/vcloud'
41
41
  module Fog
42
42
 
43
43
  unless const_defined?(:VERSION)
44
- VERSION = '0.2.26'
44
+ VERSION = '0.2.27'
45
45
  end
46
46
 
47
47
  module Mock
data/lib/fog/rackspace.rb CHANGED
@@ -5,7 +5,8 @@ module Fog
5
5
  module Rackspace
6
6
 
7
7
  def self.authenticate(options)
8
- connection = Fog::Connection.new("https://auth.api.rackspacecloud.com")
8
+ rackspace_auth_url = options[:rackspace_auth_url] || "auth.api.rackspacecloud.com"
9
+ connection = Fog::Connection.new("https://" + rackspace_auth_url)
9
10
  @rackspace_api_key = options[:rackspace_api_key]
10
11
  @rackspace_username = options[:rackspace_username]
11
12
  response = connection.request({
@@ -14,7 +15,7 @@ module Fog
14
15
  'X-Auth-Key' => @rackspace_api_key,
15
16
  'X-Auth-User' => @rackspace_username
16
17
  },
17
- :host => 'auth.api.rackspacecloud.com',
18
+ :host => rackspace_auth_url,
18
19
  :method => 'GET',
19
20
  :path => 'v1.0'
20
21
  })
@@ -79,12 +79,14 @@ module Fog
79
79
  credentials = Fog::Rackspace.authenticate(options)
80
80
  @auth_token = credentials['X-Auth-Token']
81
81
 
82
- cdn_uri = URI.parse(credentials['X-CDN-Management-Url'])
83
- @cdn_host = cdn_uri.host
84
- @cdn_path = cdn_uri.path
85
- @cdn_port = cdn_uri.port
86
- @cdn_scheme = cdn_uri.scheme
87
- @cdn_connection = Fog::Connection.new("#{@cdn_scheme}://#{@cdn_host}:#{@cdn_port}", options[:persistent])
82
+ if(credentials['X-CDN-Management-Url'])
83
+ cdn_uri = URI.parse(credentials['X-CDN-Management-Url'])
84
+ @cdn_host = cdn_uri.host
85
+ @cdn_path = cdn_uri.path
86
+ @cdn_port = cdn_uri.port
87
+ @cdn_scheme = cdn_uri.scheme
88
+ @cdn_connection = Fog::Connection.new("#{@cdn_scheme}://#{@cdn_host}:#{@cdn_port}", options[:persistent])
89
+ end
88
90
 
89
91
  storage_uri = URI.parse(credentials['X-Storage-Url'])
90
92
  @storage_host = storage_uri.host
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 26
9
- version: 0.2.26
8
+ - 27
9
+ version: 0.2.27
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-18 00:00:00 -07:00
17
+ date: 2010-08-19 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency