six-rsync 0.1.9 → 0.2.0

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.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/lib/six/rsync/lib.rb +23 -7
  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.1.9'
15
+ s.version = '0.2.0'
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
@@ -402,7 +402,7 @@ module Six
402
402
  # Update file
403
403
  if online
404
404
  # TODO: Progress bar
405
- if mismatch.count > (@repos_remote[typ].count / 4)
405
+ if mismatch.count > (@repos_remote[typ].count / 2)
406
406
  @logger.info "Many files mismatched (#{mismatch.count}), running full update on .pack folder"
407
407
  arr_opts = []
408
408
  arr_opts << PARAMS
@@ -416,13 +416,29 @@ module Six
416
416
  command('', arr_opts)
417
417
  else
418
418
  c = mismatch.size
419
- i = 0
420
- mismatch.each do |e|
421
- # TODO: Nicer progress bar...
422
- i += 1
423
- @logger.info "Fetching #{i}/#{c}: #{e}"
424
- fetch_file(File.join(".pack", e), host)
419
+ @logger.info "Fetching #{mismatch.size} files... Please wait"
420
+ slist = File.join(TOOLS_PATH, ".six-updater_#{rand 9999}-list")
421
+ File.open(slist, 'w') do |f|
422
+ mismatch.each { |e| f.puts e }
425
423
  end
424
+ arr_opts = []
425
+ arr_opts << PARAMS
426
+
427
+ arr_opts << RSH if host[/\A(\w)*\@/]
428
+
429
+ slist = "\"#{slist}\""
430
+
431
+ while slist[WINDRIVE] do
432
+ drive = slist[WINDRIVE]
433
+ slist.gsub!(drive, "\"/cygdrive/#{$1}")
434
+ end
435
+ arr_opts << "--files-from=#{slist}"
436
+
437
+ arr_opts << esc(File.join(host, '.pack/.'))
438
+ arr_opts << esc(pack_path)
439
+
440
+ command('', arr_opts)
441
+ FileUtils.rm_f slist
426
442
  end
427
443
  end
428
444
  when :wd
data/lib/six/rsync.rb CHANGED
@@ -30,7 +30,7 @@ module Six
30
30
  end
31
31
 
32
32
  module Rsync
33
- VERSION = '0.1.9'
33
+ VERSION = '0.2.0'
34
34
  TOOLS_PATH = File.join(BASE_PATH, 'tools')
35
35
  FOLDER = /(.*)\/(.*)/
36
36
  ENV['PATH'] = ENV['PATH'] + ";#{TOOLS_PATH};#{File.join(TOOLS_PATH, 'bin')}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: six-rsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sickboy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-25 01:00:00 +02:00
12
+ date: 2009-11-08 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15