module FakeAWS::S3::Responses::Common
Useful things for generating responses to S3
requests.
Public Instance Methods
common_headers()
click to toggle source
Headers which should be included in all S3
responses.
# File lib/fake_aws/s3/responses/common.rb, line 11 def common_headers { "Date" => Time.now.httpdate, "Server" => "AmazonS3", "x-amz-request-id" => request_id } end
to_rack_response()
click to toggle source
# File lib/fake_aws/s3/responses/common.rb, line 19 def to_rack_response [ status_code, headers, body ] end
Protected Instance Methods
request_id()
click to toggle source
# File lib/fake_aws/s3/responses/common.rb, line 29 def request_id @request_id ||= SecureRandom.hex(8) end