fog-softlayer 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmM2YjQyOGY4OTJhMGQxM2Y2NjMxOWM3OTI4MmQ4ZmQ1YWQ5YTVhZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTI0NzU5MzQ3OWNjYTliZmRlYzFiZjU5ZDc5NjEwYzBmNTFmYjVjNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWQ5ZmEzOGM0YTA0N2M2ZDVjYzE5ODMyM2ZmZmI3MTA0YzFlNjc5NTdiYzVh
|
10
|
+
MTcyZmYxYWE4YzZmNTQ3MGZmMjg1ZDU1ZGEwNzhhYzUxNWIzZTViNTY5MjI1
|
11
|
+
MDhmMjEzMmE1Y2Y4NmNiZTM5MjlkMWFhMzI5YWZiMGRjYzY1ODY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2YxYmE2OWQ4Yzg2NDY4MGFmYTM0NmQwYjc4ZGQ2ODk5N2RkMGFlZDNjOTRl
|
14
|
+
YjJkNDQxMmE3ZTNhMWRlNmVlOWUzOGU4MWQ0NGQxYjhmNjBlYWMwMThhYzRi
|
15
|
+
NjIzNTM3Y2M5MmUxOTdkZDQ5MTYxNDE0ODBmOWM3ODQyOTZkYTU=
|
@@ -23,11 +23,10 @@ module Fog
|
|
23
23
|
def get(key, options = {})
|
24
24
|
data = service.get_container(key, options)
|
25
25
|
directory = new(:key => key)
|
26
|
-
|
27
|
-
|
28
|
-
directory.merge_attributes(key => value)
|
29
|
-
end
|
26
|
+
keep_headers = data.headers.select do |k,v|
|
27
|
+
['X-Container-Bytes-Used', 'X-Container-Object-Count', 'X-Container-Read'].include?(k)
|
30
28
|
end
|
29
|
+
directory.merge_attributes(keep_headers)
|
31
30
|
directory.files.merge_attributes(options)
|
32
31
|
directory.files.instance_variable_set(:@loaded, true)
|
33
32
|
|
@@ -15,9 +15,9 @@ module Fog
|
|
15
15
|
|
16
16
|
identity :key, :aliases => 'name'
|
17
17
|
|
18
|
-
attribute :bytes,
|
19
|
-
attribute :count,
|
20
|
-
attribute :public,
|
18
|
+
attribute :bytes, :aliases => 'X-Container-Bytes-Used'
|
19
|
+
attribute :count, :aliases => 'X-Container-Object-Count'
|
20
|
+
attribute :public, :aliases => 'X-Container-Read'
|
21
21
|
|
22
22
|
def destroy
|
23
23
|
requires :key
|
@@ -37,16 +37,21 @@ module Fog
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def public=(new_public)
|
40
|
-
|
40
|
+
attributes[:public] = new_public
|
41
41
|
end
|
42
42
|
|
43
|
+
def public
|
44
|
+
!!attributes[:public]
|
45
|
+
end
|
46
|
+
alias_method :public?, :public
|
47
|
+
|
43
48
|
def public_url
|
44
49
|
raise NotImplementedError
|
45
50
|
end
|
46
51
|
|
47
52
|
def save
|
48
53
|
requires :key
|
49
|
-
service.put_container(key,
|
54
|
+
service.put_container(key, public)
|
50
55
|
true
|
51
56
|
end
|
52
57
|
|