six-updater-web 0.23.3 → 0.23.4

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.23.3'
10
+ s.version = '0.23.4'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -91,7 +91,7 @@ class MainController < ApplicationController
91
91
  end
92
92
 
93
93
  if gslist_installed
94
- @msg << "Updating Gamespy...This will take a while, please wait until done!"
94
+ @msg << "<b>A window should open displaying the gamespy progress</b>"
95
95
  if gs_geo
96
96
  @system_setting.update_gamespy #(true)
97
97
  else
@@ -112,12 +112,10 @@ class MainController < ApplicationController
112
112
 
113
113
  when "purge_gamespy"
114
114
  d = false
115
- if params["really"]
116
- if params["really"]["sure"] == "1"
117
- Queryserver.purge
118
- @msg << "Purged Gamespy..."
119
- d = true
120
- end
115
+ if params["really"] && params["really"]["sure"] == "1"
116
+ Queryserver.purge
117
+ @msg << "Purged Gamespy..."
118
+ d = true
121
119
  end
122
120
  @error << "<b>ERROR: Please confirm by checking the checkbox</b>" if !d
123
121
  end
@@ -207,12 +205,10 @@ class MainController < ApplicationController
207
205
  @system_setting.save
208
206
  end
209
207
 
210
- if grab
211
- if params["all"]
212
- preset = Sixconfig.new
213
- preset.name = "Dynamic"
214
- preset.mods += Mod.find(:all)
215
- end
208
+ if grab && params["all"]
209
+ preset = Sixconfig.new
210
+ preset.name = "Dynamic"
211
+ preset.mods += Mod.find(:all)
216
212
  end
217
213
 
218
214
  if preset
@@ -17,7 +17,7 @@ class Queryserver < ActiveRecord::Base
17
17
  end
18
18
 
19
19
  def export_to_preset
20
- cfg = Sixconfig.new(:name => "CUST - #{self.name} clone", :mods => self.mods)
20
+ cfg = Sixconfig.new(:name => "CUST - #{self.name} clone", :mods => self.mods.reject {|e| e.new_record? })
21
21
  cfg.save
22
22
  cfg
23
23
  end
@@ -4,6 +4,8 @@ class Repository < ActiveRecord::Base
4
4
 
5
5
  attr_accessor :ping_value
6
6
 
7
+ PING_PACKET_SIZE = 1400
8
+
7
9
  def self.rank(pr = false)
8
10
  repos = self.find(:all)
9
11
  repos.each do |rep|
@@ -22,7 +24,7 @@ class Repository < ActiveRecord::Base
22
24
 
23
25
  def ping!
24
26
  logger.info "Handling #{self.address}"
25
- out = %x[ping -n 10 #{self.address}]
27
+ out = %x[ping -n 10 -f -l #{PING_PACKET_SIZE} #{self.address}]
26
28
  vals = []
27
29
  out.each_line do |l|
28
30
  l[/=([0-9]*)ms/]
@@ -37,7 +39,7 @@ class Repository < ActiveRecord::Base
37
39
  end
38
40
 
39
41
  def ping
40
- SixUpdaterWeb.run_program("ping", SixUpdaterWeb::BASE_PATH, "-r 9 -n 30 -t #{self.address}")
42
+ SixUpdaterWeb.run_program("ping", SixUpdaterWeb::BASE_PATH, "-f -l #{PING_PACKET_SIZE} -r 9 -n 30 -t #{self.address}")
41
43
  end
42
44
 
43
45
  def tracert
@@ -31,7 +31,7 @@ class Sixconfig < ActiveRecord::Base
31
31
  m.each {|mod| if (mod.new_record? && !mod.exists?(self.appsetting)); mod.disabled = true; end }
32
32
  ms = []
33
33
  m.each {|mod| ms += mod.all_dependentmods; ms << mod }
34
- ms.uniq
34
+ ms.uniq.reject{|e| e.class == Mod} # Shitty workaround for crap input (Wrong type mods...)
35
35
  end
36
36
 
37
37
  def exec
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.23.3"
25
+ VERSION = "0.23.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
  - 23
8
- - 3
9
- version: 0.23.3
8
+ - 4
9
+ version: 0.23.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy