six-updater-web 0.16.0 → 0.16.2

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.16.0'
10
+ s.version = '0.16.2'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
20
20
  s.executables = ['six-updater-web', 'six-updater-web-rake', 'six-get']
21
21
  s.add_dependency('uuidtools', '>= 2.0.0')
22
22
  s.add_dependency('six-updater', '>= 0.17.0')
23
- s.add_dependency('rails', '2.3.6')
23
+ s.add_dependency('rails', '2.3.8')
24
24
  s.add_dependency('haml', '>= 2.2.0')
25
25
  s.add_dependency('RedCloth', '>= 4.2.2')
26
26
  end
@@ -81,9 +81,9 @@ class MainController < ApplicationController
81
81
  if gslist_installed
82
82
  @msg << "Updating Gamespy...This will take a while, please wait until done!<br />"
83
83
  if gs_geo
84
- @system_setting.update_gamespy
84
+ @system_setting.update_gamespy #(true)
85
85
  else
86
- @system_setting.update_gamespy_nogeo
86
+ @system_setting.update_gamespy_nogeo #(true)
87
87
  end
88
88
  else
89
89
  @msg << "<b>ERROR: gslist tool is missing!</b><br />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}<br />"
@@ -14,20 +14,30 @@ class SystemSetting < ActiveRecord::Base
14
14
  "rake" # .bat on Windows
15
15
  end
16
16
 
17
- def update_gamespy
17
+ def update_gamespy(internal = false)
18
18
  self.gamespied_at = Time.now
19
19
  self.save
20
- cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']}" # + cl
21
- cl += " BASE_PATH=\'#{SixUpdaterWeb::BASE_PATH}\'" if defined?(SixUpdaterWeb::OLDLOCATION)
22
- SixUpdaterWeb.run_program(exec, RAILS_ROOT, cl)
20
+ ENV['NOGEO'] = nil
21
+ if internal
22
+ SixUpdaterWeb.update_gamespy
23
+ else
24
+ cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']}" # + cl
25
+ cl += " BASE_PATH=\'#{SixUpdaterWeb::BASE_PATH}\'" if defined?(SixUpdaterWeb::OLDLOCATION)
26
+ SixUpdaterWeb.run_program(exec, RAILS_ROOT, cl)
27
+ end
23
28
  end
24
29
 
25
- def update_gamespy_nogeo
30
+ def update_gamespy_nogeo(internal = false)
26
31
  self.gamespied_at = Time.now
27
32
  self.save
28
- cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']} NOGEO=1" # + cl
29
- cl += " BASE_PATH=\'#{SixUpdaterWeb::BASE_PATH}\'" if defined?(SixUpdaterWeb::OLDLOCATION)
30
- SixUpdaterWeb.run_program(exec, RAILS_ROOT, cl)
33
+ ENV['NOGEO'] = "1"
34
+ if internal
35
+ SixUpdaterWeb.update_gamespy
36
+ else
37
+ cl = "sync:gamespy RAILS_ENV=#{ENV['RAILS_ENV']} NOGEO=1" # + cl
38
+ cl += " BASE_PATH=\'#{SixUpdaterWeb::BASE_PATH}\'" if defined?(SixUpdaterWeb::OLDLOCATION)
39
+ SixUpdaterWeb.run_program(exec, RAILS_ROOT, cl)
40
+ end
31
41
  end
32
42
 
33
43
  def synchronize
@@ -1,7 +1,7 @@
1
1
  # Be sure to restart your server when you modify this file
2
2
 
3
3
  # Specifies gem version of Rails to use when vendor/rails is not present
4
- RAILS_GEM_VERSION = '2.3.6' unless defined? RAILS_GEM_VERSION
4
+ RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
5
5
 
6
6
  class String
7
7
  def safe_concat(v)
@@ -12,6 +12,10 @@ end
12
12
  # Bootstrap the Rails environment, frameworks, and default configuration
13
13
  require_relative 'boot'
14
14
 
15
+ if ENV['RAILS_ENV'].nil? || ENV['RAILS_ENV'].empty?
16
+ ENV['RAILS_ENV'] = Rails.env
17
+ end
18
+
15
19
  require_relative 'six-updater-web'
16
20
 
17
21
  if defined?(SixUpdaterWeb::OLDLOCATION)
@@ -69,8 +73,6 @@ Rails::Initializer.run do |config|
69
73
  SixUpdaterWeb.after_initialize
70
74
  end
71
75
 
72
-
73
-
74
76
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
75
77
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
76
78
  # config.i18n.default_locale = :de
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.16.0"
25
+ VERSION = "0.16.2"
26
26
  COMPONENT = "six-updater-web"
27
27
 
28
28
  DEFAULT_IP = "127.0.0.1" unless defined?(DEFAULT_IP)
@@ -48,12 +48,6 @@ module SixUpdaterWeb
48
48
  args = ARGV.join(" ")
49
49
  if args[/RAILS_ENV=(\w*)/]
50
50
  ENV["RAILS_ENV"] = $1
51
- else
52
- if ENV['RAILS_ENV']
53
- ENV["RAILS_ENV"] = "development" if ENV["RAILS_ENV"].empty?
54
- else
55
- ENV["RAILS_ENV"] = "development"
56
- end
57
51
  end
58
52
 
59
53
  rpath, distro = nil, nil
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 16
8
- - 0
9
- version: 0.16.0
8
+ - 2
9
+ version: 0.16.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-23 00:00:00 +02:00
17
+ date: 2010-06-01 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -58,8 +58,8 @@ dependencies:
58
58
  segments:
59
59
  - 2
60
60
  - 3
61
- - 6
62
- version: 2.3.6
61
+ - 8
62
+ version: 2.3.8
63
63
  type: :runtime
64
64
  version_requirements: *id003
65
65
  - !ruby/object:Gem::Dependency
@@ -899,7 +899,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
899
899
  requirements: []
900
900
 
901
901
  rubyforge_project:
902
- rubygems_version: 1.3.7.pre.1
902
+ rubygems_version: 1.3.7
903
903
  signing_key:
904
904
  specification_version: 3
905
905
  summary: Your summary here