fixes for CHUNK_SIZE constant location and readme. Thanks indirect

This commit is contained in:
Wesley Beary 2009-12-18 18:13:46 -08:00
parent 2bbb67267a
commit 8cab3723a8
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ fog helps you interact with cloud services. fog is a work in progress.
# models
bucket = s3.buckets.create(:name => 'bucketname')
bucket.objects.create(:name => 'objectname', :body => 'objectbody')
bucket.objects.create(:key => 'objectname', :body => 'objectbody')
bucket = s3.buckets.get('bucketname')
object = bucket.objects.get('objectname')

View File

@ -101,9 +101,9 @@ else
data = StringIO.new(object[:body])
remaining = data.length
while remaining > 0
chunk = data.read([remaining, Fog::Connection::CHUNK_SIZE].min)
chunk = data.read([remaining, Excon::CHUNK_SIZE].min)
block.call(chunk)
remaining -= Fog::Connection::CHUNK_SIZE
remaining -= Excon::CHUNK_SIZE
end
end
end