six-rsync 0.4.7 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/lib/six/rsync/lib.rb +14 -5
  3. data/lib/six/rsync.rb +1 -1
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ require 'rake/testtask'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = 'six-rsync'
15
- s.version = '0.4.7'
15
+ s.version = '0.4.8'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
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
- file = case typ
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?(file)
660
- FileUtils.rm_f File.join(@rsync_work_dir, file)
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
@@ -31,7 +31,7 @@ module Six
31
31
 
32
32
  module Rsync
33
33
  COMPONENT = 'six-rsync'
34
- VERSION = '0.4.7'
34
+ VERSION = '0.4.8'
35
35
  FOLDER = /(.*)\/(.*)/
36
36
 
37
37
  case RUBY_PLATFORM
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 7
9
- version: 0.4.7
8
+ - 8
9
+ version: 0.4.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy