six-updater 0.16.1 → 0.17.1

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
@@ -11,8 +11,9 @@ require 'rake/rdoctask'
11
11
  require 'rake/testtask'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
+ s.platform = "i386-mingw32"
14
15
  s.name = 'six-updater'
15
- s.version = '0.16.1'
16
+ s.version = '0.17.1'
16
17
  s.has_rdoc = true
17
18
  s.extra_rdoc_files = ['README', 'LICENSE']
18
19
  s.summary = 'Your summary here'
@@ -23,6 +24,28 @@ spec = Gem::Specification.new do |s|
23
24
  s.add_dependency('win32-process', '>= 0.6.0')
24
25
  s.add_dependency('win32-shortcut', '>= 0.2.3')
25
26
  s.add_dependency('log4r', '>= 1.1.2')
27
+ s.add_dependency('six-uac', '>= 0.1.0')
28
+ s.add_dependency('six-rsync', '>= 0.3.4')
29
+ s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,spec}/**/*") + Dir.glob("lib/*/**/*.rb")
30
+ s.require_path = "lib"
31
+ s.bindir = "bin"
32
+ s.executables = ['six-updater']
33
+ end
34
+
35
+ spec2 = Gem::Specification.new do |s|
36
+ s.name = 'six-updater'
37
+ s.version = '0.17.1'
38
+ s.has_rdoc = true
39
+ s.extra_rdoc_files = ['README', 'LICENSE']
40
+ s.summary = 'Your summary here'
41
+ s.description = s.summary
42
+ s.author = 'Sickboy'
43
+ s.email = 'sb@dev-heaven.net'
44
+ #s.add_dependency('win32-api', '= 1.4.6')
45
+ #s.add_dependency('win32-process', '>= 0.6.0')
46
+ #s.add_dependency('win32-shortcut', '>= 0.2.3')
47
+ s.add_dependency('log4r', '>= 1.1.2')
48
+ #s.add_dependency('six-uac', '>= 0.1.0')
26
49
  s.add_dependency('six-rsync', '>= 0.3.4')
27
50
  s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,spec}/**/*") + Dir.glob("lib/*/**/*.rb")
28
51
  s.require_path = "lib"
@@ -36,6 +59,13 @@ Rake::GemPackageTask.new(spec) do |p|
36
59
  p.need_zip = true
37
60
  end
38
61
 
62
+ Rake::GemPackageTask.new(spec2) do |p|
63
+ p.gem_spec = spec2
64
+ p.need_tar = true
65
+ p.need_zip = true
66
+ end
67
+
68
+
39
69
  Rake::RDocTask.new do |rdoc|
40
70
  files =['README', 'LICENSE', 'lib/**/*.rb']
41
71
  rdoc.rdoc_files.add(files)
data/bin/six-updater CHANGED
@@ -1,28 +1,17 @@
1
1
  #!/usr/bin/ruby
2
2
  # encoding: utf-8
3
3
 
4
- gem 'six-updater'
5
-
6
4
  begin
7
- load 'six/updater-app.rb'
8
- rescue
9
- err = "ERROR: #{$!}"
10
- puts err
11
- begin
12
- require 'fileutils'
13
- dpath = Dir.pwd
14
- unless File.exists?(File.join(Dir.pwd, "legacy.txt"))
15
- if ENV['APPDATA']
16
- if ENV['APPDATA'].size > 0
17
- dpath = File.join(ENV['APPDATA'], 'Six-Updater') if File.directory?(ENV['APPDATA'])
18
- end
19
- end
20
- end
21
- path = File.join(dpath, "logs")
22
- FileUtils.mkdir_p path unless File.exists?(path)
23
- File.open(File.join(path, "six-updater-error.log"), 'w') {|f| f.puts err}
24
- rescue
25
- puts "ERROR: #{$!}"
26
- end
27
- sleep 10
5
+ load 'six/updater-app.rb'
6
+ rescue => e
7
+ puts e.class, e.message, e.backtrace.join("\n")
8
+ begin
9
+ require 'fileutils'
10
+ path = File.join(Six::Updater::DATA_PATH, 'logs')
11
+ FileUtils.mkdir_p path unless File.exists?(path)
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: #{$!}"
15
+ end
16
+ sleep 10
28
17
  end
data/lib/six/updater.rb CHANGED
@@ -2,37 +2,30 @@
2
2
 
3
3
  require 'yaml'
4
4
  require 'fileutils'
5
- require 'win32/registry'
6
5
 
7
- gem 'win32-api', '= 1.4.6'
8
- gem 'win32-shortcut'
9
- require 'win32/shortcut'
10
6
  gem 'log4r', '>= 1.1.2'
11
7
  require 'log4r'
8
+ require 'digest/md5'
9
+
10
+ case RUBY_PLATFORM
11
+ when /-mingw32$/, /-mswin32$/
12
+ gem 'win32-api', '= 1.4.6'
13
+ gem 'win32-shortcut'
14
+ require 'win32/shortcut'
15
+ gem 'win32-process'
16
+ require 'win32/process'
17
+ require 'win32/registry'
18
+ end
19
+
12
20
  gem 'six-rsync'
13
21
  require 'six/rsync'
14
- gem 'win32-process'
15
- require 'win32/process'
16
22
 
17
- require 'digest/md5'
18
23
  require 'six/updater/mod'
19
24
  #require 'sixupdater/gitrepo'
20
25
  require 'six/updater/rsyncrepo'
21
26
 
22
27
  include Six::Repositories
23
28
 
24
- # Language fix for alternative localizations
25
- if RUBY_VERSION == "1.9.1"
26
- if defined?(Ocra)
27
- (Dir[File.join($:[-2], 'enc/*.so')] + Dir[File.join($:[-2], 'enc/trans/*.so')]).each do |file|
28
- require file
29
- end
30
- end
31
- #EXCLUDE = [12]
32
- #(1..16).each { |i| require "enc/iso_8859_#{i}" unless EXCLUDE.include? i }
33
- #require 'enc/windows_1251'
34
- end
35
-
36
29
  case RUBY_VERSION
37
30
  when /1\.8\.[0-9]/
38
31
  class Array
@@ -45,26 +38,21 @@ end
45
38
  module Six
46
39
  # TODO: Evaluate if this module should be a class instead?
47
40
  module Updater
48
- VERSION = '0.16.1'
41
+ VERSION = '0.17.1'
49
42
  COMPONENT = 'six-updater'
50
-
43
+ LOG_LIMIT = 9999
44
+
51
45
  # Configuration
52
- ARMA2 = ['SOFTWARE\\Bohemia Interactive Studio\\ArmA 2', 'MAIN']
53
- ARMA2_ALT = ['SOFTWARE\\Bohemia Interactive\\ArmA 2', 'InstallPath']
54
- ARMA2_STEAM = ['SOFTWARE\\Valve\\Steam\\Common\\ARMA 2', 'InstallPath']
55
- DESKTOP = ['Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders', 'Desktop']
46
+ case RUBY_PLATFORM
47
+ when /-mingw32$/, /-mswin32$/
48
+ ARMA2 = ['SOFTWARE\\Bohemia Interactive Studio\\ArmA 2', 'MAIN']
49
+ ARMA2_ALT = ['SOFTWARE\\Bohemia Interactive\\ArmA 2', 'InstallPath']
50
+ ARMA2_STEAM = ['SOFTWARE\\Valve\\Steam\\Common\\ARMA 2', 'InstallPath']
51
+ DESKTOP = ['Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders', 'Desktop']
52
+ end
53
+
56
54
  # Fix for WinXP
57
- BASE_PATH = if ENV['OCRA_EXECUTABLE']
58
- if ENV['OCRA_EXECUTABLE'][/(.*)[\/|\\].*/]
59
- p = $1
60
- p.gsub!('\\', '/')
61
- p
62
- else
63
- p = Dir.pwd
64
- p.gsub!('\\', '/')
65
- p
66
- end
67
- elsif defined?(TAR2RUBYSCRIPT)
55
+ BASE_PATH = if defined?(TAR2RUBYSCRIPT)
68
56
  if oldlocation
69
57
  oldlocation
70
58
  else
@@ -77,6 +65,30 @@ module Six
77
65
  end
78
66
  TOOL_PATH = File.join(BASE_PATH, 'tools')
79
67
 
68
+ case RUBY_PLATFORM
69
+ when /-mingw32$/, /-mswin32$/
70
+ TEMP_PATH = if ENV['TEMP']
71
+ if ENV['TEMP'].size > 0
72
+ File.directory?(ENV['TEMP']) ? ENV['TEMP'] : BASE_PATH
73
+ else
74
+ BASE_PATH
75
+ end
76
+ else
77
+ BASE_PATH
78
+ end
79
+ HOME_PATH = File.exists?(File.join(ENV['APPDATA'])) ? File.join(ENV['APPDATA']) : TEMP_PATH
80
+ bpath = BASE_PATH.clone
81
+ bpath.gsub!('/', '\\')
82
+ tpath = "#{File.join(bpath, 'tools')};#{File.join(bpath, 'tools', 'bin')}"
83
+ tpath.gsub!('/', '\\')
84
+ ENV['PATH'] = "#{bpath};#{tpath};#{ENV['PATH']}"
85
+ else
86
+ HOME_PATH = '~/'
87
+ TEMP_PATH = '/tmp'
88
+ end
89
+ DATA_PATH = File.join(HOME_PATH, COMPONENT)
90
+
91
+ =begin
80
92
  dpath = BASE_PATH
81
93
  unless File.exists?(File.join(BASE_PATH, "legacy.txt"))
82
94
  reg_path = nil
@@ -98,6 +110,7 @@ module Six
98
110
  end
99
111
  end
100
112
  DATA_PATH = dpath
113
+ =end
101
114
 
102
115
  lf = File.join(DATA_PATH, "logs")
103
116
  FileUtils.mkdir_p(lf) unless File.directory?(lf)
@@ -112,16 +125,8 @@ module Six
112
125
  end
113
126
  end
114
127
 
115
- LOG_LIMIT = 9999
116
-
117
128
  @general_todo, @second_todo = [], []
118
129
 
119
- bpath = BASE_PATH.clone
120
- bpath.gsub!('/', '\\')
121
- tpath = "#{File.join(bpath, 'tools')};#{File.join(bpath, 'tools', 'bin')}"
122
- tpath.gsub!('/', '\\')
123
- ENV['PATH'] = "#{bpath};#{tpath};#{ENV['PATH']}"
124
-
125
130
  # Create config hash with default settings
126
131
  @config = Hash.new
127
132
  @config[:app_params] = '-noSplash -noFilePatching -showScriptErrors'
@@ -213,20 +218,24 @@ module Six
213
218
  #@config[:git_path] = @config[:gitpath] if @config[:gitpath]
214
219
 
215
220
  # Determine arma distribution and location
216
- unless @config[:app_path]
217
- begin
218
- @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_STEAM[0])[ARMA2_STEAM[1]]
219
- log.info "ArmA 2 Steam Distribution detected"
220
- rescue
221
+ case RUBY_PLATFORM
222
+ when /-mingw32$/, /-mswin32$/
223
+
224
+ unless @config[:app_path]
221
225
  begin
222
- @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_ALT[0])[ARMA2_ALT[1]]
223
- log.info "ArmA 2 Alt Distribution detected"
226
+ @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_STEAM[0])[ARMA2_STEAM[1]]
227
+ log.info "ArmA 2 Steam Distribution detected"
224
228
  rescue
225
229
  begin
226
- @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2[0])[ARMA2[1]]
227
- log.info "ArmA 2 Standard Distribution detected"
230
+ @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_ALT[0])[ARMA2_ALT[1]]
231
+ log.info "ArmA 2 Alt Distribution detected"
228
232
  rescue
229
- log.warn "No (known) ArmA 2 Distribution detected"
233
+ begin
234
+ @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2[0])[ARMA2[1]]
235
+ log.info "ArmA 2 Standard Distribution detected"
236
+ rescue
237
+ log.warn "No (known) ArmA 2 Distribution detected"
238
+ end
230
239
  end
231
240
  end
232
241
  end
@@ -275,7 +284,7 @@ module Six
275
284
 
276
285
  @beta = false
277
286
  @beta_exe = false
278
- @beta_exe = true if @config[:app_exe][/beta[\/|\\]arma2.*\.exe/]
287
+ @beta_exe = true if @config[:app_exe][/beta[\/|\\]arma2.*/]
279
288
 
280
289
  @config[:folders].each do |folder|
281
290
  @beta = true if folder[:folder] == 'beta'
@@ -347,41 +356,53 @@ module Six
347
356
  def startgame(cmd = nil)
348
357
  log.info "Starting the game with #{@config[:app_params]} -mod=#{@mods}#{cmd}"
349
358
  #system "\"#{@config[:app_exe]}\" #{@config[:app_params]} -mod=#{@mods}"
350
- begin
351
- struct = Process.create(
352
- :app_name => File.join(@config[:app_path], @config[:app_exe]),
353
- :command_line => " #{@config[:app_params]} -mod=#{@mods}#{cmd}",
354
- :creation_flags => Process::DETACHED_PROCESS,
355
- :process_inherit => false,
356
- :thread_inherit => false,
357
- :cwd => @config[:app_path],
358
- :inherit => false
359
- #:environment => ""
360
- )
361
- rescue
362
- log.warn "WARNING: Something went wrong starting the app: #{@config[:app_exe]}"
363
- log.debug "#{$!}"
359
+ case RUBY_PLATFORM
360
+ when /-mingw32$/, /-mswin32$/
361
+ begin
362
+ struct = Process.create(
363
+ :app_name => File.join(@config[:app_path], @config[:app_exe]),
364
+ :command_line => " #{@config[:app_params]} -mod=#{@mods}#{cmd}",
365
+ :creation_flags => Process::DETACHED_PROCESS,
366
+ :process_inherit => false,
367
+ :thread_inherit => false,
368
+ :cwd => @config[:app_path],
369
+ :inherit => false
370
+ #:environment => ""
371
+ )
372
+ rescue
373
+ log.warn "WARNING: Something went wrong starting the app: #{@config[:app_exe]}"
374
+ log.debug "#{$!}"
375
+ end
376
+ else
377
+ Dir.chdir(@config[:app_path]) do
378
+ system "#{@config[:app_exe]} #{@config[:app_params]} -mod=#{@mods}#{cmd}"
379
+ end
364
380
  end
365
381
  end
366
382
 
367
383
  def shortcut(path)
368
- cwd = Dir.pwd
369
- Dir.chdir path
370
- mods = @mods.clone
371
- mods.gsub!(/\//, '-')
372
- mods2 = @mods.clone
373
- mods2.gsub!('/', '\\')
374
- name = "Play ArmA2 with #{mods}.lnk"
375
- Win32::Shortcut.new(name) do |shortcut|
376
- shortcut.description = "Start Arma2 with #{mods2}"
377
- shortcut.path = File.join(@config[:app_path], @config[:app_exe])
378
- shortcut.working_directory = @config[:app_path]
379
- shortcut.arguments = "#{@config[:app_params]} -mod=#{mods2}"
384
+ case RUBY_PLATFORM
385
+ when /-mingw32$/, /-mswin32$/
386
+ cwd = Dir.pwd
387
+ Dir.chdir path
388
+ mods = @mods.clone
389
+ mods.gsub!(/\//, '-')
390
+ mods2 = @mods.clone
391
+ mods2.gsub!('/', '\\')
392
+ name = "Play ArmA2 with #{mods}.lnk"
393
+ Win32::Shortcut.new(name) do |shortcut|
394
+ shortcut.description = "Start Arma2 with #{mods2}"
395
+ shortcut.path = File.join(@config[:app_path], @config[:app_exe])
396
+ shortcut.working_directory = @config[:app_path]
397
+ shortcut.arguments = "#{@config[:app_params]} -mod=#{mods2}"
398
+ end
399
+ str = path.clone
400
+ str.gsub!('/', '\\')
401
+ log.info "Created shortcut (in #{str}): #{name}"
402
+ Dir.chdir cwd
403
+ else
404
+ log.warn "Unsupported on current Platform: #{RUBY_PLATFORM}"
380
405
  end
381
- str = path.clone
382
- str.gsub!('/', '\\')
383
- log.info "Created shortcut (in #{str}): #{name}"
384
- Dir.chdir cwd
385
406
  end
386
407
 
387
408
  def createshortcut
@@ -389,14 +410,19 @@ module Six
389
410
  end
390
411
 
391
412
  def createdesktopshortcut
392
- begin
393
- desktop = Win32::Registry.open(Win32::Registry::HKEY_CURRENT_USER, DESKTOP[0])[DESKTOP[1]]
394
- while desktop =~ /\%(\w*)\%/ do
395
- desktop.sub!("%#{$1}%", ENV[$1])
396
- end
397
- shortcut desktop if File.directory? desktop
398
- rescue
399
- log.warn "WARNING: Problem while creating shortcut! #{$!}"
413
+ case RUBY_PLATFORM
414
+ when /-mingw32$/, /-mswin32$/
415
+ begin
416
+ desktop = Win32::Registry.open(Win32::Registry::HKEY_CURRENT_USER, DESKTOP[0])[DESKTOP[1]]
417
+ while desktop =~ /\%(\w*)\%/ do
418
+ desktop.sub!("%#{$1}%", ENV[$1])
419
+ end
420
+ shortcut desktop if File.directory? desktop
421
+ rescue
422
+ log.warn "WARNING: Problem while creating shortcut! #{$!}"
423
+ end
424
+ else
425
+ log.warn "Unsupported on current Platform: #{RUBY_PLATFORM}"
400
426
  end
401
427
  end
402
428
 
@@ -412,7 +438,3 @@ module Six
412
438
  end
413
439
  end
414
440
  end
415
-
416
- # TODO: Evaluate position
417
- if $0 == __FILE__
418
- end
@@ -3,6 +3,8 @@
3
3
  module Six
4
4
  module Updater
5
5
  class Mod
6
+ attr_reader :changed
7
+ DEFAULT_PRIORITY = 9999
6
8
  def initialize(modconfig, config)
7
9
  @modconfig = modconfig
8
10
  @config = config
@@ -37,16 +39,27 @@ module Six
37
39
  end
38
40
 
39
41
  # TODO: Custom paths need more consideration, especially re the -mod= line
40
- def apppath
41
- @modconfig[:path] ? @modconfig[:path] : @config[:app_modpath]
42
+ def apppath; @modconfig[:path] ? @modconfig[:path] : @config[:app_modpath]; end
43
+ def priority; @modconfig[:priority] ? @modconfig[:priority] : DEFAULT_PRIORITY; end
44
+ def esc(val); "\"#{val}\""; end
45
+ def log; Six::Updater.log; end
46
+ def sure?; Six::Updater.sure?; end
47
+ def log_status; log.warn "Status: #{@repository.status.join("\n")}" if @repository.status.size > 0; end
48
+ def not_a_repository; log.warn "Does not seem to be a repository!"; end
49
+
50
+ def disabled?
51
+ log.info "Mod is tagged 'disabled' in the configuration file. Skipping..." if @modconfig[:disabled]
52
+ @modconfig[:disabled]
42
53
  end
43
54
 
44
- def esc(val)
45
- "\"#{val}\""
55
+ def installed?
56
+ not_a_repository unless @installed
57
+ @installed
46
58
  end
47
59
 
48
- def priority
49
- @modconfig[:priority] ? @modconfig[:priority] : 9999
60
+ def skip?
61
+ log.info "Mod is tagged 'skip' in the configuration file. Skipping..." if @modconfig[:skip]
62
+ @modconfig[:skip]
50
63
  end
51
64
 
52
65
  def get_repositories
@@ -60,26 +73,6 @@ module Six
60
73
  end
61
74
  end
62
75
 
63
- def log
64
- Six::Updater.log
65
- end
66
-
67
- def changed
68
- @changed
69
- end
70
-
71
- def sure?
72
- Six::Updater.sure?
73
- end
74
-
75
- def log_status
76
- log.warn "Status: #{@repository.status.join("\n")}" if @repository.status.size > 0
77
- end
78
-
79
- def not_a_repository
80
- log.warn "Does not seem to be a repository!"
81
- end
82
-
83
76
  def write_version
84
77
  @modconfig[:versionfile][/(.*)\/(.*)/]
85
78
  folder = $1
@@ -95,15 +88,8 @@ module Six
95
88
  end
96
89
 
97
90
  def changelog
98
- if @modconfig[:disabled]
99
- log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
100
- return
101
- end
102
-
103
- unless @installed
104
- not_a_repository
105
- return
106
- end
91
+ return if self.disabled?
92
+ return unless self.installed?
107
93
 
108
94
  unless @stat[:previous] == @stat[:current]
109
95
  log.info 'Playing log...'
@@ -116,15 +102,8 @@ module Six
116
102
 
117
103
  # RESET process (incase everything FOOKED :D)
118
104
  def reset
119
- if @modconfig[:disabled]
120
- log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
121
- return
122
- end
123
-
124
- unless @installed
125
- not_a_repository
126
- return
127
- end
105
+ return if self.disabled?
106
+ return unless self.installed?
128
107
 
129
108
  log.warn "###########"
130
109
  log.warn "# WARNING #"
@@ -138,8 +117,7 @@ module Six
138
117
 
139
118
  # UPDATE Process
140
119
  def update
141
- if @modconfig[:skip]
142
- log.info "Mod is tagged 'skip' in the configuration file. Skipping..."
120
+ if self.skip?
143
121
  begin
144
122
  userconfig(false)
145
123
  rescue
@@ -148,16 +126,10 @@ module Six
148
126
  end
149
127
  return
150
128
  else
151
- if @modconfig[:disabled]
152
- log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
153
- return
154
- end
129
+ return if self.disabled?
155
130
  end
156
131
 
157
- unless @installed
158
- not_a_repository
159
- return
160
- end
132
+ return unless self.installed?
161
133
 
162
134
  @stat[:previous] = @repository.version
163
135
  log.info "Current Version: #{@stat[:previous]}, checking for updates..."
@@ -205,12 +177,8 @@ module Six
205
177
  # INSTALL process
206
178
  def install
207
179
  log.debug "Path: #{@path}"
208
- if @modconfig[:disabled]
209
- log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
210
- return
211
- end
212
-
213
- if @installed
180
+ return if self.disabled?
181
+ if self.installed?
214
182
  log.info "Already installed, trying to update..."
215
183
  update
216
184
  else
@@ -224,8 +192,6 @@ module Six
224
192
  basepath, subfolder = $1, $2
225
193
  basepath = File.join(@config[:app_modpath], basepath)
226
194
  FileUtils.mkdir_p basepath unless FileTest.exist?(basepath)
227
- #Dir.chdir basepath
228
- #folder = File.join(basepath, subfolder)
229
195
  end
230
196
 
231
197
  file = File.join(DATA_PATH, "#{@folder_str}.7z")
@@ -297,10 +263,7 @@ module Six
297
263
 
298
264
  # UNINSTALL process
299
265
  def uninstall
300
- if @modconfig[:disabled]
301
- log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
302
- return
303
- end
266
+ return if self.disabled?
304
267
 
305
268
  if FileTest.exist?(@path)
306
269
  log.warn "###########"
@@ -316,14 +279,8 @@ module Six
316
279
 
317
280
  # Process keys
318
281
  def keys(force = true)
319
- if @modconfig[:disabled]
320
- log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
321
- return
322
- end
323
- unless @installed
324
- not_a_repository
325
- return
326
- end
282
+ return if self.disabled?
283
+ return unless self.installed?
327
284
 
328
285
  path = File.join(@path, 'store', 'keys.tar')
329
286
  path = File.join(@path, 'store', 'keys') unless File.exists?(path)
@@ -357,14 +314,9 @@ module Six
357
314
  # Process userconfigs
358
315
  # TODO: Add this processing to update, aka; IF userconfig has changed THEN update it
359
316
  def userconfig(force = true)
360
- if @modconfig[:disabled]
361
- log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
362
- return
363
- end
364
- unless @installed
365
- not_a_repository
366
- return
367
- end
317
+ return if self.disabled?
318
+ return unless self.installed?
319
+
368
320
  # TODO: Process this on file level instead of folder level?
369
321
  time = Time.now.to_i
370
322
  f = @modconfig[:folder].clone
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 16
7
+ - 17
8
8
  - 1
9
- version: 0.16.1
9
+ version: 0.17.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy
@@ -14,55 +14,13 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-10 00:00:00 +02:00
17
+ date: 2010-04-22 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: win32-api
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 4
30
- - 6
31
- version: 1.4.6
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: win32-process
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- - 6
44
- - 0
45
- version: 0.6.0
46
- type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: win32-shortcut
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 0
57
- - 2
58
- - 3
59
- version: 0.2.3
60
- type: :runtime
61
- version_requirements: *id003
62
20
  - !ruby/object:Gem::Dependency
63
21
  name: log4r
64
22
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
66
24
  requirements:
67
25
  - - ">="
68
26
  - !ruby/object:Gem::Version
@@ -72,11 +30,11 @@ dependencies:
72
30
  - 2
73
31
  version: 1.1.2
74
32
  type: :runtime
75
- version_requirements: *id004
33
+ version_requirements: *id001
76
34
  - !ruby/object:Gem::Dependency
77
35
  name: six-rsync
78
36
  prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
37
+ requirement: &id002 !ruby/object:Gem::Requirement
80
38
  requirements:
81
39
  - - ">="
82
40
  - !ruby/object:Gem::Version
@@ -86,7 +44,7 @@ dependencies:
86
44
  - 4
87
45
  version: 0.3.4
88
46
  type: :runtime
89
- version_requirements: *id005
47
+ version_requirements: *id002
90
48
  description: Your summary here
91
49
  email: sb@dev-heaven.net
92
50
  executables: