six-updater-web 0.15.3 → 0.15.4

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.15.3'
10
+ s.version = '0.15.4'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -10,7 +10,7 @@ class MainController < ApplicationController
10
10
  @autoskip = @system_setting.autoskip
11
11
  @autoskip = true if @autoskip.nil?
12
12
  @inweb = @system_setting.inweb
13
- @queryserver = nil
13
+ @queryserver = Queryserver.new
14
14
 
15
15
  if @system_setting.synchronized_at
16
16
  ok = false if @system_setting.synchronized_at > 30.minutes.ago
@@ -140,7 +140,7 @@ class MainController < ApplicationController
140
140
  setting = fetch_param([:setting], Appsetting, setting)
141
141
  queryserver = fetch_param([:gamespy], Queryserver, queryserver)
142
142
  if queryserver
143
- @queryserver = queryserver.id
143
+ @queryserver = queryserver
144
144
  server = queryserver.dynamic_server
145
145
  end
146
146
 
@@ -390,19 +390,43 @@ class MainController < ApplicationController
390
390
  private
391
391
  def act
392
392
  @preset = if @system_setting.favorite_preset
393
- @system_setting.favorite_preset.to_s
393
+ begin
394
+ Sixconfig.find(@system_setting.favorite_preset.to_s)
395
+ rescue
396
+ Sixconfig.new
397
+ end
398
+ else
399
+ Sixconfig.new
394
400
  end
395
401
 
396
402
  @server = if @system_setting.favorite_server
397
- @system_setting.favorite_server.to_s
403
+ begin
404
+ Server.find(@system_setting.favorite_server.to_s)
405
+ rescue
406
+ Server.new
407
+ end
408
+ else
409
+ Server.new
398
410
  end
399
411
 
400
412
  @action = if @system_setting.favorite_action
401
- @system_setting.favorite_action.to_s
413
+ begin
414
+ Action.find(@system_setting.favorite_action.to_s)
415
+ rescue
416
+ Action.new
417
+ end
418
+ else
419
+ Action.new
402
420
  end
403
421
 
404
422
  @setting = if @system_setting.favorite_settings_profile
405
- @system_setting.favorite_settings_profile.to_s
423
+ begin
424
+ Appsetting.find(@system_setting.favorite_settings_profile.to_s)
425
+ rescue
426
+ Appsetting.new
427
+ end
428
+ else
429
+ Appsetting.new
406
430
  end
407
431
  end
408
432
 
@@ -9,7 +9,7 @@
9
9
  %label{ :for => "sixconfigs" }
10
10
  = link_to "Preset", "/sixconfigs", :title => "Click to access Presets overview"
11
11
  &nbsp;
12
- = record_select_field 'config', @preset ? Sixconfig.find(@preset) : Sixconfig.new
12
+ = record_select_field 'config', @preset
13
13
  = submit_tag "Edit"
14
14
  = submit_tag "Sync", :name => "portalsync"
15
15
  %strong Optional Preset Overrides
@@ -17,19 +17,19 @@
17
17
  %label{ :for => "actions" }
18
18
  = link_to "Action", "/actions", :title => "Click to access Actions overview"
19
19
  &nbsp;
20
- = record_select_field 'act', @action ? Action.find(@action) : Action.new
20
+ = record_select_field 'act', @action
21
21
  %p
22
22
  %label{ :for => "servers" }
23
23
  = link_to "Server", "/queryservers", :title => "Click to access Gamespy browser overview"
24
24
  &nbsp;
25
- = record_select_field 'gamespy', @queryserver ? Queryserver.find(@queryserver) : Queryserver.new
25
+ = record_select_field 'gamespy', @queryserver
26
26
  = submit_tag "Show"
27
27
  = submit_tag "Sync", :name => "serversync"
28
28
  %p
29
29
  %label{ :for => "settings" }
30
30
  = link_to "Setting", "/appsettings", :title => "Click to access Settings Profiles overview"
31
31
  &nbsp;
32
- = record_select_field 'setting', @setting ? Appsetting.find(@setting) : Appsetting.new
32
+ = record_select_field 'setting', @setting
33
33
  %p
34
34
  = submit_tag "Execute"
35
35
  &nbsp;
@@ -39,7 +39,7 @@
39
39
  %a{:title => "Only update mods whos online version doesnt match local" }
40
40
  Autoskip
41
41
  &nbsp;
42
- = check_box :system, :inweb, {:checked => @system_setting.inweb}
42
+ = check_box :system, :inweb, {:checked => @inweb}
43
43
  %a{:title => "Display updater output into ajax-refreshed web-page (Handy for remote-management)" }
44
44
  Integrated
45
45
  %p
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.15.3"
25
+ VERSION = "0.15.4"
26
26
  COMPONENT = "six-updater-web"
27
27
 
28
28
  DEFAULT_IP = "127.0.0.1" unless defined?(DEFAULT_IP)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 15
8
- - 3
9
- version: 0.15.3
8
+ - 4
9
+ version: 0.15.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy