fog-softlayer 0.4.3 → 0.4.4

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
- OWI0MDEwOWYyODMxYzdhNmNmZTJlN2ZlNjU4ODNmYjU5MjQ2YThkNw==
4
+ NzZiNjM4OTRiOTgzZjcxOWRjYjFkM2ZlYjE2NDIzMTExMmJlZWM4Ng==
5
5
  data.tar.gz: !binary |-
6
- NGQ1YzQ3ZDhlZTdmN2E0ZjJjNjk5MjA1M2VjMjBlMzU4NzAwOTJmNA==
6
+ ODI1MzFhZTI5ODAyNjU1YmMzM2JiMWM0M2UwYzg0MzUxMzhkNjBmMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjI0YTdiNTk4ZTkzNjI1ODRmMzFhOTdjNTRmNzk5ZGJkZGQ3NGIwZjM1Zjk1
10
- NjRhNTBiYzU4MDExZWM5Y2EyNzk5ZGE0ODg1MzM4YzhhYWY2MzBjNjNiZDUy
11
- ODcwYWFiMTYxMjY0ODU5OWQwZGZjM2JhZTQxYWMzNmY2OWJjODg=
9
+ MjI1MTNlYjM2NmI1ZjU2YmUxMjY2MzVmMTNlMjA0YjMwMDZhZDBjZWEyODAw
10
+ YTU1Y2M4ZGZjNmQ5M2NmZGJjNmMxZTczMDAwZGQ5ZTQzNGU2MjNiNzdjYjc5
11
+ YTE2OWFkMzRmMmExNmQxNDI0MTA2MzZmMGUwY2JkYmU0Y2E4MWU=
12
12
  data.tar.gz: !binary |-
13
- MGMzZDY2MmY1Y2I4ZTIzMjlmZWEzYmY2NzMyMTE2ODZlYTRkYjg3YmNiNWM1
14
- MzMwNTMwNGVhZDEwM2NmMDIzY2JjYzNlZmY3YTg1NWRiOWY3ZjAzYzI1ZGY1
15
- ZTYxNTgzNGYwZWY3YWZkOGJiYzdjZjVmYjY5NDhkNzY1MDE2NTU=
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
- request(
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
@@ -7,6 +7,6 @@
7
7
 
8
8
  module Fog
9
9
  module Softlayer
10
- VERSION = "0.4.3"
10
+ VERSION = "0.4.4"
11
11
  end
12
12
  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.3
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-09 00:00:00.000000000 Z
11
+ date: 2015-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core