six-updater 0.19.2-x86-mingw32 → 0.19.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ require 'rake/testtask'
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.platform = "x86-mingw32"
15
15
  s.name = 'six-updater'
16
- s.version = '0.19.2'
16
+ s.version = '0.19.3'
17
17
  s.has_rdoc = true
18
18
  s.extra_rdoc_files = ['README', 'LICENSE']
19
19
  s.summary = 'Your summary here'
@@ -35,7 +35,7 @@ end
35
35
  spec3 = Gem::Specification.new do |s|
36
36
  s.platform = "x86-mswin32"
37
37
  s.name = 'six-updater'
38
- s.version = '0.19.2'
38
+ s.version = '0.19.3'
39
39
  s.has_rdoc = true
40
40
  s.extra_rdoc_files = ['README', 'LICENSE']
41
41
  s.summary = 'Your summary here'
@@ -56,7 +56,7 @@ end
56
56
 
57
57
  spec2 = Gem::Specification.new do |s|
58
58
  s.name = 'six-updater'
59
- s.version = '0.19.2'
59
+ s.version = '0.19.3'
60
60
  s.has_rdoc = true
61
61
  s.extra_rdoc_files = ['README', 'LICENSE']
62
62
  s.summary = 'Your summary here'
data/bin/six-updater CHANGED
@@ -10,8 +10,8 @@ rescue => e
10
10
  path = File.join(Six::Updater::DATA_PATH, 'logs')
11
11
  FileUtils.mkdir_p path unless File.exists?(path)
12
12
  File.open(File.join(path, "six-updater-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
13
- rescue
14
- puts "ERROR: #{$!}"
13
+ rescue => e
14
+ puts "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
15
15
  end
16
16
  sleep 10
17
17
  end
data/lib/six/cleanup.rb CHANGED
@@ -7,6 +7,14 @@ require 'yaml'
7
7
 
8
8
  module Six
9
9
  class Cleanup
10
+ def self.md5sum(target)
11
+ target[/(.*)\/(.*)/]
12
+ folder, file = $1, $2
13
+ r = Dir.chdir(folder) do
14
+ %x[md5sum "#{file}"]
15
+ end
16
+ r[/\A\w*/]
17
+ end
10
18
  def self.check_dir(dir, repack = false)
11
19
  if File.directory?(dir)
12
20
  entry = File.join(dir, ".repository.yml")
@@ -18,8 +26,8 @@ module Six
18
26
  config[typ].each do |e|
19
27
  sum = if repack && e[0] =~ /.*[A-Z].*\.gz$/
20
28
  Dir.chdir(dir) do
21
- #puts "Repacking #{e[0]} to #{e[0].downcase}"
22
- system "gunzip \"#{e[0]}\""
29
+ puts "Repacking #{e[0]} to #{e[0].downcase} in #{dir}"
30
+ system "gzip -d \"#{e[0]}\""
23
31
  f = e[0].clone
24
32
  f.sub!(/\.gz$/, "")
25
33
 
@@ -30,8 +38,7 @@ module Six
30
38
  end
31
39
  rename(f, target)
32
40
  system "gzip --rsyncable --best \"#{target}\""
33
- r = %x[md5sum "#{target}.gz"]
34
- r[/\A\w*/]
41
+ md5sum(File.join(dir, "#{target}.gz"))
35
42
  end
36
43
  else
37
44
  e[1]
@@ -60,7 +67,7 @@ module Six
60
67
  base = File.basename(entry)
61
68
 
62
69
  if File.directory?(entry)
63
- check_dir(File.join(entry, ".rsync"), repack)
70
+ check_dir(File.join(entry, ".rsync"), false)
64
71
  check_dir(File.join(entry, ".rsync/.pack"), repack)
65
72
  check_dir(File.join(entry, ".pack"), repack)
66
73
  end
@@ -91,7 +98,7 @@ module Six
91
98
 
92
99
  def self.process(dir, repack = false)
93
100
  if File.directory?(dir)
94
- check_dir(File.join(dir, ".rsync"), repack)
101
+ check_dir(File.join(dir, ".rsync"), false)
95
102
  check_dir(File.join(dir, ".rsync/.pack"), repack)
96
103
  check_dir(File.join(dir, ".pack"), repack)
97
104
 
@@ -107,6 +114,6 @@ if $0 == __FILE__
107
114
  unless ARGV.empty?
108
115
  dir = ARGV[0]
109
116
  ARGV.shift
110
- Six::Cleanup.process(dir, true)
117
+ Six::Cleanup.process(dir)#, true)
111
118
  end
112
119
  end
@@ -37,9 +37,9 @@ module Six
37
37
  end
38
38
  end
39
39
  end
40
- rescue
40
+ rescue => e
41
41
  log.warn "Failed checking tasklist for #{pid}"
42
- log.debug "#{$!}"
42
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
43
43
  end
44
44
 
45
45
  if found
data/lib/six/updater.rb CHANGED
@@ -39,7 +39,7 @@ end
39
39
  module Six
40
40
  # TODO: Evaluate if this module should be a class instead?
41
41
  module Updater
42
- VERSION = '0.19.2'
42
+ VERSION = '0.19.3'
43
43
  COMPONENT = 'six-updater'
44
44
  LOG_LIMIT = 9999
45
45
  FOLDER = /(.*)\/(.*)/
@@ -384,9 +384,9 @@ module Six
384
384
  end
385
385
  end
386
386
  end
387
- rescue
387
+ rescue => e
388
388
  log.warn "Failed checking tasklist for #{name}"
389
- log.debug "#{$!}"
389
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
390
390
  end
391
391
  pids
392
392
  end
@@ -434,9 +434,9 @@ module Six
434
434
  :inherit => false
435
435
  #:environment => ""
436
436
  )
437
- rescue
437
+ rescue => e
438
438
  log.warn "WARNING: Something went wrong starting the app: #{@config[:app_exe]}"
439
- log.debug "#{$!}"
439
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
440
440
  end
441
441
  else
442
442
  Dir.chdir(@config[:app_path]) do
@@ -484,8 +484,8 @@ module Six
484
484
  desktop.sub!("%#{$1}%", ENV[$1])
485
485
  end
486
486
  shortcut desktop if File.directory? desktop
487
- rescue
488
- log.warn "WARNING: Problem while creating shortcut! #{$!}"
487
+ rescue => e
488
+ log.warn "WARNING: Problem while creating shortcut! ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
489
489
  end
490
490
  else
491
491
  log.warn "Unsupported on current Platform: #{RUBY_PLATFORM}"
@@ -39,9 +39,9 @@ module Six
39
39
  Git.clone(rep, @path, opts)
40
40
  Git.open(@path).config("core.autocrlf", "false")
41
41
  done = true
42
- rescue
42
+ rescue => e
43
43
  log.debug "WARNING: Failed, trying other mirrors if available"
44
- log.debug "#{$!}"
44
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
45
45
  end
46
46
  end
47
47
  log.warn "WARNING: Failed, was unable to clone!" unless done
@@ -74,9 +74,9 @@ module Six
74
74
  repository.config("core.autocrlf", "false")
75
75
  repository.pull_legacy
76
76
  done = true
77
- rescue
77
+ rescue => e
78
78
  log.debug "WARNING: Failed, trying other mirrors if available"
79
- log.debug "#{$!}"
79
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
80
80
  end
81
81
  end
82
82
  log.warn "WARNING: Failed, was unable to update!" unless done
@@ -83,9 +83,9 @@ module Six
83
83
  begin
84
84
  File.open(@modconfig[:versionfile], 'w') { |file| file.puts @stat[:current] }
85
85
  true
86
- rescue
86
+ rescue => e
87
87
  log.warn "WARNING: Unable to write version.txt file, please make sure everything arma is closed, etc"
88
- log.debug "#{$!}"
88
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
89
89
  false
90
90
  end
91
91
  end
@@ -123,9 +123,9 @@ module Six
123
123
  if self.skip?
124
124
  begin
125
125
  userconfig(false)
126
- rescue
126
+ rescue => e
127
127
  log.warn 'WARNING: Userconfig processing is unable to complete.'
128
- log.debug "#{$!}"
128
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
129
129
  end
130
130
  return
131
131
  else
@@ -141,9 +141,9 @@ module Six
141
141
 
142
142
  begin
143
143
  @repository.status(true)
144
- rescue
144
+ rescue => e
145
145
  log.warn 'WARNING: Update seems to have completed but there was a status error..'
146
- log.debug "#{$!}"
146
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
147
147
  log_status
148
148
  end
149
149
 
@@ -165,9 +165,9 @@ module Six
165
165
  # TODO: Detect missing / out of date config files, and notify user
166
166
  begin
167
167
  userconfig(false)
168
- rescue
168
+ rescue => e
169
169
  log.warn 'WARNING: Userconfig processing is unable to complete.'
170
- log.debug "#{$!}"
170
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
171
171
  end
172
172
 
173
173
  unless done
@@ -211,7 +211,7 @@ module Six
211
211
  @installed = true
212
212
  get_repositories
213
213
  update
214
- rescue
214
+ rescue => e
215
215
  @installed = false
216
216
  FileUtils::rm_rf(@path) if FileTest.exist?(@path)
217
217
  end
@@ -239,16 +239,16 @@ module Six
239
239
  begin
240
240
  @stat[:current] = @repository.version
241
241
  write_version
242
- rescue
242
+ rescue => e
243
243
  log.warn 'WARNING: Post installation was unable to complete. This could be due to a server / connection problem. Please try again later'
244
- log.debug "#{$!}"
244
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
245
245
  FileUtils::rm_rf(@path) if FileTest.exist?(@path)
246
246
  end
247
247
  begin
248
248
  userconfig
249
- rescue
249
+ rescue => e
250
250
  log.warn 'WARNING: Userconfig processing is unable to complete.'
251
- log.debug "#{$!}"
251
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
252
252
  end
253
253
  else
254
254
  FileUtils::rm_rf(@path) if FileTest.exist?(@path)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 19
8
- - 2
9
- version: 0.19.2
8
+ - 3
9
+ version: 0.19.3
10
10
  platform: x86-mingw32
11
11
  authors:
12
12
  - Sickboy
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-27 00:00:00 +02:00
17
+ date: 2010-05-01 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency