johnnyhalife / waz-storage

A simple implementation of Windows Azure Storage API for Ruby, inspired by the S3 gems and self experience of dealing with queues. The major goal of the whole gem is to enable ruby developers [like me =)] to leverage Windows Azure Storage features and have another option for cloud storage.
http://waz-storage.heroku.com
MIT License
40 stars 21 forks source link

Container#public_access= throws NoMethodError when using true #15

Closed MikeEmery closed 12 years ago

MikeEmery commented 12 years ago
c.public_access = true
NoMethodError: undefined method `strip' for true:TrueClass
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:54:in `block in canonicalize_headers'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:54:in `map'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:54:in `canonicalize_headers'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:97:in `generate_signature20090919'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:71:in `generate_signature'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:32:in `generate_request'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:117:in `execute'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/blobs/service.rb:42:in `set_container_acl'
from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/blobs/container.rb:105:in `public_access='
johnnyhalife commented 12 years ago

mmmm, sadly I didn't test it on ruby-1.9.2

try setting c.public_access = "true"

On Mon, Mar 26, 2012 at 10:56 PM, Mike Emery < reply@reply.github.com

wrote:

c.public_access = true NoMethodError: undefined method strip' for true:TrueClass from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:54:in block in canonicalize_headers' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:54:in map' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:54:in canonicalize_headers' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:97:in generate_signature20090919' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:71:in generate_signature' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:32:in generate_request' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:117:in execute' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/blobs/service.rb:42:in set_container_acl' from /Users/mike/.rvm/gems/ruby-1.9.2-p290/gems/waz-storage-1.1.1/lib/waz/blobs/container.rb:105:in public_access='


Reply to this email directly or view it on GitHub: https://github.com/johnnyhalife/waz-storage/issues/15

MikeEmery commented 12 years ago

Still doesn't work, but with a different error.

c.public_access = "true"
RestClient::BadRequest: 400 Bad Request
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
  from /Users/mike/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:627:in `start'
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:118:in `execute'
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/waz-storage-1.1.1/lib/waz/blobs/service.rb:42:in `set_container_acl'
  from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/waz-storage-1.1.1/lib/waz/blobs/container.rb:105:in `public_access='
johnnyhalife commented 12 years ago

Ok, some time ago there's a change on how do we manage the permissions, try public_access=WAZ::Blobs::BlobSecurity::Private or public_access=WAZ:: Blobs::BlobSecurity::Container or public_access=WAZ::Blobs::BlobSecurity:: Blob

You can read more about this permissions on

Beginning with the 2009-09-19 version, the container permissions provide the following options for managing container access:

This changed and was received through a contribution hence I didn't have this in mind, sorry about the round trip. More info at http://msdn.microsoft.com/en-us/library/windowsazure/dd179391.aspx

On Mon, Mar 26, 2012 at 11:27 PM, Mike Emery < reply@reply.github.com

wrote:

Still doesn't work, but with a different error.

RestClient::BadRequest: 400 Bad Request from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in return!' from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in process_result' from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in block in transmit' from /Users/mike/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:627:in start' from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in transmit' from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in execute' from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/waz-storage-1.1.1/lib/waz/storage/core_service.rb:118:in execute' from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/waz-storage-1.1.1/lib/waz/blobs/service.rb:42:in set_container_acl' from /Users/mike/.rvm/gems/ruby-1.9.2-p290@/gems/waz-storage-1.1.1/lib/waz/blobs/container.rb:105:in `public_access='


Reply to this email directly or view it on GitHub: https://github.com/johnnyhalife/waz-storage/issues/15#issuecomment-4708592

MikeEmery commented 12 years ago

No problem, thanks for the help.