six-updater-web 0.22.4 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/six-updater-web/app/controllers/config_controller.rb +11 -2
- data/lib/six-updater-web/app/controllers/main_controller.rb +53 -30
- data/lib/six-updater-web/app/controllers/queryservers_controller.rb +10 -4
- data/lib/six-updater-web/app/helpers/mods_helper.rb +1 -1
- data/lib/six-updater-web/app/helpers/queryservers_helper.rb +4 -0
- data/lib/six-updater-web/app/models/appsetting.rb +3 -0
- data/lib/six-updater-web/app/models/arma2_ca_appsetting.rb +8 -0
- data/lib/six-updater-web/app/models/arma2_ca_mod.rb +3 -0
- data/lib/six-updater-web/app/models/arma2_mod.rb +1 -1
- data/lib/six-updater-web/app/models/arma2_oa_co_appsetting.rb +1 -1
- data/lib/six-updater-web/app/models/arma2_st_appsetting.rb +1 -1
- data/lib/six-updater-web/app/models/arma2_st_mod.rb +2 -2
- data/lib/six-updater-web/app/models/mod.rb +11 -1
- data/lib/six-updater-web/app/models/queryserver.rb +11 -0
- data/lib/six-updater-web/app/views/config/edit.haml +4 -2
- data/lib/six-updater-web/app/views/config/index.haml +2 -1
- data/lib/six-updater-web/app/views/config/show.haml +3 -1
- data/lib/six-updater-web/app/views/main/_left.haml +7 -6
- data/lib/six-updater-web/app/views/main/_pm.haml +7 -0
- data/lib/six-updater-web/app/views/main/_right.haml +34 -18
- data/lib/six-updater-web/app/views/main/_servercheck.haml +2 -2
- data/lib/six-updater-web/app/views/main/index.haml +4 -1
- data/lib/six-updater-web/config/six-updater-web.rb +3 -3
- data/lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/localize.rb +1 -1
- metadata +6 -3
data/Rakefile
CHANGED
@@ -16,6 +16,10 @@ class ConfigController < ApplicationController
|
|
16
16
|
|
17
17
|
@userconfigs = Dir.chdir(path) { Dir["userconfig/**/*"].reject {|e| File.directory?(e) || File.dirname(e)[/_[0-9]*$/]} }
|
18
18
|
@userconfigs += ["ban.txt"]
|
19
|
+
if setting.real_params =~ /-cfg=([\w\.]*)/
|
20
|
+
logger.info "Server Config: #{$1}"
|
21
|
+
@userconfigs += [$1]
|
22
|
+
end
|
19
23
|
cfg = params["options"] && params["options"]["userconfig"] ? params["options"]["userconfig"] : @userconfigs[0]
|
20
24
|
case params["commit"]
|
21
25
|
when "Edit"
|
@@ -23,16 +27,21 @@ class ConfigController < ApplicationController
|
|
23
27
|
return
|
24
28
|
end
|
25
29
|
@userconfig = File.exists?(File.join(path, cfg)) ? File.open(File.join(path, cfg)) {|a| Iconv.new("utf-8//IGNORE//TRANSLIT", "utf-8").iconv(a.read + ' ')[0..-2].split("\n").map{|e| e.sub("\r", "")}.join("\n") } : ""
|
30
|
+
@setting = setting
|
26
31
|
end
|
27
32
|
|
28
33
|
def edit
|
29
|
-
|
34
|
+
setting = Appsetting.find(params["setting"])
|
35
|
+
path = setting.real_path.gsub("\\", "/")
|
30
36
|
@userconfig = File.exists?(File.join(path, params["options"]["userconfig"])) ? File.open(File.join(path, params["options"]["userconfig"])) {|a| Iconv.new("utf-8//IGNORE//TRANSLIT", "utf-8").iconv(a.read + ' ')[0..-2].split("\n").map{|e| e.sub("\r", "")}.join("\n") } : ""
|
37
|
+
@setting = setting
|
31
38
|
end
|
32
39
|
|
33
40
|
def show
|
34
|
-
|
41
|
+
setting = Appsetting.find(params["setting"])
|
42
|
+
path = setting.real_path.gsub("\\", "/")
|
35
43
|
@userconfig = File.exists?(File.join(path, params["options"]["userconfig"])) ? File.open(File.join(path, params["options"]["userconfig"])) {|a| Iconv.new("utf-8//IGNORE//TRANSLIT", "utf-8").iconv(a.read + ' ')[0..-2].split("\n").map{|e| e.sub("\r", "")}.join("\n") } : ""
|
44
|
+
@setting = setting
|
36
45
|
end
|
37
46
|
|
38
47
|
def update
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class MainController < ApplicationController
|
2
2
|
def index
|
3
|
-
@msg = []
|
3
|
+
@msg, @error, @status = [], [], []
|
4
|
+
@pm = false
|
4
5
|
@skip, @install, @check, @disabled, @special = [], [], [], [], []
|
5
6
|
preset, queryserver, server, action, setting, reset, ok = nil, nil, nil, nil, nil, false, true
|
6
7
|
grab = false
|
@@ -27,7 +28,7 @@ class MainController < ApplicationController
|
|
27
28
|
rescue => e
|
28
29
|
logger.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
|
29
30
|
"FAILURE: #{$!}"
|
30
|
-
end
|
31
|
+
end
|
31
32
|
end
|
32
33
|
|
33
34
|
gs_ok, gs_geo = true, true
|
@@ -59,7 +60,7 @@ class MainController < ApplicationController
|
|
59
60
|
|
60
61
|
when "synchronize"
|
61
62
|
if !ok
|
62
|
-
@msg << @system_setting.sync
|
63
|
+
@msg << @system_setting.sync
|
63
64
|
end
|
64
65
|
grab = true
|
65
66
|
|
@@ -84,14 +85,15 @@ class MainController < ApplicationController
|
|
84
85
|
end
|
85
86
|
|
86
87
|
if gslist_installed
|
87
|
-
@msg << "Updating Gamespy...This will take a while, please wait until done
|
88
|
+
@msg << "Updating Gamespy...This will take a while, please wait until done!"
|
88
89
|
if gs_geo
|
89
90
|
@system_setting.update_gamespy #(true)
|
90
91
|
else
|
91
92
|
@system_setting.update_gamespy_nogeo #(true)
|
92
93
|
end
|
93
94
|
else
|
94
|
-
@
|
95
|
+
@error << "<b>ERROR: gslist tool is missing!</b>"
|
96
|
+
@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}"
|
95
97
|
end
|
96
98
|
|
97
99
|
when "prune_gamespy"
|
@@ -107,11 +109,11 @@ class MainController < ApplicationController
|
|
107
109
|
if params["really"]
|
108
110
|
if params["really"]["sure"] == "1"
|
109
111
|
Queryserver.purge
|
110
|
-
@msg << "Purged Gamespy
|
112
|
+
@msg << "Purged Gamespy..."
|
111
113
|
d = true
|
112
114
|
end
|
113
115
|
end
|
114
|
-
@
|
116
|
+
@error << "<b>ERROR: Please confirm by checking the checkbox</b>" if !d
|
115
117
|
end
|
116
118
|
|
117
119
|
begin
|
@@ -208,20 +210,20 @@ class MainController < ApplicationController
|
|
208
210
|
end
|
209
211
|
|
210
212
|
if preset
|
211
|
-
@
|
213
|
+
@status << "Preset: <a href='/sixconfigs/edit/#{preset.id}' title='#{preset.mods.map{|e| e.name}.join(", ")}'>#{preset.name}</a>"
|
212
214
|
else
|
213
|
-
@
|
215
|
+
@status << "No preset selected!"
|
214
216
|
act(setting, preset, action, server)
|
215
217
|
return
|
216
218
|
end
|
217
219
|
|
218
220
|
unless params["all"]
|
219
221
|
if server
|
220
|
-
@
|
222
|
+
@status << "Override server: <a href='/queryservers/edit/#{queryserver.id}' title='#{queryserver.country}, #{queryserver.ping}ms .Mods: #{queryserver.mods.map{|e| e.name}.join(", ")}'>#{queryserver.to_label}</a>"
|
221
223
|
else
|
222
224
|
if preset.get_server
|
223
225
|
server = preset.get_server
|
224
|
-
@
|
226
|
+
@status << "Preset server: <a href='/servers/edit/#{server.id}' title='#{server.mods.map{|e| e.name}.join(", ")}'>#{server.to_label}"
|
225
227
|
end
|
226
228
|
end
|
227
229
|
end
|
@@ -229,22 +231,22 @@ class MainController < ApplicationController
|
|
229
231
|
if setting
|
230
232
|
setting.beta = @beta unless @beta.nil?
|
231
233
|
setting.server = @server_bool unless @server_bool.nil?
|
232
|
-
@
|
234
|
+
@status << "Override settings profile: <a href='/appsettings/edit/#{setting.id}' title='#{setting.class.short}: #{setting.real_exe} #{setting.real_params} (#{setting.real_path})'>#{setting.label}</a>"
|
233
235
|
else
|
234
236
|
if preset.appsetting
|
235
237
|
setting = preset.appsetting
|
236
238
|
setting.beta = @beta unless @beta.nil?
|
237
239
|
setting.server = @server_bool unless @server_bool.nil?
|
238
|
-
@
|
240
|
+
@status << "Preset settings profile: <a href='/appsettings/edit/#{setting.id}' title='#{setting.class.short}: #{setting.real_exe} #{setting.real_params} (#{setting.real_path})'>#{setting.label}</a>"
|
239
241
|
end
|
240
242
|
end
|
241
243
|
|
242
244
|
if action
|
243
|
-
@
|
245
|
+
@status << "Override action: <a href='/actions/edit/#{action.id}' title='#{action.tasks.join(",") if action.tasks.is_a?(Array)}'>#{action.name}</a>"
|
244
246
|
else
|
245
247
|
if preset.action
|
246
248
|
action = preset.action
|
247
|
-
@
|
249
|
+
@status << "Preset action: #{action.name}"
|
248
250
|
end
|
249
251
|
end
|
250
252
|
|
@@ -252,24 +254,24 @@ class MainController < ApplicationController
|
|
252
254
|
setting = Arma2Appsetting.new(:beta => @beta, :server => @server_bool)
|
253
255
|
end
|
254
256
|
|
255
|
-
@msg << "
|
257
|
+
@msg << "Skip status reset!" if reset
|
256
258
|
if setting.real_path
|
257
259
|
unless File.directory?(setting.real_path)
|
258
|
-
@
|
260
|
+
@error << "<b>WARNING:</b> ArmA folder not set or non existent: #{setting.real_path}"
|
259
261
|
end
|
260
262
|
else
|
261
|
-
@
|
263
|
+
@error << "<b>WARNING:</b> ArmA folder not set or non existent: #{setting.real_path}"
|
262
264
|
end
|
263
265
|
|
264
266
|
if setting.modpath
|
265
267
|
unless File.directory?(setting.real_modpath)
|
266
|
-
@
|
268
|
+
@error << "<b>WARNING:</b> Mod installation folder not set or non existent: #{setting.real_modpath}"
|
267
269
|
end
|
268
270
|
end
|
269
271
|
|
270
272
|
procs = setting.processes
|
271
273
|
unless procs.empty?
|
272
|
-
@
|
274
|
+
@error << "<b>WARNING:</b> There seem to be open arma processes: #{setting.real_exe} - Pids: #{procs}"
|
273
275
|
end
|
274
276
|
|
275
277
|
preset.all_mods(server, setting).each do |mod|
|
@@ -280,8 +282,10 @@ class MainController < ApplicationController
|
|
280
282
|
mod.update_skip if @autoskip
|
281
283
|
end
|
282
284
|
mod.save unless mod.new_record?
|
283
|
-
|
284
|
-
if mod.
|
285
|
+
|
286
|
+
mod.disabled = true if (!mod.exists?(setting) || mod.installed? || mod.class.appset::SPECIFIC) && !mod.version_match?(setting)
|
287
|
+
#mod.skip = true if (mod.exists?(setting) && !mod.has_rsync?(setting))
|
288
|
+
if mod.special
|
285
289
|
@special << mod
|
286
290
|
next
|
287
291
|
end
|
@@ -322,13 +326,17 @@ class MainController < ApplicationController
|
|
322
326
|
return
|
323
327
|
|
324
328
|
when "server mod check"
|
325
|
-
|
326
|
-
|
327
|
-
|
329
|
+
if queryserver
|
330
|
+
@server_check = true
|
331
|
+
@signatures = queryserver.signatures
|
332
|
+
@allowed, @disallowed, @garbage = *setting.allowance(@signatures)
|
333
|
+
else
|
334
|
+
@error << "No server selected!"
|
335
|
+
end
|
328
336
|
|
329
337
|
when "save"
|
330
338
|
preset.output_yml(setting, server)
|
331
|
-
@msg << "
|
339
|
+
@msg << "Saved six-updater.yml!"
|
332
340
|
|
333
341
|
when "execute"
|
334
342
|
preset.execute(action, setting, server, @autoskip, @inweb)
|
@@ -339,11 +347,13 @@ class MainController < ApplicationController
|
|
339
347
|
return
|
340
348
|
end
|
341
349
|
|
342
|
-
@msg << "
|
350
|
+
@msg << "Saved six-updater.yml!"
|
351
|
+
@msg << "<b>A window should open displaying the update process progress</b>"
|
343
352
|
|
344
|
-
when "
|
345
|
-
setting.processes.each { |entry| @msg << "Process to be killed: #{entry}" }
|
346
|
-
setting.kill!
|
353
|
+
when "app manager"
|
354
|
+
#setting.processes.each { |entry| @msg << "Process to be killed: #{entry}" }
|
355
|
+
#setting.kill!
|
356
|
+
@pm = true
|
347
357
|
|
348
358
|
when "read mods"
|
349
359
|
Mod.read_modfolders(setting)
|
@@ -356,6 +366,19 @@ class MainController < ApplicationController
|
|
356
366
|
act(setting, preset, action, server)
|
357
367
|
end
|
358
368
|
|
369
|
+
def pm
|
370
|
+
@setting = Appsetting.find(params[:setting])
|
371
|
+
@msg = []
|
372
|
+
if params[:kill_all]
|
373
|
+
@setting.processes.each { |entry| @msg << "Process to be killed: #{entry}" }
|
374
|
+
@setting.kill!
|
375
|
+
end
|
376
|
+
if params[:kill]
|
377
|
+
procs = params[:kill].split(",")
|
378
|
+
procs.each { |entry| @msg << "Process to be killed: #{entry}"; Six::Appmanager.kill(entry) }
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
359
382
|
def fetch
|
360
383
|
@system_setting = SystemSetting.singleton
|
361
384
|
setting = nil
|
@@ -7,12 +7,12 @@ class QueryserversController < ApplicationController
|
|
7
7
|
|
8
8
|
config.columns = [:name, :ip, :port, :numplayers, :ping, :country, :gametype, :mission, :mapname, :mods, :saved_password, :updated_at,
|
9
9
|
:password, :sv_battleye, :verifysignatures, :dedicated, :favorite, :difficulty, :gamestate, :gamemode,
|
10
|
-
:language, :gamever, :platform, :exec2, :mod, :signatures, :players]
|
10
|
+
:language, :gamever, :platform, :exec2, :mod, :signatures, :players, :export_to_preset]
|
11
11
|
config.list.columns.exclude :saved_password, :ip, :port, :gamestate, :language, :difficulty, :gamemode, :mapname, :platform,
|
12
|
-
:sv_battleye, :players, :signatures, :mod
|
12
|
+
:sv_battleye, :players, :signatures, :mod, :export_to_preset
|
13
13
|
config.show.columns.exclude :mission # :players # Encoding problem when both are displayed, with russian text?
|
14
|
-
config.update.columns.exclude :exec2
|
15
|
-
config.create.columns.exclude :exec2
|
14
|
+
config.update.columns.exclude :exec2, :export_to_preset
|
15
|
+
config.create.columns.exclude :exec2, :export_to_preset
|
16
16
|
config.list.sorting = {:numplayers => :desc} #{ :name => :asc }
|
17
17
|
|
18
18
|
config.columns[:dedicated].label = "Ded"
|
@@ -34,6 +34,12 @@ class QueryserversController < ApplicationController
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
def export
|
38
|
+
record = Queryserver.find(params[:id])
|
39
|
+
cfg = record.export_to_preset
|
40
|
+
redirect_to "/sixconfigs/edit/#{cfg.id}"
|
41
|
+
end
|
42
|
+
|
37
43
|
def latest
|
38
44
|
@record = Queryserver.find(params[:id])
|
39
45
|
@record.latest
|
@@ -15,6 +15,6 @@ module ModsHelper
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def type_form_column(record, t, options)
|
18
|
-
collection_select(:record, :type, ["Arma2Mod", "Arma2StMod", "Arma2OaMod", "Arma2OaStMod", "Arma2OaCoMod"], :to_s, :to_s, {:name => options[:name]})
|
18
|
+
collection_select(:record, :type, ["Arma2Mod", "Arma2CaMod", "Arma2StMod", "Arma2OaMod", "Arma2OaStMod", "Arma2OaCoMod"], :to_s, :to_s, {:name => options[:name]})
|
19
19
|
end
|
20
20
|
end
|
@@ -19,6 +19,7 @@ class Appsetting < ActiveRecord::Base
|
|
19
19
|
DEFAULT_PARAMS = "-showScriptErrors -noSplash -noFilePatching"
|
20
20
|
DEFAULT_MODS_PARAM = "-mod=" # TODO
|
21
21
|
DEFAULT_BETA_MODS = ["beta"]
|
22
|
+
STATIC_TYPES = []
|
22
23
|
|
23
24
|
# TODO: Auto enumurate from model properties?
|
24
25
|
# folders: expansion, common, addons
|
@@ -70,6 +71,8 @@ class Appsetting < ActiveRecord::Base
|
|
70
71
|
t << e
|
71
72
|
e = e.superclass
|
72
73
|
end
|
74
|
+
t += self::STATIC_TYPES
|
75
|
+
t.uniq!
|
73
76
|
t
|
74
77
|
end
|
75
78
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class Arma2CaAppsetting < Arma2Appsetting
|
2
|
+
FRIENDLY_NAME = "ArmA 2 (CA)"
|
3
|
+
#SPECIFIC = true
|
4
|
+
#REGKEYS = {"Arma2" => ['SOFTWARE\\Bohemia Interactive Studio\\ArmA 2', 'MAIN']}
|
5
|
+
|
6
|
+
#FAMILY = Hash.new
|
7
|
+
#FAMILY["Arma2"] = [["arma2.exe", "arma2server.exe"], {"Arma2St" => []}]
|
8
|
+
end
|
@@ -5,5 +5,5 @@ class Arma2OaCoAppsetting < Arma2OaAppsetting
|
|
5
5
|
# TODO: Evaluate
|
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
9
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
class Arma2StMod <
|
1
|
+
class Arma2StMod < Arma2CaMod
|
2
2
|
#Code here
|
3
|
-
end
|
3
|
+
end
|
@@ -23,11 +23,15 @@ class Mod < ActiveRecord::Base
|
|
23
23
|
mods.uniq
|
24
24
|
end
|
25
25
|
|
26
|
+
def self.appset
|
27
|
+
Kernel.const_get(self.short+"Appsetting")
|
28
|
+
end
|
29
|
+
|
26
30
|
|
27
31
|
# arma2 mod: works for all subclasses
|
28
32
|
# armaoa mod; works for arma2-oa-st, arma2-oa-
|
29
33
|
def self.label
|
30
|
-
|
34
|
+
self.appset.label
|
31
35
|
end
|
32
36
|
|
33
37
|
def self.short
|
@@ -37,6 +41,7 @@ class Mod < ActiveRecord::Base
|
|
37
41
|
def self.types
|
38
42
|
return [Arma2Mod] if self.class == Appsetting
|
39
43
|
e = self
|
44
|
+
types = []
|
40
45
|
unless e.nil? || [Mod, ActiveRecord::Base].include?(e)
|
41
46
|
types << e
|
42
47
|
e = e.class
|
@@ -73,6 +78,11 @@ class Mod < ActiveRecord::Base
|
|
73
78
|
File.exists?(File.join(setting.real_modpath, self.real_name))
|
74
79
|
end
|
75
80
|
|
81
|
+
def has_rsync?(setting)
|
82
|
+
return false unless setting.real_modpath && self.real_name
|
83
|
+
File.exists?(File.join(setting.real_modpath, self.real_name, ".rsync"))
|
84
|
+
end
|
85
|
+
|
76
86
|
def remote
|
77
87
|
|
78
88
|
end
|
@@ -12,6 +12,17 @@ class Queryserver < ActiveRecord::Base
|
|
12
12
|
has_and_belongs_to_many :mods
|
13
13
|
has_many :sixconfigs
|
14
14
|
|
15
|
+
|
16
|
+
def export
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
def export_to_preset
|
21
|
+
cfg = Sixconfig.new(:name => "CUST - #{self.name} clone", :mods => self.mods)
|
22
|
+
cfg.save
|
23
|
+
cfg
|
24
|
+
end
|
25
|
+
|
15
26
|
def address
|
16
27
|
[self.ip, self.port].join(":")
|
17
28
|
end
|
@@ -1,6 +1,8 @@
|
|
1
|
-
= link_to "
|
1
|
+
= link_to @setting.name, "/appsettings/edit/#{@setting.id}", {:title => "#{@setting.real_exe} (#{@setting.real_path})"}
|
2
2
|
%br
|
3
|
-
|
3
|
+
= link_to "Back to index", "/config/?setting=#{params["setting"]}"
|
4
|
+
%br
|
5
|
+
- form_tag("/config/update") do
|
4
6
|
%input{:type => "hidden", :name => "options[userconfig]", :value => params["options"]["userconfig"]}
|
5
7
|
%input{:type => "hidden", :name => "setting", :value => params["setting"]}
|
6
8
|
= submit_tag "Reload"
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
= link_to @setting.name, "/appsettings/edit/#{@setting.id}", {:title => "#{@setting.real_exe} (#{@setting.real_path})"}
|
2
|
+
- form_tag do
|
2
3
|
%input{:type => "hidden", :name => "setting", :value => params["setting"]}
|
3
4
|
= select( "options", "userconfig", @userconfigs, {:selected => "#{params["options"]["userconfig"] if params["options"]}"})
|
4
5
|
= submit_tag "Change"
|
@@ -1,4 +1,6 @@
|
|
1
|
-
= link_to "
|
1
|
+
= link_to @setting.name, "/appsettings/edit/#{@setting.id}", {:title => "#{@setting.real_exe} (#{@setting.real_path})"}
|
2
|
+
%br
|
3
|
+
= link_to "Back to index", "/config/?setting=#{params["setting"]}"
|
2
4
|
%br
|
3
5
|
= link_to "Edit", "/config/edit/?setting=#{params["setting"]}&options[userconfig]=#{params["options"]["userconfig"]}"
|
4
6
|
%br
|
@@ -1,7 +1,6 @@
|
|
1
1
|
%table{ :border => 1, :width => "100%"}
|
2
2
|
%tr
|
3
3
|
%td
|
4
|
-
= link_to "Follow with Google Wave", "/main/wave"
|
5
4
|
- form_tag :action => :index do
|
6
5
|
%p
|
7
6
|
%label{ :for => "sixconfigs" }
|
@@ -46,20 +45,21 @@
|
|
46
45
|
%a{:title => "Display updater output into ajax-refreshed web-page (Handy for remote-management)" }
|
47
46
|
Remote
|
48
47
|
= check_box :system, :inweb, {:checked => @inweb}
|
48
|
+
%strong Actions
|
49
49
|
%p
|
50
50
|
= submit_tag "Execute"
|
51
51
|
|
52
52
|
= submit_tag "Save"
|
53
53
|
|
54
|
-
= submit_tag "
|
54
|
+
= submit_tag "App Manager"
|
55
55
|
|
56
|
-
= submit_tag "
|
56
|
+
= submit_tag "Edit Userconfig"
|
57
57
|
%p
|
58
|
+
= submit_tag "Reset Skip Status"
|
59
|
+
|
58
60
|
= submit_tag "Show status"
|
59
61
|
|
60
62
|
= submit_tag "Server Mod check"
|
61
|
-
|
62
|
-
= submit_tag "Edit Userconfig"
|
63
63
|
%strong Logs
|
64
64
|
- form_tag :action => :fetch do
|
65
65
|
%p
|
@@ -67,4 +67,5 @@
|
|
67
67
|
|
68
68
|
= submit_tag "Updater"
|
69
69
|
|
70
|
-
= submit_tag "Updater-Web"
|
70
|
+
= submit_tag "Updater-Web"
|
71
|
+
= link_to "Follow with Google Wave", "/main/wave"
|
@@ -2,38 +2,54 @@
|
|
2
2
|
%tr
|
3
3
|
%td
|
4
4
|
Edition: #{link_to @current_setting.nice_edition, nil, :title => "Supports mods for: #{@current_setting.found_types.map{|e| e.label}.join(", ")}" }
|
5
|
+
- if @status.size > 0
|
6
|
+
%br
|
7
|
+
= @status.join("<br />")
|
8
|
+
%br
|
9
|
+
Last sync #{@system_setting.synchronized_at ? time_ago_in_words(@system_setting.synchronized_at) + " ago" : "never"}.
|
10
|
+
Gamespy #{@system_setting.gamespied_at ? time_ago_in_words(@system_setting.gamespied_at) + " ago" : "never"}.
|
5
11
|
%br
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
- unless params[:commit] == "none"
|
13
|
+
%br
|
14
|
+
#{params[:commit]}
|
15
|
+
- if @msg.size > 0
|
16
|
+
%br
|
17
|
+
%div{:class => "green"}
|
18
|
+
%ul
|
19
|
+
- @msg.each do |m|
|
20
|
+
%li= m
|
21
|
+
- if @error.size > 0
|
22
|
+
%br
|
23
|
+
%div{:class => "red"}
|
24
|
+
%ul
|
25
|
+
- @error.each do |e|
|
26
|
+
%li= e
|
27
|
+
%table{ :border => 1, :cellpadding => "5", :width => "100%"}
|
28
|
+
%tr
|
29
|
+
%td
|
14
30
|
- if (@check.size + @skip.size + @install.size + @disabled.size + @special.size) > 0
|
15
31
|
- if @check.size > 0
|
16
|
-
%
|
17
|
-
To be checked:
|
32
|
+
%b To be checked
|
18
33
|
%br
|
19
34
|
= render :partial => "check", :locals => {:mods => @check}
|
20
|
-
- if @skip.size > 0
|
21
35
|
%br
|
22
|
-
|
36
|
+
- if @skip.size > 0
|
37
|
+
%b To be skipped
|
23
38
|
%br
|
24
39
|
= render :partial => "check", :locals => {:mods => @skip}
|
25
|
-
- if @install.size > 0
|
26
40
|
%br
|
27
|
-
|
41
|
+
- if @install.size > 0
|
42
|
+
%b Not installed
|
28
43
|
%br
|
29
44
|
= render :partial => "check", :locals => {:mods => @install}
|
30
|
-
- if @special.size > 0
|
31
45
|
%br
|
32
|
-
|
46
|
+
- if @special.size > 0
|
47
|
+
%b Special (Hover over modname to see why)
|
33
48
|
%br
|
34
49
|
= render :partial => "check", :locals => {:mods => @special}
|
35
|
-
- if @disabled.size > 0
|
36
50
|
%br
|
37
|
-
|
51
|
+
- if @disabled.size > 0
|
52
|
+
%b Disabled
|
38
53
|
%br
|
39
54
|
= render :partial => "check", :locals => {:mods => @disabled}
|
55
|
+
%br
|
@@ -3,4 +3,7 @@
|
|
3
3
|
%td{:valign => "top", :width => "40%"}
|
4
4
|
= render :partial => "main/left"
|
5
5
|
%td{:valign => "top", :width => "60%"}
|
6
|
-
|
6
|
+
- if @pm
|
7
|
+
= render :partial => "main/pm"
|
8
|
+
- else
|
9
|
+
= render :partial => @server_check ? "main/servercheck" : "main/right"
|
@@ -22,7 +22,7 @@ case RUBY_VERSION
|
|
22
22
|
end
|
23
23
|
|
24
24
|
module SixUpdaterWeb
|
25
|
-
VERSION = "0.
|
25
|
+
VERSION = "0.23.0"
|
26
26
|
COMPONENT = "six-updater-web"
|
27
27
|
|
28
28
|
DEFAULT_IP = "127.0.0.1" unless defined?(DEFAULT_IP)
|
@@ -134,9 +134,9 @@ module SixUpdaterWeb
|
|
134
134
|
|
135
135
|
module_function
|
136
136
|
|
137
|
-
def update_gamespy
|
137
|
+
def update_gamespy(nogeo = nil)
|
138
138
|
puts "Fetching server info..."
|
139
|
-
geo = ENV['NOGEO'] ? "" : nil
|
139
|
+
geo = ENV['NOGEO'] || nogeo ? "" : nil
|
140
140
|
#geo = ""
|
141
141
|
puts "Pings and Countries: #{geo.nil?}"
|
142
142
|
puts ""
|
@@ -4,7 +4,7 @@ class Object
|
|
4
4
|
# options[:default] ||= key.to_s.titleize unless ActiveScaffold::Config::Core.show_missing_translations
|
5
5
|
# options[:default] = nil if ActiveScaffold::Config::Core.show_missing_translations
|
6
6
|
# text = I18n.translate "#{key}", {:scope => [:active_scaffold]}.merge(options)
|
7
|
-
text = I18n.translate "
|
7
|
+
text = I18n.translate "%{key}", {:scope => [:active_scaffold], :default => key.is_a?(String) ? key : key.to_s.titleize}.merge(options)
|
8
8
|
end
|
9
9
|
text
|
10
10
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 23
|
8
|
+
- 0
|
9
|
+
version: 0.23.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sickboy
|
@@ -158,6 +158,8 @@ files:
|
|
158
158
|
- lib/six-updater-web/app/models/action.rb
|
159
159
|
- lib/six-updater-web/app/models/appsetting.rb
|
160
160
|
- lib/six-updater-web/app/models/arma2_appsetting.rb
|
161
|
+
- lib/six-updater-web/app/models/arma2_ca_appsetting.rb
|
162
|
+
- lib/six-updater-web/app/models/arma2_ca_mod.rb
|
161
163
|
- lib/six-updater-web/app/models/arma2_mod.rb
|
162
164
|
- lib/six-updater-web/app/models/arma2_oa_appsetting.rb
|
163
165
|
- lib/six-updater-web/app/models/arma2_oa_co_appsetting.rb
|
@@ -198,6 +200,7 @@ files:
|
|
198
200
|
- lib/six-updater-web/app/views/main/wave.haml
|
199
201
|
- lib/six-updater-web/app/views/main/_check.haml
|
200
202
|
- lib/six-updater-web/app/views/main/_left.haml
|
203
|
+
- lib/six-updater-web/app/views/main/_pm.haml
|
201
204
|
- lib/six-updater-web/app/views/main/_right.haml
|
202
205
|
- lib/six-updater-web/app/views/main/_servercheck.haml
|
203
206
|
- lib/six-updater-web/app/views/main/_test.haml
|