six-updater-web 0.21.4 → 0.21.5

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
@@ -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.21.4'
10
+ s.version = '0.21.5'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -102,7 +102,8 @@ class Appsetting < ActiveRecord::Base
102
102
 
103
103
  def real_params
104
104
  if self.params.nil?
105
- self.detect_edition::DEFAULT_PARAMS
105
+ edition = self.detect_edition
106
+ edition ? edition::DEFAULT_PARAMS : nil
106
107
  else
107
108
  self.params
108
109
  end
@@ -209,7 +210,8 @@ class Appsetting < ActiveRecord::Base
209
210
  def detect_edition
210
211
  # TODO: Read the appsetting.exe to figure out an edition, as a static setting by the user?
211
212
  return self.class if self.class::SPECIFIC
212
- return self.class unless self.real_path
213
+ return nil unless self.real_path
214
+ #return self.class unless self.real_path
213
215
  game = nil
214
216
  cond = nil
215
217
  ed = nil
@@ -275,16 +277,17 @@ class Appsetting < ActiveRecord::Base
275
277
  #Arma2StAppsetting
276
278
  # TODO: Add detection support based on user settings (exe/path)
277
279
  return self.class unless self.real_path
278
- d = self.detect_edition
279
- d ? d : self.class
280
+ self.detect_edition
280
281
  end
281
282
 
282
283
  def found_types
283
- self.found_type.types
284
+ t = self.found_type
285
+ t ? t.types : []
284
286
  end
285
287
 
286
288
  def nice_found_type
287
- self.found_type.label
289
+ t = self.found_type
290
+ t ? t.label : nil
288
291
  end
289
292
 
290
293
  def self.types
@@ -19,10 +19,13 @@ class Sixconfig < ActiveRecord::Base
19
19
  m += srv.mods if srv
20
20
  self.mods.each { |mod| m << mod unless m.include?(mod) }
21
21
  if setting.beta
22
- setting.found_type::DEFAULT_BETA_MODS.each do |mf|
23
- mod = Mod.find_by_name(mf)
24
- next unless mod
25
- m << mod unless m.include?(mod)
22
+ t = setting.found_type
23
+ if t
24
+ t::DEFAULT_BETA_MODS.each do |mf|
25
+ mod = Mod.find_by_name(mf)
26
+ next unless mod
27
+ m << mod unless m.include?(mod)
28
+ end
26
29
  end
27
30
  end
28
31
  m.each {|mod| if (mod.new_record? && !mod.exists?(self.appsetting)); mod.disabled = true; end }
@@ -38,6 +38,7 @@
38
38
  %a{:title => "Enable (dedicated) server mode" }
39
39
  Server
40
40
  = select( "system", "server_bool", ["default", "true", "false"], {:selected => @server_bool.to_s})
41
+ &nbsp;
41
42
  %a{:title => "Only update mods whos online version doesnt match local" }
42
43
  Autoskip
43
44
  = check_box :system, :autoskip, {:checked => @autoskip}
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.21.4"
25
+ VERSION = "0.21.5"
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
  - 21
8
- - 4
9
- version: 0.21.4
8
+ - 5
9
+ version: 0.21.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy