You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/10/17 21:20:36 UTC

svn commit: r705726 - /incubator/buildr/trunk/lib/buildr/core/transports.rb

Author: assaf
Date: Fri Oct 17 12:20:36 2008
New Revision: 705726

URL: http://svn.apache.org/viewvc?rev=705726&view=rev
Log:
Changed from File.move to FileUtils.mv, since the first is introduced by ftools, which is not loaded until after we load RubyZip.

Modified:
    incubator/buildr/trunk/lib/buildr/core/transports.rb

Modified: incubator/buildr/trunk/lib/buildr/core/transports.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/core/transports.rb?rev=705726&r1=705725&r2=705726&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/core/transports.rb (original)
+++ incubator/buildr/trunk/lib/buildr/core/transports.rb Fri Oct 17 12:20:36 2008
@@ -22,9 +22,10 @@
 gem 'net-ssh' ; Net.autoload :SSH, 'net/ssh'
 gem 'net-sftp' ; Net.autoload :SFTP, 'net/sftp'
 autoload :CGI, 'cgi'
-autoload :Digest, 'digest'
 autoload :StringIO, 'stringio'
 autoload :ProgressBar, 'buildr/core/progressbar'
+require 'digest/md5'
+require 'digest/sha1'
 
 
 # Not quite open-uri, but similar. Provides read and write methods for the resource represented by the URI.
@@ -153,7 +154,7 @@
           read({:progress=>verbose}.merge(options || {}).merge(:modified=>modified)) { |chunk| temp.write chunk }
         end
         mkpath File.dirname(target)
-        File.move temp.path, target
+        FileUtils.mv temp.path, target
       when File
         read({:progress=>verbose}.merge(options || {}).merge(:modified=>target.mtime)) { |chunk| target.write chunk }
         target.flush
@@ -546,7 +547,7 @@
       end
       real_path.tap do |path|
         mkpath File.dirname(path)
-        File.move temp.path, path
+        FileUtils.mv temp.path, path
       end
     end