six-rsync 0.4.7 → 0.4.8
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/Rakefile +1 -1
- data/lib/six/rsync/lib.rb +14 -5
- data/lib/six/rsync.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/six/rsync/lib.rb
CHANGED
@@ -650,19 +650,24 @@ module Six
|
|
650
650
|
end
|
651
651
|
|
652
652
|
def del_file(file, typ, opts = {})
|
653
|
-
|
653
|
+
path = case typ
|
654
654
|
when :pack
|
655
|
-
File.join(DIR_PACK, file)
|
655
|
+
File.join(@rsync_work_dir, DIR_PACK, file)
|
656
656
|
when :wd
|
657
|
-
file
|
657
|
+
File.join(@rsync_work_dir, file)
|
658
658
|
end
|
659
|
-
if File.exists?(
|
660
|
-
FileUtils.rm_f File.join(
|
659
|
+
if File.exists?(path)
|
660
|
+
FileUtils.rm_f File.join(path)
|
661
661
|
@logger.info "Removed: #{file}"
|
662
662
|
end
|
663
663
|
end
|
664
664
|
|
665
665
|
def md5(path)
|
666
|
+
unless @md5_installed ||= begin; %x[md5sum]; $? == 0; rescue; false; end
|
667
|
+
puts "md5sum command not found"
|
668
|
+
raise RsyncError
|
669
|
+
end
|
670
|
+
|
666
671
|
unless File.directory? path
|
667
672
|
path[/(.*)[\/|\\](.*)/]
|
668
673
|
folder, file = $1, $2
|
@@ -675,6 +680,10 @@ module Six
|
|
675
680
|
end
|
676
681
|
|
677
682
|
def zip7(file)
|
683
|
+
unless @zip7_installed ||= begin; %x[7z]; $? == 0; rescue; false; end
|
684
|
+
puts "7z command not found"
|
685
|
+
raise RsyncError
|
686
|
+
end
|
678
687
|
out = %x[7z x #{esc(file)} -y]
|
679
688
|
@logger.debug out
|
680
689
|
raise RsyncError if $? != 0
|
data/lib/six/rsync.rb
CHANGED