lib/client.rb in cloudfiles-1.5.0 vs lib/client.rb in cloudfiles-1.5.0.1

- old
+ new

@@ -32,20 +32,17 @@ end class ChunkedConnectionWrapper def initialize(data, chunk_size) @size = chunk_size - if data.respond_to? :read - @file = data - end + @file = data end def read(foo) - if @file - @file.read(@size) - end + @file.read(@size) end + def eof! @file.eof! end def eof? @file.eof? @@ -507,12 +504,13 @@ def head_object(container, name) _retry(nil, :head_object, [container, name]) end def self.put_object(url, token=nil, container=nil, name=nil, contents=nil, - content_length=nil, etag=nil, chunk_size=65536, + content_length=nil, etag=nil, chunk_size=nil, content_type=nil, headers={}, http_conn=nil, proxy=nil) + chunk_size ||= 65536 if not http_conn http_conn = http_connection(url) end parsed = http_conn[0].clone conn = http_conn[1] @@ -615,6 +613,6 @@ end def delete_object(container, name, headers={}) _retry(nil, :delete_object, [container, name, headers]) end -end \ No newline at end of file +end