lib/simple_aws/s3.rb in simple_aws-1.1.0 vs lib/simple_aws/s3.rb in simple_aws-1.2.0

- old
+ new

@@ -12,41 +12,41 @@ # GET, PUT, DELETE, POST and HEAD. When sending a request, follow exactly what # is described in the AWS API docs in the link above. # # So "GET Service" is # - # s3.get "/" + # s3.get "/" # # When working with a specific bucket, pass in :bucket after the path: # - # s3.get "/", :bucket => "bucket_name" + # s3.get "/", :bucket => "bucket_name" # - # s3.get "/?policy", :bucket => "bucket_name" + # s3.get "/?policy", :bucket => "bucket_name" # # For requests that need extra parameters, use the :params option: # - # s3.get "/object/name", :bucket => "bucket_name", :params => { - # "response-content-disposition" => "attachment" - # } + # s3.get "/object/name", :bucket => "bucket_name", :params => { + # "response-content-disposition" => "attachment" + # } # # Also use params in the cases that AWS asks for form fields, such as # "POST Object". # # A lot of S3 communication happens through request and response headers. # To specify a certian set of headers on the request, use :headers: # - # s3.get "/", :bucket => "bucket_name", :headers => { - # "x-amz-security-token" => "security string" - # } + # s3.get "/", :bucket => "bucket_name", :headers => { + # "x-amz-security-token" => "security string" + # } # # Many of the PUT requests require a body of some sort, sometimes XML, # sometimes JSON, and other times the raw file data. Use :body for this # information. :body is expected to be either a String containing the XML or # JSON information, or an object that otherwise response to #read for file # uploads. This API does not build XML or JSON for you right now. # - # s3.put "/object/name.txt", :bucket => "bucket_name", :body => File.open() + # s3.put "/object/name.txt", :bucket => "bucket_name", :body => File.open() # # This API does ensure that file data is uploaded as efficiently as possible, # streaming file data from disc to AWS without blowing up memory. If the # Content-Type header is not specified, it will be defaulted to application/octet-stream # @@ -56,13 +56,13 @@ # That is up to you to implement at this time, by running a HEAD to get # Content-Length then repeated GETs using the "Range:bytes" header to specify # which parts to download next. You can see an example of this in samples/s3_batch_download.rb. # # Quality of Life note: if you forget the leading / (forward slash) in the path - # of a resource when# working with a bucket, this library will recognize this and + # of a resource when# working with a bucket, this library will catch the omission and # fix the path for you. Thus, the following is also a valid call: # - # s3.put "object/name.txt", :bucket => "bucket_name", :body => File.open() + # s3.put "object/name.txt", :bucket => "bucket_name", :body => File.open() # # Raw file data in a response will be available in the #body method on the Response # returned by the method call. ## class S3 < API