fog-softlayer 0.4.3 → 0.4.4
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzZiNjM4OTRiOTgzZjcxOWRjYjFkM2ZlYjE2NDIzMTExMmJlZWM4Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODI1MzFhZTI5ODAyNjU1YmMzM2JiMWM0M2UwYzg0MzUxMzhkNjBmMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjI1MTNlYjM2NmI1ZjU2YmUxMjY2MzVmMTNlMjA0YjMwMDZhZDBjZWEyODAw
|
10
|
+
YTU1Y2M4ZGZjNmQ5M2NmZGJjNmMxZTczMDAwZGQ5ZTQzNGU2MjNiNzdjYjc5
|
11
|
+
YTE2OWFkMzRmMmExNmQxNDI0MTA2MzZmMGUwY2JkYmU0Y2E4MWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWI1OTMxNWEyNWU4N2M5ZDVkYzBmNjhhZmIxYzU1M2NkOGJhNjc3NDRjODVh
|
14
|
+
N2VmMzAwZDQ0NzEwOTdlOTlmYzA5NWY1MWMwMzgxMWJkYmVhNjhlNzg2MmNm
|
15
|
+
MmE1MjQxMGVjMDA4YzFmZjgyMTQyYjRlYjBkOTk0NDVmNTc1M2E=
|
@@ -17,6 +17,7 @@ module Fog
|
|
17
17
|
|
18
18
|
attribute :bytes, :aliases => 'X-Container-Bytes-Used'
|
19
19
|
attribute :count, :aliases => 'X-Container-Object-Count'
|
20
|
+
attribute :public, :aliases => 'X-Container-Read'
|
20
21
|
|
21
22
|
def destroy
|
22
23
|
requires :key
|
@@ -45,7 +46,7 @@ module Fog
|
|
45
46
|
|
46
47
|
def save
|
47
48
|
requires :key
|
48
|
-
service.put_container(key)
|
49
|
+
service.put_container(key, @public)
|
49
50
|
true
|
50
51
|
end
|
51
52
|
|
@@ -2,7 +2,7 @@ module Fog
|
|
2
2
|
module Storage
|
3
3
|
class Softlayer
|
4
4
|
class Mock
|
5
|
-
def put_container(name)
|
5
|
+
def put_container(name, public=false)
|
6
6
|
@containers[name] = {} unless @containers[name]
|
7
7
|
response = Excon::Response.new
|
8
8
|
response.body = ''
|
@@ -18,12 +18,14 @@ module Fog
|
|
18
18
|
# ==== Parameters
|
19
19
|
# * name<~String> - Name for container, should be < 256 bytes and must not contain '/'
|
20
20
|
#
|
21
|
-
def put_container(name)
|
22
|
-
|
21
|
+
def put_container(name, public=false)
|
22
|
+
opts = {
|
23
23
|
:expects => [201, 202],
|
24
24
|
:method => 'PUT',
|
25
|
-
:path => Fog::Softlayer.escape(name)
|
26
|
-
|
25
|
+
:path => Fog::Softlayer.escape(name),
|
26
|
+
}
|
27
|
+
opts[:headers] = { 'X-Container-Read' => '.r:*' } if public
|
28
|
+
request(opts)
|
27
29
|
end
|
28
30
|
|
29
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-softlayer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Eldridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|