six-updater-web 0.23.7 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/testtask'
7
7
 
8
8
  spec = Gem::Specification.new do |s|
9
9
  s.name = 'six-updater-web'
10
- s.version = '0.23.7'
10
+ s.version = '0.24.0'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -23,6 +23,7 @@ spec = Gem::Specification.new do |s|
23
23
  s.add_dependency('six-updater', '>= 0.22.1')
24
24
  s.add_dependency('rails', '2.3.8')
25
25
  s.add_dependency('haml', '3.0.10')
26
+ #s.add_dependency('minitar', '>= 0.5.3')
26
27
  s.add_dependency('coderay', '>= 0.9.3')
27
28
  s.add_dependency('RedCloth', '>= 4.2.2')
28
29
  end
@@ -82,26 +82,6 @@ class MainController < ApplicationController
82
82
  grab = true
83
83
  params["all"] = ""
84
84
 
85
- when "update_gamespy"
86
- gslist_installed = begin
87
- %x[gslist -h]
88
- $? == 0
89
- rescue
90
- false
91
- end
92
-
93
- if gslist_installed
94
- @msg << "<b>A window should open displaying the gamespy progress</b>"
95
- if gs_geo
96
- @system_setting.update_gamespy #(true)
97
- else
98
- @system_setting.update_gamespy_nogeo #(true)
99
- end
100
- else
101
- @error << "<b>ERROR: gslist tool is missing!</b>"
102
- @error << "Please download from <a href=\"http://six.dev-heaven.net/wagn/Six_Updater_Suite+download+gslist\" target=\"_blank\">Six Updater Wagn</a>, and put in #{SixUpdaterWeb::TOOL_PATH}"
103
- end
104
-
105
85
  when "prune_gamespy"
106
86
  @msg << "Pruning Gamespy"
107
87
  Queryserver.prune
@@ -120,6 +100,7 @@ class MainController < ApplicationController
120
100
  @error << "<b>ERROR: Please confirm by checking the checkbox</b>" if !d
121
101
  end
122
102
 
103
+ # Handle params
123
104
  begin
124
105
  preset = Sixconfig.find(@system_setting.favorite_preset)
125
106
  rescue
@@ -129,12 +110,6 @@ class MainController < ApplicationController
129
110
  end
130
111
  end
131
112
 
132
- begin
133
- queryserver = Queryserver.find(@system_setting.favorite_server)
134
- #server = Server.find(@system_setting.favorite_server)
135
- rescue
136
- end
137
-
138
113
  begin
139
114
  setting = Appsetting.find(@system_setting.favorite_settings_profile)
140
115
  rescue
@@ -146,15 +121,47 @@ class MainController < ApplicationController
146
121
  end
147
122
 
148
123
  preset = fetch_param([:config], Sixconfig, preset)
149
- #server = fetch_param([:server], Server, server)
150
124
  action = fetch_param([:act], Action, action)
151
125
  setting = fetch_param([:setting], Appsetting, setting)
126
+
127
+ # Handle gamespy update
128
+ case params["commit"].downcase
129
+ when "update_gamespy"
130
+ gslist_installed = begin
131
+ %x[gslist -h]
132
+ $? == 0
133
+ rescue
134
+ false
135
+ end
136
+
137
+ if gslist_installed
138
+ @msg << "<b>A window should open displaying the gamespy progress</b>"
139
+ if gs_geo
140
+ @system_setting.update_gamespy(setting) #(true)
141
+ else
142
+ @system_setting.update_gamespy_nogeo(setting) #(true)
143
+ end
144
+ else
145
+ @error << "<b>ERROR: gslist tool is missing!</b>"
146
+ @error << "Please download from <a href=\"http://six.dev-heaven.net/wagn/Six_Updater_Suite+download+gslist\" target=\"_blank\">Six Updater Wagn</a>, and put in #{SixUpdaterWeb::TOOL_PATH}"
147
+ end
148
+ end
149
+
150
+ # Handle gamespy server
151
+ begin
152
+ queryserver = Queryserver.find(@system_setting.favorite_server)
153
+ #server = Server.find(@system_setting.favorite_server)
154
+ rescue
155
+ end
156
+
152
157
  queryserver = fetch_param([:gamespy], Queryserver, queryserver)
153
158
  if queryserver
154
159
  @queryserver = queryserver
155
160
  server = queryserver.dynamic_server
156
161
  end
162
+ #server = fetch_param([:server], Server, server)
157
163
 
164
+ # Handle settings and favs
158
165
  if params[:system]
159
166
  @beta = case params[:system][:beta]
160
167
  when "default"
@@ -205,18 +212,39 @@ class MainController < ApplicationController
205
212
  @system_setting.save
206
213
  end
207
214
 
208
- if grab && params["all"]
209
- preset = Sixconfig.new
210
- preset.name = "Dynamic"
211
- preset.mods += Mod.find(:all)
215
+ case params["commit"].downcase
216
+ when "edit preset"
217
+ redirect_to "/sixconfigs/edit/#{preset.id}"
218
+ return
219
+
220
+ when "edit server"
221
+ redirect_to "/queryservers/edit/#{queryserver.id}"
222
+ return
223
+
224
+ when "edit action"
225
+ redirect_to "/actions/edit/#{action.id}"
226
+ return
227
+
228
+ when "edit setting"
229
+ redirect_to "/appsettings/edit/#{setting.id}"
230
+ return
231
+
232
+ when "edit userconfig"
233
+ redirect_to "/config/?setting=#{setting.id}"
234
+ return
212
235
  end
213
236
 
214
237
  if preset
215
238
  @status << "Preset: <a href='/sixconfigs/edit/#{preset.id}' title='#{preset.mods.map{|e| e.name}.join(", ")}'>#{preset.name}</a>"
216
239
  else
217
240
  @status << "No preset selected!"
218
- act(setting, preset, action, server)
219
- return
241
+ preset = Sixconfig.new(:name => "Dynamic")
242
+ #act(setting, preset, action, server)
243
+ #return
244
+ end
245
+
246
+ if grab && params["all"]
247
+ preset.mods += Mod.find(:all)
220
248
  end
221
249
 
222
250
  unless params["all"]
@@ -243,20 +271,9 @@ class MainController < ApplicationController
243
271
  end
244
272
  end
245
273
 
246
- if action
247
- @status << "Override action: <a href='/actions/edit/#{action.id}' title='#{action.tasks.join(",") if action.tasks.is_a?(Array)}'>#{action.name}</a>"
248
- else
249
- if preset.action
250
- action = preset.action
251
- @status << "Preset action: #{action.name}"
252
- end
253
- end
254
-
255
- unless setting
256
- setting = Arma2Appsetting.new(:beta => @beta, :server => @server_bool)
257
- end
274
+ setting = Arma2Appsetting.new(:beta => @beta, :server => @server_bool) if setting.nil?
275
+ @setting_used = setting
258
276
 
259
- @msg << "Skip status reset!" if reset
260
277
  if setting.real_path
261
278
  unless File.directory?(setting.real_path)
262
279
  @error << "<b>WARNING:</b> ArmA folder not set or non existent: #{setting.real_path}"
@@ -271,62 +288,49 @@ class MainController < ApplicationController
271
288
  end
272
289
  end
273
290
 
274
- @procs = setting.processes
275
-
276
- preset.all_mods(server, setting).each do |mod|
277
- mod.update_version(setting.real_path) # TODO: this already runs in updater_yml, but there doesn't run if autoskip is disabled
278
- if reset && !@autoskip
279
- mod.skip = false
280
- else
281
- mod.update_skip if @autoskip
291
+ if action
292
+ @status << "Override action: <a href='/actions/edit/#{action.id}' title='#{action.tasks.join(",") if action.tasks.is_a?(Array)}'>#{action.name}</a>"
293
+ else
294
+ if preset.action
295
+ action = preset.action
296
+ @status << "Preset action: #{action.name}"
282
297
  end
283
- mod.save unless mod.new_record?
298
+ end
284
299
 
285
- mod.disabled = true if (!mod.exists?(setting) || mod.installed? || mod.class.appset::SPECIFIC) && !mod.version_match?(setting)
286
- #mod.skip = true if (mod.exists?(setting) && !mod.has_rsync?(setting))
287
- if mod.special
288
- @special << mod
289
- next
290
- end
291
- if mod.disabled
292
- @disabled << mod
293
- next
294
- end
295
- if mod.installed? || mod.exists?(setting)
296
- if mod.skip
300
+ @msg << "Skip status reset!" if reset
301
+
302
+ # Check for open processes
303
+ @procs = setting.processes
304
+
305
+ # Process all configured mods..
306
+ @mods = preset.all_mods(server, setting)
307
+ @mods.each do |mod|
308
+ mod.process(setting, reset, @autoskip)
309
+ case mod.status
310
+ when :special
311
+ @special << mod
312
+ when :disabled
313
+ @disabled << mod
314
+ when :skip
297
315
  @skip << mod
298
- else
316
+ when :check
299
317
  @check << mod
300
- end
301
- else
302
- @install << mod
318
+ when :install
319
+ @install << mod
320
+ else
321
+ logger.debug "Warning; weird mod status: #{mod.status}"
303
322
  end
304
323
  end
324
+ @skip.sort! { |a, b| a.name <=> b.name }
325
+ @check.sort! { |a, b| a.name <=> b.name }
326
+ @install.sort! { |a, b| a.name <=> b.name }
327
+ @disabled.sort! { |a, b| a.name <=> b.name }
305
328
 
306
- @setting_used = setting
307
329
  case params["commit"].downcase
308
- when "edit preset"
309
- redirect_to "/sixconfigs/edit/#{preset.id}"
310
- return
311
-
312
- when "edit server"
313
- redirect_to "/queryservers/edit/#{queryserver.id}"
314
- return
315
-
316
- when "edit action"
317
- redirect_to "/actions/edit/#{action.id}"
318
- return
319
-
320
- when "edit setting"
321
- redirect_to "/appsettings/edit/#{setting.id}"
322
- return
323
-
324
- when "edit userconfig"
325
- redirect_to "/config/?setting=#{setting.id}"
326
- return
327
-
328
330
  when "server mod check"
329
331
  if queryserver
332
+ queryserver.latest
333
+ queryserver.save if queryserver.changed?
330
334
  @server_check = true
331
335
  @signatures = queryserver.signatures
332
336
  @allowed, @disallowed, @garbage = *setting.allowance(@signatures)
@@ -335,10 +339,18 @@ class MainController < ApplicationController
335
339
  end
336
340
 
337
341
  when "save"
342
+ unless queryserver.nil?
343
+ queryserver.latest
344
+ queryserver.save if queryserver.changed?
345
+ end
338
346
  preset.output_yml(setting, server)
339
347
  @msg << "Saved six-updater.yml!"
340
348
 
341
349
  when "execute"
350
+ unless queryserver.nil?
351
+ queryserver.latest
352
+ queryserver.save if queryserver.changed?
353
+ end
342
354
  preset.execute(action, setting, server, @autoskip, @inweb)
343
355
 
344
356
  if @inweb
@@ -354,6 +366,10 @@ class MainController < ApplicationController
354
366
  @system_setting.speedtest
355
367
  @msg << "<b>A window should open displaying the speedtest progress</b>"
356
368
 
369
+ when "open armafolder"
370
+ setting.explore
371
+ @msg << "Explorer should open"
372
+
357
373
  when "stop game"
358
374
  setting.kill!.each { |entry| @msg << "Process killed: #{entry}" }
359
375
  sleep 1
@@ -361,11 +377,6 @@ class MainController < ApplicationController
361
377
  when "read mods"
362
378
  Mod.read_modfolders(setting)
363
379
  end
364
-
365
- @skip.sort! { |a, b| a.name <=> b.name }
366
- @check.sort! { |a, b| a.name <=> b.name }
367
- @install.sort! { |a, b| a.name <=> b.name }
368
- @disabled.sort! { |a, b| a.name <=> b.name }
369
380
  act(setting, preset, action, server)
370
381
  end
371
382
 
@@ -379,29 +390,17 @@ class MainController < ApplicationController
379
390
  case params["commit"].downcase
380
391
  when "rpt"
381
392
  lf = setting.logfile
382
- if lf.nil?
383
- @msg << "No logfile found!"
384
- else
385
- send_file(lf, {:filename => "#{setting.rpt}_#{Time.now.to_i}.log"})
386
- end
393
+ lf.nil? ? @msg << "No logfile found!" : send_file(lf, {:filename => "#{setting.rpt}_#{Time.now.to_i}.log"})
387
394
 
388
395
  when "updater"
389
396
  f = "six-updater.log"
390
397
  lf = File.join(SixUpdaterWeb::DATA_PATH, "logs", f)
391
- if File.exists?(lf)
392
- send_file(lf, {:filename => "#{f}_#{Time.now.to_i}.log"})
393
- else
394
- @msg << "No logfile found!"
395
- end
398
+ File.exists?(lf) ? send_file(lf, {:filename => "#{f}_#{Time.now.to_i}.log"}) : @msg << "No logfile found!"
396
399
 
397
400
  when "updater-web"
398
401
  f = "six-updater-web.log"
399
402
  lf = File.join(SixUpdaterWeb::DATA_PATH, "logs", f)
400
- if File.exists?(lf)
401
- send_file(lf, {:filename => "#{f}_#{Time.now.to_i}.log"})
402
- else
403
- @msg << "No logfile found!"
404
- end
403
+ File.exists?(lf) ? send_file(lf, {:filename => "#{f}_#{Time.now.to_i}.log"}) : @msg << "No logfile found!"
405
404
  end
406
405
  end
407
406
 
@@ -497,12 +496,6 @@ class MainController < ApplicationController
497
496
  else
498
497
  Appsetting.new
499
498
  end
500
- =begin
501
- @preset = preset ? preset : Sixconfig.new
502
- @server = server ? server : Queryserver.new
503
- @action = action ? action : Action.new
504
- @setting = setting ? setting : Arma2Appsetting.new
505
- =end
506
499
  end
507
500
 
508
501
  def fetch_param(ar, ty, default = nil)
@@ -515,18 +508,15 @@ class MainController < ApplicationController
515
508
  break
516
509
  end
517
510
  end
518
- if a
519
- if a.empty?
520
- return nil
521
- else
522
- begin
523
- return ty.find(a)
524
- rescue
525
- return default
526
- end
527
- end
511
+ return default if a.nil?
512
+ if a.empty?
513
+ return nil
528
514
  else
529
- return default
515
+ begin
516
+ return ty.find(a)
517
+ rescue
518
+ return default
519
+ end
530
520
  end
531
521
  end
532
522
  end
@@ -22,6 +22,8 @@ class Appsetting < ActiveRecord::Base
22
22
  DEFAULT_MODS_PARAM = "-mod=" # TODO
23
23
  DEFAULT_BETA_MODS = ["beta"]
24
24
  STATIC_TYPES = []
25
+ GAMESPY_TYPES = ["arma2pc"]
26
+ GAME_MIN_VERSIONS = ["1.0"]
25
27
 
26
28
  # TODO: Auto enumurate from model properties?
27
29
  # folders: expansion, common, addons
@@ -94,6 +96,10 @@ class Appsetting < ActiveRecord::Base
94
96
  ed
95
97
  end
96
98
 
99
+ def explore
100
+ SixUpdaterWeb.run_program("explorer.exe", SixUpdaterWeb::BASE_PATH, self.real_path)
101
+ end
102
+
97
103
  def nice_edition
98
104
  t = self.edition(false)
99
105
  t ? t.label : "ERROR: None detected"
@@ -13,4 +13,6 @@ class Arma2OaAppsetting < Arma2Appsetting
13
13
 
14
14
  FAMILY = Hash.new
15
15
  FAMILY["Arma2Oa"] = [[DEFAULT_EXE, DEFAULT_SERVER_EXE, "#{DEFAULT_BETA_EXE_PATH}/#{DEFAULT_BETA_EXE}"], {"Arma2OaCo" => ["addons/"], "Arma2OaSt" => ["!addons/"]}]
16
+ GAMESPY_TYPES = ["arma2oapc"]
17
+ GAME_MIN_VERSIONS = ["1.5"]
16
18
  end
@@ -6,4 +6,6 @@ class Arma2OaCoAppsetting < Arma2OaAppsetting
6
6
  # Perhaps look at adding a boolean: specific, so when it is enabled, non of the inherited editions can be used?
7
7
  # Since Arma2 standalone addons should work on OaCo, yet you would loose the specific 'arma2standalone only' option
8
8
  STATIC_TYPES = [Arma2CaAppsetting]
9
+ GAMESPY_TYPES = ["arma2oapc", "arma2pc"]
10
+ GAME_MIN_VERSIONS = ["1.5", "1.0"]
9
11
  end
@@ -30,6 +30,56 @@ class Mod < ActiveRecord::Base
30
30
  Kernel.const_get(self.short+"Appsetting")
31
31
  end
32
32
 
33
+ def process(setting, reset, autoskip)
34
+ self.update_version(setting.real_path) # TODO: this already runs in updater_yml, but there doesn't run if autoskip is disabled
35
+ if reset && !autoskip
36
+ self.skip = false
37
+ else
38
+ self.update_skip if autoskip
39
+ end
40
+ self.save unless self.new_record?
41
+
42
+ self.disabled = true if (!self.exists?(setting) || self.installed? || self.class.appset::SPECIFIC) && !self.version_match?(setting)
43
+ #self.skip = true if (self.exists?(setting) && !self.has_rsync?(setting))
44
+
45
+ end
46
+
47
+ def uconfig_name
48
+ self.real_name.sub(/^@/, "")
49
+ end
50
+
51
+ def userconfig(setting = Appsetting.new)
52
+ # Packs everything that matches Find.find('tests')
53
+ #File.open('test.tar', 'wb') { |tar| Archive::Tar::Minitar.pack('tests', tar) }
54
+ # Unpacks 'test.tar' to 'x', creating 'x' if necessary.
55
+ # Archive::Tar::Minitar.unpack('test.tar', 'x')
56
+ rpath = self.real_path
57
+
58
+ path = File.join(rpath, 'store', 'userconfig.tar')
59
+ path = File.join(rpath, 'store', 'userconfig') unless File.exists?(path)
60
+ path = File.join(rpath, 'userconfig') unless File.exists?(path)
61
+ if File.exists?(path)
62
+ #f = .clone
63
+ #f.gsub!('@', '')
64
+ #uconfig = File.join(setting.real_path, 'userconfig')
65
+ #uconfigpath = File.join(uconfig, self.uconfig_name)
66
+ if File.directory? path
67
+
68
+ else
69
+ #Archive::Tar::Minitar.unpack('test.tar', 'x')
70
+ end
71
+ end
72
+ end
73
+
74
+ def status
75
+ return :special if self.special
76
+ return :disabled if self.disabled
77
+ if self.installed? || self.exists?(setting)
78
+ self.skip ? :skip : :check
79
+ else
80
+ :install
81
+ end
82
+ end
33
83
 
34
84
  # arma2 mod: works for all subclasses
35
85
  # armaoa mod; works for arma2-oa-st, arma2-oa-
@@ -20,38 +20,40 @@ class SystemSetting < ActiveRecord::Base
20
20
  SixUpdaterWeb.run_program(exec, RAILS_ROOT, cl)
21
21
  end
22
22
 
23
- def update_gamespy(internal = false)
23
+ def update_gamespy(setting = Appsetting.new, internal = false)
24
24
  self.gamespied_at = Time.now
25
25
  self.save
26
26
  ENV['NOGEO'] = nil
27
27
  if internal
28
28
  SixUpdaterWeb.update_gamespy
29
29
  else
30
- cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']}" # + cl
30
+ cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']} GAMESPY_TYPES=#{setting.edition::GAMESPY_TYPES.join(",")}" # + cl
31
31
  cl += " BASE_PATH=\'#{SixUpdaterWeb::BASE_PATH}\'" if defined?(SixUpdaterWeb::OLDLOCATION)
32
32
  SixUpdaterWeb.run_program(exec, RAILS_ROOT, cl)
33
33
  end
34
34
  end
35
35
 
36
- def update_gamespy_nogeo(internal = false)
36
+ def update_gamespy_nogeo(setting = Appsetting.new, internal = false)
37
37
  self.gamespied_at = Time.now
38
38
  self.save
39
39
  ENV['NOGEO'] = "1"
40
40
  if internal
41
41
  SixUpdaterWeb.update_gamespy
42
42
  else
43
- cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']} NOGEO=1" # + cl
43
+ cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']} NOGEO=1 GAMESPY_TYPES=#{setting.edition::GAMESPY_TYPES.join(",")}" # + cl
44
44
  cl += " BASE_PATH=\'#{SixUpdaterWeb::BASE_PATH}\'" if defined?(SixUpdaterWeb::OLDLOCATION)
45
45
  SixUpdaterWeb.run_program(exec, RAILS_ROOT, cl)
46
46
  end
47
47
  end
48
48
 
49
49
  def synchronize
50
- begin
51
- # TODO: This should be in after_initialize yet there it fails..
52
- SixUpdaterWeb.update_site_controllers # Update the list of controllers - give default adminstrator permission to
53
- rescue => e
54
- logger.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
50
+ if ENV["RAILS_ENV"] == "production" && (RUBY_VERSION > "1.9.1" || RUBY_VERSION < "1.9.1")
51
+ begin
52
+ # TODO: This should be in after_initialize yet there it fails..
53
+ SixUpdaterWeb.update_site_controllers # Update the list of controllers - give default adminstrator permission to
54
+ rescue => e
55
+ logger.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
56
+ end
55
57
  end
56
58
 
57
59
  l = []
@@ -0,0 +1,50 @@
1
+ <div class="active-scaffold-footer">
2
+ <div class="active-scaffold-found"><span class="active-scaffold-records"><%= @page.pager.count -%></span> <%=as_(:found, :count => @page.pager.count) %></div>
3
+ <div class="active-scaffold-pagination">
4
+ <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } unless @page.pager.number_of_pages < 2 %>
5
+ </div>
6
+ <br clear="both" /><%# a hack for the Rico Corner problem %>
7
+ </div>
8
+ <table cellpadding="0" cellspacing="0">
9
+ <thead>
10
+ <tr>
11
+ <%= render :partial => 'list_column_headings' %>
12
+ </tr>
13
+ </thead>
14
+ <tbody class="messages">
15
+ <tr>
16
+ <td colspan="<%= active_scaffold_config.list.columns.length + 1 -%>" class="messages-container">
17
+ <div id="<%= active_scaffold_messages_id -%>">
18
+ <%= render :partial => 'messages' %>
19
+ </div>
20
+ <%# AST show_actions_column -%>
21
+ <% if !active_scaffold_config.show_actions_column and active_scaffold_config.list.show_search_reset %>
22
+ <p class="filtered-message" <%= ' style="display:none;" ' unless @filtered %>>
23
+ <%# AST link_to_reset_filter -%>
24
+ <%= @link_to_reset_filter %>
25
+ </p>
26
+ <%# AST End -%>
27
+ <% end %>
28
+ <p id="<%= empty_message_id %>" class="empty-message" <%= ' style="display:none;" ' unless @page.items.empty? %>>
29
+ <%# AST :no_entries -%>
30
+ <%= as_(:no_entries) %>
31
+ </p>
32
+ </td>
33
+ </tr>
34
+ </tbody>
35
+ <tbody class="records" id="<%= active_scaffold_tbody_id %>">
36
+ <% if !@records.empty? -%>
37
+ <%= render :partial => 'list_record', :collection => @page.items, :locals => { :hidden => false, :dont_show_calculations => true } %>
38
+ <% end -%>
39
+ <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} -%>
40
+ <%= render :partial => 'list_calculations' %>
41
+ <% end -%>
42
+ </tbody>
43
+ </table>
44
+ <div class="active-scaffold-footer">
45
+ <div class="active-scaffold-found"><span class="active-scaffold-records"><%= @page.pager.count -%></span> <%=as_(:found, :count => @page.pager.count) %></div>
46
+ <div class="active-scaffold-pagination">
47
+ <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } unless @page.pager.number_of_pages < 2 %>
48
+ </div>
49
+ <br clear="both" /><%# a hack for the Rico Corner problem %>
50
+ </div>
@@ -62,6 +62,8 @@
62
62
  = submit_tag "Server Mod check"
63
63
  %p
64
64
  = submit_tag "Speedtest"
65
+ &nbsp;
66
+ = submit_tag "Open Armafolder"
65
67
  %strong Logs
66
68
  - form_tag :action => :fetch do
67
69
  %p
@@ -6,6 +6,7 @@
6
6
  %br
7
7
  = @status.join("<br />")
8
8
  %br
9
+ Total: #{@mods.size} mods.
9
10
  Last sync #{@system_setting.synchronized_at ? time_ago_in_words(@system_setting.synchronized_at) + " ago" : "never"}.
10
11
  Gamespy #{@system_setting.gamespied_at ? time_ago_in_words(@system_setting.gamespied_at) + " ago" : "never"}.
11
12
  %br
@@ -28,28 +29,28 @@
28
29
  %table{ :border => 1, :cellpadding => "5", :width => "100%"}
29
30
  %tr
30
31
  %td
32
+ - if @install.size > 0
33
+ %b Not installed (#{@install.size})
34
+ %br
35
+ = render :partial => "check", :locals => {:mods => @install}
36
+ %br
31
37
  - if @check.size > 0
32
38
  %b To be checked
33
39
  %br
34
40
  = render :partial => "check", :locals => {:mods => @check}
35
41
  %br
36
- - if @skip.size > 0
37
- %b To be skipped
38
- %br
39
- = render :partial => "check", :locals => {:mods => @skip}
40
- %br
41
- - if @install.size > 0
42
- %b Not installed
43
- %br
44
- = render :partial => "check", :locals => {:mods => @install}
45
- %br
46
42
  - if @special.size > 0
47
- %b Special (Hover over modname to see why)
43
+ %b Special (#{@special.size}) (Hover over modname to see why)
48
44
  %br
49
45
  = render :partial => "check", :locals => {:mods => @special}
50
46
  %br
47
+ - if @skip.size > 0
48
+ %b To be skipped (#{@skip.size})
49
+ %br
50
+ = render :partial => "check", :locals => {:mods => @skip}
51
+ %br
51
52
  - if @disabled.size > 0
52
- %b Disabled
53
+ %b Disabled (#{@disabled.size})
53
54
  %br
54
55
  = render :partial => "check", :locals => {:mods => @disabled}
55
56
  %br
@@ -50,6 +50,8 @@ Rails::Initializer.run do |config|
50
50
  config.gem "sqlite3-ruby", :lib => "sqlite3"
51
51
  config.gem "haml", :version => "3.0.10"
52
52
  config.gem "coderay"
53
+ #config.gem "minitar"
54
+ #config.gem "uuidtools"
53
55
 
54
56
  # config.gem "aws-s3", :lib => "aws/s3"
55
57
 
@@ -79,6 +81,8 @@ Rails::Initializer.run do |config|
79
81
  # config.i18n.default_locale = :de
80
82
  end
81
83
 
84
+ #require 'zlib'
85
+ #require 'archive/tar/minitar'
82
86
 
83
87
  ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
84
88
  :test => '%m-%d %H:%M:%S',
@@ -23,7 +23,7 @@ end
23
23
  require 'open3'
24
24
 
25
25
  module SixUpdaterWeb
26
- VERSION = "0.23.7"
26
+ VERSION = "0.24.0"
27
27
  COMPONENT = "six-updater-web"
28
28
 
29
29
  DEFAULT_IP = "127.0.0.1" unless defined?(DEFAULT_IP)
@@ -139,11 +139,12 @@ module SixUpdaterWeb
139
139
  puts "Fetching server info..."
140
140
  geo = ENV['NOGEO'] || nogeo ? "" : nil
141
141
  #geo = ""
142
+ types = ENV['GAMESPY_TYPES'].split(",")
142
143
  puts "Pings and Countries: #{geo.nil?}"
143
144
  puts ""
144
145
 
145
146
  ids = []
146
- ["arma2oapc", "arma2pc"].each do |game|
147
+ types.each do |game|
147
148
  q = Six::Query::GamespyMaster.new(geo, game)
148
149
  h = q.process
149
150
  puts ""
@@ -1,2 +1,2 @@
1
- module <%= controller_class_name -%>Helper
1
+ eval("module #{controller_class_name}Helper")
2
2
  end
@@ -45,7 +45,7 @@ module Six
45
45
  ip, port, content = $1, $2, $3
46
46
  content = content.split("\\")
47
47
  content << "" unless (content.size % 2 == 0)
48
- i = 0;
48
+ i = 0
49
49
  content.map! do |e|
50
50
  i += 1
51
51
  i % 2 == 0 ? e : clean(e)
@@ -59,11 +59,7 @@ module Six
59
59
  e[:port] = port
60
60
  @list[addr] = e
61
61
  end
62
- if e[:gamedata]
63
- e[:gamedata].merge!(Hash[*content])
64
- else
65
- e[:gamedata] = Hash[*content]
66
- end
62
+ e[:gamedata] ? e[:gamedata].merge!(Hash[*content]) : e[:gamedata] = Hash[*content]
67
63
  end
68
64
  @list
69
65
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 23
8
- - 7
9
- version: 0.23.7
7
+ - 24
8
+ - 0
9
+ version: 0.24.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-28 00:00:00 +02:00
17
+ date: 2010-07-31 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -180,6 +180,7 @@ files:
180
180
  - lib/six-updater-web/app/models/server.rb
181
181
  - lib/six-updater-web/app/models/sixconfig.rb
182
182
  - lib/six-updater-web/app/models/system_setting.rb
183
+ - lib/six-updater-web/app/views/active_scaffold_overrides/_list.html.erb
183
184
  - lib/six-updater-web/app/views/appsettings/manage.erb
184
185
  - lib/six-updater-web/app/views/config/edit.haml
185
186
  - lib/six-updater-web/app/views/config/index.haml