six-rsync 0.3.8 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -12,18 +12,18 @@ require 'rake/testtask'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = 'six-rsync'
15
- s.version = '0.3.8'
15
+ s.version = '0.4.1'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
19
19
  s.description = s.summary
20
20
  s.author = 'Sickboy'
21
21
  s.email = 'sb@dev-heaven.net'
22
- # s.executables = ['your_executable_here']
23
22
  s.add_dependency('log4r', '>= 1.1.2')
24
23
  s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,spec}/**/*") + Dir.glob("lib/*/**/*.rb")
25
24
  s.require_path = "lib"
26
25
  s.bindir = "bin"
26
+ s.executables = ['six-rsync', 'six-rsync-mirror']
27
27
  end
28
28
 
29
29
  Rake::GemPackageTask.new(spec) do |p|
data/bin/six-rsync ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/ruby
2
+ # encoding: utf-8
3
+
4
+ begin
5
+ load 'six/rsync-app.rb'
6
+ rescue => e
7
+ puts e.class, e.message, e.backtrace.join("\n")
8
+ begin
9
+ require 'fileutils'
10
+ dpath = Dir.pwd
11
+ unless File.exists?(File.join(Dir.pwd, "legacy.txt"))
12
+ if ENV['APPDATA']
13
+ if ENV['APPDATA'].size > 0
14
+ dpath = File.join(ENV['APPDATA'], 'Six-Updater') if File.directory?(ENV['APPDATA'])
15
+ end
16
+ end
17
+ end
18
+ path = File.join(dpath, "logs")
19
+ FileUtils.mkdir_p path unless File.exists?(path)
20
+ File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
21
+ rescue
22
+ puts "ERROR: #{$!}"
23
+ end
24
+ sleep 10
25
+ end
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/ruby
2
+ # encoding: utf-8
3
+
4
+ begin
5
+ load 'six/rsync-mirror.rb'
6
+ rescue => e
7
+ puts e.class, e.message, e.backtrace.join("\n")
8
+ begin
9
+ require 'fileutils'
10
+ dpath = Dir.pwd
11
+ unless File.exists?(File.join(Dir.pwd, "legacy.txt"))
12
+ if ENV['APPDATA']
13
+ if ENV['APPDATA'].size > 0
14
+ dpath = File.join(ENV['APPDATA'], 'Six-Updater') if File.directory?(ENV['APPDATA'])
15
+ end
16
+ end
17
+ end
18
+ path = File.join(dpath, "logs")
19
+ FileUtils.mkdir_p path unless File.exists?(path)
20
+ File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
21
+ rescue
22
+ puts "ERROR: #{$!}"
23
+ end
24
+ sleep 10
25
+ end
@@ -139,7 +139,7 @@ module Six
139
139
 
140
140
  # returns a Rsync::Status object
141
141
  def status
142
- Rsync::Status.new(self)
142
+ lib.status
143
143
  end
144
144
 
145
145
  # this is a convenience method for accessing the class that wraps all the