fog 0.2.26 → 0.2.27
Sign up to get free protection for your applications and to get access to all the features.
- data/fog.gemspec +2 -2
- data/lib/fog.rb +1 -1
- data/lib/fog/rackspace.rb +3 -2
- data/lib/fog/rackspace/files.rb +8 -6
- metadata +3 -3
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.
|
11
|
-
s.date = '2010-08-
|
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
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
|
-
|
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 =>
|
18
|
+
:host => rackspace_auth_url,
|
18
19
|
:method => 'GET',
|
19
20
|
:path => 'v1.0'
|
20
21
|
})
|
data/lib/fog/rackspace/files.rb
CHANGED
@@ -79,12 +79,14 @@ module Fog
|
|
79
79
|
credentials = Fog::Rackspace.authenticate(options)
|
80
80
|
@auth_token = credentials['X-Auth-Token']
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
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
|
-
-
|
9
|
-
version: 0.2.
|
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-
|
17
|
+
date: 2010-08-19 00:00:00 -07:00
|
18
18
|
default_executable: fog
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|