six-rsync 0.4.5 → 0.4.6

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 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.5'
15
+ s.version = '0.4.6'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
data/bin/six-rsync CHANGED
@@ -7,15 +7,7 @@ rescue => e
7
7
  puts e.class, e.message, e.backtrace.join("\n")
8
8
  begin
9
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")
10
+ path = File.join(Six::Repositories::Rsync::DATA_PATH, 'logs')
19
11
  FileUtils.mkdir_p path unless File.exists?(path)
20
12
  File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
21
13
  rescue
data/bin/six-rsync-mirror CHANGED
@@ -7,15 +7,7 @@ rescue => e
7
7
  puts e.class, e.message, e.backtrace.join("\n")
8
8
  begin
9
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")
10
+ path = File.join(Six::Repositories::Rsync::DATA_PATH, 'logs')
19
11
  FileUtils.mkdir_p path unless File.exists?(path)
20
12
  File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
21
13
  rescue
data/lib/six/rsync-app.rb CHANGED
@@ -10,8 +10,6 @@ require 'six/rsync/options'
10
10
  module Six
11
11
  module Repositories
12
12
  module Rsync
13
- COMPONENT = 'six-rsync'
14
-
15
13
  module_function
16
14
 
17
15
  def logger
data/lib/six/rsync.rb CHANGED
@@ -30,18 +30,15 @@ module Six
30
30
  end
31
31
 
32
32
  module Rsync
33
- VERSION = '0.4.5'
33
+ COMPONENT = 'six-rsync'
34
+ VERSION = '0.4.6'
34
35
  FOLDER = /(.*)\/(.*)/
35
36
 
36
37
  case RUBY_PLATFORM
37
38
  when /-mingw32$/, /-mswin32$/
38
39
  TEMP_PATH = if ENV['TEMP']
39
40
  if ENV['TEMP'].size > 0
40
- if File.directory?(ENV['TEMP'])
41
- ENV['TEMP']
42
- else
43
- BASE_PATH
44
- end
41
+ File.directory?(ENV['TEMP']) ? ENV['TEMP'] : BASE_PATH
45
42
  else
46
43
  BASE_PATH
47
44
  end
@@ -50,10 +47,10 @@ module Six
50
47
  end
51
48
  HOME_PATH = File.exists?(File.join(ENV['APPDATA'])) ? File.join(ENV['APPDATA']) : TEMP_PATH
52
49
  else
53
- HOME_PATH = '~'
50
+ HOME_PATH = '~/'
54
51
  TEMP_PATH = '/tmp'
55
52
  end
56
- DATA_PATH = File.join(HOME_PATH, 'six-rsync')
53
+ DATA_PATH = File.join(HOME_PATH, COMPONENT)
57
54
  CONFIG_FILE = File.join(DATA_PATH, 'config.yml')
58
55
  if File.exists?(DATA_PATH)
59
56
  unless File.directory?(DATA_PATH)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 5
9
- version: 0.4.5
8
+ - 6
9
+ version: 0.4.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy