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

[s3] move options stuff to correct place in files

This commit is contained in:
geemus (Wesley Beary) 2010-03-30 21:04:27 -07:00
parent 910be17f1c
commit 2cb4b7a249

View file

@ -16,6 +16,13 @@ module Fog
model Fog::AWS::S3::File
def all(options = {})
options = {
'delimiter' => @delimiter,
'marker' => @marker,
'max-keys' => @max_keys,
'prefix' => @prefix
}.merge!(options)
options = options.reject {|key,value| value.nil? || value.to_s.empty?}
merge_attributes(options)
parent = directory.collection.get(
directory.name,
@ -33,13 +40,6 @@ module Fog
end
def get(key, options = {}, &block)
options = {
'delimiter' => @delimiter,
'marker' => @marker,
'max-keys' => @max_keys,
'prefix' => @prefix
}.merge!(options)
options = options.reject {|key,value| value.nil? || value.to_s.empty?}
data = connection.get_object(directory.name, key, options, &block)
file_data = {
:body => data.body,