mini_portile 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -0
- data/Rakefile +1 -1
- data/lib/mini_portile.rb +6 -2
- metadata +1 -1
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/lib/mini_portile.rb
CHANGED
@@ -324,8 +324,12 @@ private
|
|
324
324
|
remote_dir = File.dirname(uri.path)
|
325
325
|
ftp.chdir(remote_dir) unless remote_dir == '.'
|
326
326
|
total = ftp.size(filename)
|
327
|
-
ftp.getbinaryfile(filename,
|
328
|
-
|
327
|
+
ftp.getbinaryfile(filename, temp_file.path, 8192) do |chunk|
|
328
|
+
# Ruby 1.8.7 already wrote the chunk into the file
|
329
|
+
unless RUBY_VERSION < "1.9"
|
330
|
+
temp_file << chunk
|
331
|
+
end
|
332
|
+
|
329
333
|
size += chunk.size
|
330
334
|
new_progress = (size * 100) / total
|
331
335
|
unless new_progress == progress
|