waz-storage 1.1.0 → 1.1.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.
@@ -100,7 +100,7 @@ module WAZ
100
100
  self.class.service_instance.get_container_acl(self.name)
101
101
  end
102
102
 
103
- # Sets a value indicating whether the container is public accessible (i.e. from a Web Browser) or not.
103
+ # Sets a value indicating whether the container is public accessible (i.e. from a Web Browser) or not.
104
104
  def public_access=(value)
105
105
  self.class.service_instance.set_container_acl(self.name, value)
106
106
  end
@@ -151,5 +151,10 @@ module WAZ
151
151
  end
152
152
  end
153
153
  end
154
+ class BlobSecurity
155
+ Container = 'container'
156
+ Blob = 'blob'
157
+ Private = ''
158
+ end
154
159
  end
155
160
  end
@@ -28,7 +28,7 @@ module WAZ
28
28
  # accessible or not.
29
29
  def get_container_acl(container_name)
30
30
  headers = execute(:get, container_name, { :restype => 'container', :comp => 'acl' }, {:x_ms_version => '2009-09-19'}).headers
31
- headers[:x_ms_prop_publicaccess].downcase == true.to_s
31
+ headers[:x_ms_blob_public_access]
32
32
  end
33
33
 
34
34
  # Sets the value of the :x_ms_prop_publicaccess header from the
@@ -36,8 +36,10 @@ module WAZ
36
36
  # accessible or not.
37
37
  #
38
38
  # Default is _false_
39
- def set_container_acl(container_name, public_available = false)
40
- execute :put, container_name, { :restype => 'container', :comp => 'acl' }, { :x_ms_prop_publicaccess => public_available.to_s, :x_ms_version => '2009-09-19' }
39
+ def set_container_acl(container_name, public_available = WAZ::Blobs::BlobSecurity::Private)
40
+ publicity = {:x_ms_version => '2009-09-19' }
41
+ publicity[:x_ms_blob_public_access] = public_available unless public_available == WAZ::Blobs::BlobSecurity::Private
42
+ execute :put, container_name, { :restype => 'container', :comp => 'acl' }, publicity
41
43
  end
42
44
 
43
45
  # Lists all the containers existing on the current storage account.
@@ -3,7 +3,7 @@ module WAZ
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = '1'
5
5
  MINOR = '1'
6
- TINY = '0'
6
+ TINY = '1'
7
7
  end
8
8
 
9
9
  Version = [VERSION::MAJOR, VERSION::MINOR, VERSION::TINY].compact * '.'
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waz-storage
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 1
9
- - 0
10
- version: 1.1.0
8
+ - 1
9
+ version: 1.1.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Johnny G. Halife
@@ -15,18 +14,16 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-06-29 00:00:00 -03:00
17
+ date: 2011-09-27 00:00:00 -03:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: rest-client
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 3
30
27
  segments:
31
28
  - 0
32
29
  version: "0"
@@ -36,11 +33,9 @@ dependencies:
36
33
  name: ruby-hmac
37
34
  prerelease: false
38
35
  requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
37
  - - ">="
42
38
  - !ruby/object:Gem::Version
43
- hash: 3
44
39
  segments:
45
40
  - 0
46
41
  version: "0"
@@ -90,27 +85,23 @@ rdoc_options:
90
85
  require_paths:
91
86
  - lib
92
87
  required_ruby_version: !ruby/object:Gem::Requirement
93
- none: false
94
88
  requirements:
95
89
  - - ">="
96
90
  - !ruby/object:Gem::Version
97
- hash: 3
98
91
  segments:
99
92
  - 0
100
93
  version: "0"
101
94
  required_rubygems_version: !ruby/object:Gem::Requirement
102
- none: false
103
95
  requirements:
104
96
  - - ">="
105
97
  - !ruby/object:Gem::Version
106
- hash: 3
107
98
  segments:
108
99
  - 0
109
100
  version: "0"
110
101
  requirements: []
111
102
 
112
103
  rubyforge_project:
113
- rubygems_version: 1.5.0
104
+ rubygems_version: 1.3.6
114
105
  signing_key:
115
106
  specification_version: 3
116
107
  summary: Client library for Windows Azure's Storage Service REST API