2potatocakes/google_storage — pull request #16 by karlentwistle (2012-12-07 10:20:39+00:00)
Title: Whiny nil Authorization Header

The presence of @access_token is required or else the program returns

1.9.3-p327 :003 > client.list_buckets
TypeError: can't convert nil into String
from /home/karl/.rvm/gems/ruby-1.9.3-p327/gems/google_storage-0.2.0/lib/google_storage/request.rb:40:in `+'
from /home/karl/.rvm/gems/ruby-1.9.3-p327/gems/google_storage-0.2.0/lib/google_storage/request.rb:40:in `construct_http_request'
from /home/karl/.rvm/gems/ruby-1.9.3-p327/gems/google_storage-0.2.0/lib/google_storage/client.rb:161:in `http_request'
from /home/karl/.rvm/gems/ruby-1.9.3-p327/gems/google_storage-0.2.0/lib/google_storage/client.rb:124:in `get'
from /home/karl/.rvm/gems/ruby-1.9.3-p327/gems/google_storage-0.2.0/lib/google_storage/bucket.rb:16:in `list_buckets'
from (irb):3
from /home/karl/.rvm/rubies/ruby-1.9.3-p327/bin/irb:16:in `

'

With this patch applied it returns

1.9.3-p327 :003 > client.list_buckets
=> {"Error"=>{"Code"=>"AuthenticationRequired", "Message"=>"Authentication required."}}

Hope married life is treating you well.

Thanks
-Karl