1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

formatting cleanup

This commit is contained in:
Wesley Beary 2009-08-16 11:44:50 -07:00
parent 7e89914f1f
commit 1f6df7083f
12 changed files with 66 additions and 66 deletions

View file

@ -28,12 +28,12 @@ unless Fog.mocking?
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge!(options)
request({
:expects => 200,
:headers => headers,
:host => "#{target_bucket_name}.#{@host}",
:method => 'PUT',
:parser => Fog::Parsers::AWS::S3::CopyObject.new,
:path => target_object_name
:expects => 200,
:headers => headers,
:host => "#{target_bucket_name}.#{@host}",
:method => 'PUT',
:parser => Fog::Parsers::AWS::S3::CopyObject.new,
:path => target_object_name
})
end

View file

@ -14,10 +14,10 @@ unless Fog.mocking?
# * status<~Integer> - 204
def delete_bucket(bucket_name)
request({
:expects => 204,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'DELETE'
:expects => 204,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'DELETE'
})
end

View file

@ -15,11 +15,11 @@ unless Fog.mocking?
# * status<~Integer> - 204
def delete_object(bucket_name, object_name)
request({
:expects => 204,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'DELETE',
:path => object_name
:expects => 204,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'DELETE',
:path => object_name
})
end

View file

@ -40,12 +40,12 @@ unless Fog.mocking?
end
query.chop!
request({
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetBucket.new,
:query => query
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetBucket.new,
:query => query
})
end

View file

@ -15,12 +15,12 @@ unless Fog.mocking?
# * 'LocationConstraint'<~String> - Location constraint of the bucket
def get_bucket_location(bucket_name)
request({
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetBucketLocation.new,
:query => 'location'
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetBucketLocation.new,
:query => 'location'
})
end

View file

@ -29,11 +29,11 @@ unless Fog.mocking?
headers['If-Unmodified-Since'] = options['If-Unmodified-Since'].utc.strftime("%a, %d %b %Y %H:%M:%S +0000") if options['If-Modified-Since']
headers.merge!(options)
request({
:expects => 200,
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:path => object_name
:expects => 200,
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:path => object_name
})
end

View file

@ -15,12 +15,12 @@ unless Fog.mocking?
# * 'Payer'<~String> - Specifies who pays for download and requests
def get_request_payment(bucket_name)
request({
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetRequestPayment.new,
:query => 'requestPayment'
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetRequestPayment.new,
:query => 'requestPayment'
})
end

View file

@ -17,12 +17,12 @@ unless Fog.mocking?
# * 'ID'<~String> - Id of bucket owner
def get_service
request({
:expects => 200,
:headers => {},
:host => @host,
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetService.new,
:url => @host
:expects => 200,
:headers => {},
:host => @host,
:method => 'GET',
:parser => Fog::Parsers::AWS::S3::GetService.new,
:url => @host
})
end

View file

@ -30,11 +30,11 @@ unless Fog.mocking?
headers['If-Unmodified-Since'] = options['If-Unmodified-Since'].utc.strftime("%a, %d %b %Y %H:%M:%S +0000") if options['If-Modified-Since']
headers.merge!(options)
request({
:expects => 200,
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:method => 'HEAD',
:path => object_name
:expects => 200,
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:method => 'HEAD',
:path => object_name
})
end

View file

@ -26,11 +26,11 @@ unless Fog.mocking?
data = nil
end
request({
:expects => 200,
:body => data,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'PUT'
:expects => 200,
:body => data,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'PUT'
})
end

View file

@ -28,12 +28,12 @@ unless Fog.mocking?
file = parse_file(object)
headers = file[:headers].merge!(options)
request({
:body => file[:body],
:expects => 200,
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:method => 'PUT',
:path => object_name
:body => file[:body],
:expects => 200,
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:method => 'PUT',
:path => object_name
})
end

View file

@ -17,12 +17,12 @@ unless Fog.mocking?
</RequestPaymentConfiguration>
DATA
request({
:body => data,
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'PUT',
:query => "requestPayment"
:body => data,
:expects => 200,
:headers => {},
:host => "#{bucket_name}.#{@host}",
:method => 'PUT',
:query => "requestPayment"
})
end