six-updater-web 0.21.5 → 0.21.6

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.21.5'
10
+ s.version = '0.21.6'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -72,7 +72,8 @@ class Appsetting < ActiveRecord::Base
72
72
  end
73
73
 
74
74
  def get_exe
75
- edition = self.detect_edition
75
+ edition = self.class::SPECIFIC ? self.class : self.detect_edition
76
+ return nil unless edition
76
77
  if self.server
77
78
  if self.beta
78
79
  edition::DEFAULT_BETA_EXE_PATH.size == 0 ? edition::DEFAULT_SERVER_EXE : "#{edition::DEFAULT_BETA_EXE_PATH}/#{edition::DEFAULT_SERVER_EXE}"
@@ -209,9 +210,13 @@ class Appsetting < ActiveRecord::Base
209
210
 
210
211
  def detect_edition
211
212
  # TODO: Read the appsetting.exe to figure out an edition, as a static setting by the user?
212
- return self.class if self.class::SPECIFIC
213
- return nil unless self.real_path
214
- #return self.class unless self.real_path
213
+
214
+ return nil if self.real_path.nil?
215
+ return nil unless File.directory?(self.real_path)
216
+ if self.class::SPECIFIC
217
+ return self.class if File.exists?(File.join(self.real_path, self.real_exe))
218
+ end
219
+ #return self.class if self.class::SPECIFIC
215
220
  game = nil
216
221
  cond = nil
217
222
  ed = nil
@@ -1,7 +1,8 @@
1
1
  %table{ :border => 1, :cellpadding => "5", :width => "100%"}
2
2
  %tr
3
3
  %td
4
- Edition: #{link_to @current_setting.nice_found_type, nil, :title => "Supports mods for: #{@current_setting.found_types.map{|e| e.label}.join(", ")}" }
4
+ - t = @current_setting.nice_found_type
5
+ Edition: #{link_to t ? t : "ERROR: None detected", nil, :title => "Supports mods for: #{@current_setting.found_types.map{|e| e.label}.join(", ")}" }
5
6
  %br
6
7
  Last sync #{@system_setting.synchronized_at ? time_ago_in_words(@system_setting.synchronized_at) + " ago" : "never"}
7
8
  Gamespy #{@system_setting.gamespied_at ? time_ago_in_words(@system_setting.gamespied_at) + " ago" : "never"}
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.21.5"
25
+ VERSION = "0.21.6"
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
- - 5
9
- version: 0.21.5
8
+ - 6
9
+ version: 0.21.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy