[s3] fix mock to read data from files that are passed

This commit is contained in:
geemus 2010-05-25 10:37:14 -07:00
parent 4577e2d093
commit c4d20a7e83
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ module Fog
def put_object(bucket_name, object_name, data, options = {})
data = Fog::AWS::S3.parse_data(data)
unless data[:body].is_a?(String)
data[:body] = data[:body].read
end
response = Excon::Response.new
if (bucket = @data[:buckets][bucket_name])
response.status = 200