fog-brightbox 0.4.0 → 0.4.1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf1a1d6f31feee79821fe5e360ce118a31383b6d
|
4
|
+
data.tar.gz: c3db5c301809e5ed976a244331472bf0eecdd53a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad5985ef503df48c4465c26abaa3b565fcb6ecf98a3adbaaccbc55c2cd876265ddb73f8cccd2f8fdb481a36c85209ca63e0da0b0e8095c2904b0851cdb705a62
|
7
|
+
data.tar.gz: cf4f4ecb450b41baab841de773bc6339d34f36f42a30a5c2c00621ceda041ad7a479b45d4b026c59d34e096c072e890da5976e30c80242171e1a659242b3def5
|
data/CHANGELOG.md
CHANGED
data/lib/fog/brightbox/config.rb
CHANGED
@@ -89,7 +89,7 @@ module Fog
|
|
89
89
|
alias_method :api_url, :compute_url
|
90
90
|
|
91
91
|
def storage_url
|
92
|
-
URI.parse(@options[:brightbox_storage_url] || "https://
|
92
|
+
URI.parse(@options[:brightbox_storage_url] || "https://orbit.brightbox.com")
|
93
93
|
end
|
94
94
|
|
95
95
|
def storage_management_url
|
@@ -5,9 +5,9 @@ require "fog/brightbox"
|
|
5
5
|
describe Fog::Brightbox::Storage::AuthenticationRequest do
|
6
6
|
describe "when initialised with blank config" do
|
7
7
|
before do
|
8
|
-
stub_request(:get, "https://
|
8
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").
|
9
9
|
with(:headers => {
|
10
|
-
"Host" => "
|
10
|
+
"Host" => "orbit.brightbox.com:443",
|
11
11
|
"X-Auth-User" => "",
|
12
12
|
"X-Auth-Key" => ""
|
13
13
|
}).to_return(:status => 412, :body => "Bad URL", :headers => {})
|
@@ -23,13 +23,13 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
23
23
|
|
24
24
|
describe "when initialised with API client details" do
|
25
25
|
before do
|
26
|
-
stub_request(:get, "https://
|
26
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").
|
27
27
|
with(:headers => {
|
28
|
-
"Host" => "
|
28
|
+
"Host" => "orbit.brightbox.com:443",
|
29
29
|
"X-Auth-User" => "cli-12345",
|
30
30
|
"X-Auth-Key" => "12345"
|
31
31
|
}).to_return(:status => 200, :body => "Authenticated", :headers => {
|
32
|
-
"X-Storage-Url" => "https://
|
32
|
+
"X-Storage-Url" => "https://orbit.brightbox.com/v1/acc-12345",
|
33
33
|
"X-Storage-Token" => "abcdefghijklmnopqrstuvwxyz1234567890",
|
34
34
|
"X-Auth-Token" => "abcdefghijklmnopqrstuvwxyz1234567890",
|
35
35
|
"Content-Type" => "text/plain"
|
@@ -49,13 +49,13 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
49
49
|
|
50
50
|
describe "when initialised with user details" do
|
51
51
|
before do
|
52
|
-
stub_request(:get, "https://
|
52
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").
|
53
53
|
with(:headers => {
|
54
|
-
"Host" => "
|
54
|
+
"Host" => "orbit.brightbox.com:443",
|
55
55
|
"X-Auth-User" => "user@example.com",
|
56
56
|
"X-Auth-Key" => "abcde"
|
57
57
|
}).to_return(:status => 200, :body => "Authenticated", :headers => {
|
58
|
-
"X-Storage-Url" => "https://
|
58
|
+
"X-Storage-Url" => "https://orbit.brightbox.com/v1/acc-12345",
|
59
59
|
"X-Storage-Token" => "abcdefghijklmnopqrstuvwxyz1234567890",
|
60
60
|
"X-Auth-Token" => "abcdefghijklmnopqrstuvwxyz1234567890",
|
61
61
|
"Content-Type" => "text/plain"
|
@@ -8,7 +8,7 @@ describe Fog::Storage::Brightbox do
|
|
8
8
|
:status => 200,
|
9
9
|
:body => "Authenticated",
|
10
10
|
:headers => {
|
11
|
-
"X-Storage-Url"=>"https://
|
11
|
+
"X-Storage-Url"=>"https://orbit.brightbox.com:443/v1/acc-12345",
|
12
12
|
"Content-Length"=>"13",
|
13
13
|
"X-Storage-Token"=>"c1236c8c34d668df497c06075d8a76a79c6fdd0d",
|
14
14
|
"Content-Type"=>"text/plain",
|
@@ -64,7 +64,7 @@ describe Fog::Storage::Brightbox do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
before do
|
67
|
-
stub_request(:get, "https://
|
67
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").to_return(valid_auth_response)
|
68
68
|
end
|
69
69
|
|
70
70
|
it "requires a call to authenticate" do
|
@@ -77,7 +77,7 @@ describe Fog::Storage::Brightbox do
|
|
77
77
|
|
78
78
|
it "can authenticate" do
|
79
79
|
service.authenticate
|
80
|
-
assert_equal "https://
|
80
|
+
assert_equal "https://orbit.brightbox.com/v1/acc-12345", service.management_url.to_s
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -99,7 +99,7 @@ describe Fog::Storage::Brightbox do
|
|
99
99
|
"Date"=>"Tue, 22 Apr 2014 14:53:54 GMT"},
|
100
100
|
:status=>412
|
101
101
|
}
|
102
|
-
stub_request(:get, "https://
|
102
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").to_return(response)
|
103
103
|
|
104
104
|
service.authenticate
|
105
105
|
assert_nil service.management_url
|
@@ -118,7 +118,7 @@ describe Fog::Storage::Brightbox do
|
|
118
118
|
end
|
119
119
|
|
120
120
|
before do
|
121
|
-
stub_request(:get, "https://
|
121
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").to_return(valid_auth_response)
|
122
122
|
end
|
123
123
|
|
124
124
|
it "uses the configured account" do
|
@@ -138,7 +138,7 @@ describe Fog::Storage::Brightbox do
|
|
138
138
|
end
|
139
139
|
|
140
140
|
before do
|
141
|
-
stub_request(:get, "https://
|
141
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").to_return(valid_auth_response)
|
142
142
|
end
|
143
143
|
|
144
144
|
it "extracts the account from the management URL" do
|
@@ -186,7 +186,7 @@ describe Fog::Storage::Brightbox do
|
|
186
186
|
end
|
187
187
|
|
188
188
|
it "keeps setting after authentication" do
|
189
|
-
stub_request(:get, "https://
|
189
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").to_return(valid_auth_response)
|
190
190
|
config.expire_tokens!
|
191
191
|
service.authenticate
|
192
192
|
assert_equal "https://files.gb2.brightbox.com/v1/acc-12345", service.management_url.to_s
|
@@ -271,11 +271,11 @@ describe Fog::Storage::Brightbox do
|
|
271
271
|
|
272
272
|
before do
|
273
273
|
# Initial authentication
|
274
|
-
stub_request(:get, "https://
|
274
|
+
stub_request(:get, "https://orbit.brightbox.com/v1").
|
275
275
|
with(:headers => {"X-Auth-Key" => "12345", "X-Auth-User" => "cli-12345"}).
|
276
276
|
to_return(valid_auth_response)
|
277
277
|
|
278
|
-
stub_request(:get, "https://
|
278
|
+
stub_request(:get, "https://orbit.brightbox.com/v1/acc-12345/fnord").
|
279
279
|
with(:headers => { "X-Auth-Token" => "c1236c8c34d668df497c06075d8a76a79c6fdd0d" }).
|
280
280
|
to_return(:status => 200)
|
281
281
|
end
|