mini_portile 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/History.txt +5 -0
  2. data/Rakefile +1 -1
  3. data/lib/mini_portile.rb +6 -2
  4. metadata +1 -1
@@ -1,3 +1,8 @@
1
+ === 0.4.1 / 2012-10-24
2
+
3
+ * Bugfixes:
4
+ * Syntax to process FTp binary chunks differs between Ruby 1.8.7 and 1.9.x
5
+
1
6
  === 0.4.0 / 2012-10-24
2
7
 
3
8
  * Enhancements:
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require "rubygems/package_task"
4
4
  GEM_SPEC = Gem::Specification.new do |s|
5
5
  # basic information
6
6
  s.name = "mini_portile"
7
- s.version = "0.4.0"
7
+ s.version = "0.4.1"
8
8
  s.platform = Gem::Platform::RUBY
9
9
 
10
10
  # description and details
@@ -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, nil, 8192) do |chunk|
328
- temp_file << chunk
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_portile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: