six-updater 0.10.10 → 0.10.11

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-updater'
15
- s.version = '0.10.10'
15
+ s.version = '0.10.11'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
data/lib/six/updater.rb CHANGED
@@ -44,7 +44,7 @@ end
44
44
  module Six
45
45
  # TODO: Evaluate if this module should be a class instead?
46
46
  module Updater
47
- VERSION = '0.10.10'
47
+ VERSION = '0.10.11'
48
48
  COMPONENT = 'six-updater'
49
49
 
50
50
  # Configuration
@@ -229,6 +229,14 @@ module Six
229
229
  end
230
230
  end
231
231
 
232
+ # TODO: Detect missing / out of date config files, and notify user
233
+ begin
234
+ userconfig(false)
235
+ rescue
236
+ log.warn 'WARNING: Userconfig processing is unable to complete.'
237
+ log.debug "#{$!}"
238
+ end
239
+
232
240
  unless done
233
241
  log.warn 'WARNING: Update was unable to complete. This could be due to a server / connection problem, or due to files in use or out of synch repositories. Please make sure ArmA is closed, retry, otherwise reset and retry'
234
242
  log_status
@@ -336,7 +344,7 @@ module Six
336
344
 
337
345
  # Process userconfigs
338
346
  # TODO: Add this processing to update, aka; IF userconfig has changed THEN update it
339
- def userconfig
347
+ def userconfig(force = true)
340
348
  unless @installed
341
349
  not_a_repository
342
350
  return
@@ -346,9 +354,13 @@ module Six
346
354
  f = @modconfig[:folder].clone
347
355
  f.gsub!('@', '')
348
356
  path = File.join(@path, 'userconfig')
349
- uconfig = File.join(@config[:app_path], 'userconfig')
350
- uconfigpath = File.join(uconfig, f)
351
357
  if FileTest.exist?(path)
358
+ uconfig = File.join(@config[:app_path], 'userconfig')
359
+ uconfigpath = File.join(uconfig, f)
360
+ if !force && FileTest.exist?(uconfigpath)
361
+ log.debug "Userconfig folder already found, skipping"
362
+ return
363
+ end
352
364
  log.info "Found userconfig, processing..."
353
365
  FileUtils::mv(uconfigpath, "#{uconfigpath}_#{time}") if FileTest.exist?(uconfigpath)
354
366
  FileUtils::mkdir_p uconfig unless FileTest.exist?(uconfig)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: six-updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.10
4
+ version: 0.10.11
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-12-04 00:00:00 +01:00
12
+ date: 2009-12-07 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency