From db0310f474bfae1b17c18bdea440717c9d108e7b Mon Sep 17 00:00:00 2001 From: Weston Platter Date: Sun, 13 Jan 2013 19:49:47 -0600 Subject: [PATCH] [docs::aws::storage] requests finished changing RDoc to Yard --- lib/fog/aws/requests/storage/put_object.rb | 41 +++++++++---------- .../aws/requests/storage/put_object_acl.rb | 36 ++++++++-------- .../aws/requests/storage/put_object_url.rb | 15 +++---- .../requests/storage/put_request_payment.rb | 8 ++-- lib/fog/aws/requests/storage/upload_part.rb | 25 +++++------ 5 files changed, 56 insertions(+), 69 deletions(-) diff --git a/lib/fog/aws/requests/storage/put_object.rb b/lib/fog/aws/requests/storage/put_object.rb index eb594351b..b1aded603 100644 --- a/lib/fog/aws/requests/storage/put_object.rb +++ b/lib/fog/aws/requests/storage/put_object.rb @@ -5,30 +5,27 @@ module Fog # Create an object in an S3 bucket # - # ==== Parameters - # * bucket_name<~String> - Name of bucket to create object in - # * object_name<~String> - Name of object to create - # * data<~File||String> - File or String to create object from - # * options<~Hash>: - # * 'Cache-Control'<~String> - Caching behaviour - # * 'Content-Disposition'<~String> - Presentational information for the object - # * 'Content-Encoding'<~String> - Encoding of object data - # * 'Content-Length'<~String> - Size of object in bytes (defaults to object.read.length) - # * 'Content-MD5'<~String> - Base64 encoded 128-bit MD5 digest of message - # * 'Content-Type'<~String> - Standard MIME type describing contents (defaults to MIME::Types.of.first) - # * 'Expires'<~String> - Cache expiry - # * 'x-amz-acl'<~String> - Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read'] - # * 'x-amz-storage-class'<~String> - Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data - # * "x-amz-meta-#{name}" - Headers to be returned with object, note total size of request without body must be less than 8 KB. + # @param bucket_name [String] Name of bucket to create object in + # @param object_name [String] Name of object to create + # @param data [File||String] File or String to create object from + # @param options [Hash] + # @option options Cache-Control [String] Caching behaviour + # @option options Content-Disposition [String] Presentational information for the object + # @option options Content-Encoding [String] Encoding of object data + # @option options Content-Length [String] Size of object in bytes (defaults to object.read.length) + # @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message + # @option options Content-Type [String] Standard MIME type describing contents (defaults to MIME::Types.of.first) + # @option options Expires [String] Cache expiry + # @option options x-amz-acl [String] Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read'] + # @option options x-amz-storage-class [String] Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data + # @option options x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB. # - # ==== Returns - # * response<~Excon::Response>: - # * headers<~Hash>: - # * 'ETag'<~String> - etag of new object - # - # ==== See Also - # http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html + # @return [Excon::Response] response: + # * headers [Hash]: + # * ETag [String] etag of new object # + # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html + def put_object(bucket_name, object_name, data, options = {}) data = Fog::Storage.parse_data(data) headers = data[:headers].merge!(options) diff --git a/lib/fog/aws/requests/storage/put_object_acl.rb b/lib/fog/aws/requests/storage/put_object_acl.rb index 5b151463b..091afe7e8 100644 --- a/lib/fog/aws/requests/storage/put_object_acl.rb +++ b/lib/fog/aws/requests/storage/put_object_acl.rb @@ -7,28 +7,26 @@ module Fog # Change access control list for an S3 object # - # ==== Parameters - # * bucket_name<~String> - name of bucket to modify - # * object_name<~String> - name of object to get access control list for - # * acl<~Hash>: - # * Owner<~Hash>: - # * ID<~String>: id of owner - # * DisplayName<~String>: display name of owner - # * AccessControlList<~Array>: - # * Grantee<~Hash>: - # * 'DisplayName'<~String> - Display name of grantee - # * 'ID'<~String> - Id of grantee + # @param bucket_name [String] name of bucket to modify + # @param object_name [String] name of object to get access control list for + # @param acl [Hash]: + # * Owner [Hash] + # * ID [String] id of owner + # * DisplayName [String] display name of owner + # * AccessControlList [Array] + # * Grantee [Hash] + # * DisplayName [String] Display name of grantee + # * ID [String] Id of grantee # or - # * 'EmailAddress'<~String> - Email address of grantee + # * EmailAddress [String] Email address of grantee # or - # * 'URI'<~String> - URI of group to grant access for - # * Permission<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP] - # * acl<~String> - Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read'] - # * options<~Hash>: - # * 'versionId'<~String> - specify a particular version to retrieve + # * URI [String] URI of group to grant access for + # * Permission [String] Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP] + # @param acl [String] Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read'] + # @param options [Hash] + # @option options versionId [String] specify a particular version to retrieve # - # ==== See Also - # http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUTacl.html + # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUTacl.html def put_object_acl(bucket_name, object_name, acl, options = {}) query = {'acl' => nil} diff --git a/lib/fog/aws/requests/storage/put_object_url.rb b/lib/fog/aws/requests/storage/put_object_url.rb index dafc2c03f..e2e6c1677 100644 --- a/lib/fog/aws/requests/storage/put_object_url.rb +++ b/lib/fog/aws/requests/storage/put_object_url.rb @@ -25,17 +25,14 @@ module Fog # Get an expiring object url from S3 for putting an object # - # ==== Parameters - # * bucket_name<~String> - Name of bucket containing object - # * object_name<~String> - Name of object to get expiring url for - # * expires<~Time> - An expiry time for this url + # @param bucket_name [String] Name of bucket containing object + # @param object_name [String] Name of object to get expiring url for + # @param expires [Time] An expiry time for this url # - # ==== Returns - # * response<~Excon::Response>: - # * body<~String> - url for object + # @return [Excon::Response] response: + # * body [String] url for object # - # ==== See Also - # http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html + # @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html include PutObjectUrl diff --git a/lib/fog/aws/requests/storage/put_request_payment.rb b/lib/fog/aws/requests/storage/put_request_payment.rb index 4a8db461f..86b4ec9ad 100644 --- a/lib/fog/aws/requests/storage/put_request_payment.rb +++ b/lib/fog/aws/requests/storage/put_request_payment.rb @@ -5,12 +5,10 @@ module Fog # Change who pays for requests to an S3 bucket # - # ==== Parameters - # * bucket_name<~String> - name of bucket to modify - # * payer<~String> - valid values are BucketOwner or Requester + # @param bucket_name [String] name of bucket to modify + # @param payer [String] valid values are BucketOwner or Requester # - # ==== See Also - # http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html + # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html def put_request_payment(bucket_name, payer) data = diff --git a/lib/fog/aws/requests/storage/upload_part.rb b/lib/fog/aws/requests/storage/upload_part.rb index 5c9fa74db..3ffeace8f 100644 --- a/lib/fog/aws/requests/storage/upload_part.rb +++ b/lib/fog/aws/requests/storage/upload_part.rb @@ -5,22 +5,19 @@ module Fog # Upload a part for a multipart upload # - # ==== Parameters - # * bucket_name<~String> - Name of bucket to add part to - # * object_name<~String> - Name of object to add part to - # * upload_id<~String> - Id of upload to add part to - # * part_number<~String> - Index of part in upload - # * data<~File||String> - Content for part - # * options<~Hash>: - # * 'Content-MD5'<~String> - Base64 encoded 128-bit MD5 digest of message + # @param bucket_name [String] Name of bucket to add part to + # @param object_name [String] Name of object to add part to + # @param upload_id [String] Id of upload to add part to + # @param part_number [String] Index of part in upload + # @param data [File||String] Content for part + # @param options [Hash] + # @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message # - # ==== Returns - # * response<~Excon::Response>: - # * headers<~Hash>: - # * 'ETag'<~String> - etag of new object (will be needed to complete upload) + # @return [Excon::Response] response + # * headers [Hash]: + # * ETag [String] etag of new object (will be needed to complete upload) # - # ==== See Also - # http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html + # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html # def upload_part(bucket_name, object_name, upload_id, part_number, data, options = {}) data = Fog::Storage.parse_data(data)