six-updater-web 0.24.4 → 0.24.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.24.4'
10
+ s.version = '0.24.5'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -23,7 +23,7 @@ spec = Gem::Specification.new do |s|
23
23
  s.add_dependency('six-updater', '>= 0.22.1')
24
24
  s.add_dependency('sqlite3-ruby', '~> 1.3.1')
25
25
  s.add_dependency('rails', '2.3.8')
26
- s.add_dependency('haml', '~> 3.0.18')
26
+ s.add_dependency('haml', '~> 3.0.21')
27
27
  #s.add_dependency('minitar', '~> 0.5.3')
28
28
  s.add_dependency('coderay', '~> 0.9.3')
29
29
  s.add_dependency('RedCloth', '~> 4.2.2')
@@ -25,6 +25,8 @@ class Appsetting < ActiveRecord::Base
25
25
  GAMESPY_TYPES = ["arma2pc"]
26
26
  GAME_MIN_VERSIONS = ["1.0"]
27
27
 
28
+ MODS = []
29
+
28
30
  # TODO: Auto enumurate from model properties?
29
31
  # folders: expansion, common, addons
30
32
  # files: arma2.exe, arma2server.exe (-.exe for linux), arma2oa.exe, arma2oaserver.exe, addons/chernarus.pbo
@@ -45,9 +47,7 @@ class Appsetting < ActiveRecord::Base
45
47
  end
46
48
  hash[:app_path] = self.real_path unless hash[:app_path]
47
49
  hash[:app_exe] = self.real_exe unless hash[:app_exe]
48
- if self.beta
49
- hash[:mods] = self.edition::DEFAULT_BETA_MODS.map{|e| e.gsub("/", "\\")}.join(";")
50
- end
50
+ hash[:mods] = self.modfolders.join(";").gsub("/", "\\")
51
51
  hash
52
52
  end
53
53
 
@@ -299,4 +299,12 @@ class Appsetting < ActiveRecord::Base
299
299
  nil
300
300
  end
301
301
  end
302
+
303
+ def modfolders
304
+ if self.beta
305
+ self.edition::DEFAULT_BETA_MODS
306
+ else
307
+ []
308
+ end
309
+ end
302
310
  end
@@ -8,6 +8,7 @@ class Arma2OaAppsetting < Arma2Appsetting
8
8
  DEFAULT_SERVER_EXE = "arma2oaserver.exe"
9
9
  DEFAULT_SERVER_EXE_PATH = DEFAULT_EXE_PATH
10
10
  DEFAULT_BETA_MODS = ["expansion/beta", "expansion/beta/expansion"]
11
+ MODS = ["Expansion"]
11
12
 
12
13
  REGKEYS = {"Arma2Oa" => ['SOFTWARE\\Bohemia Interactive Studio\\ArmA 2 OA', 'MAIN']}
13
14
 
@@ -8,4 +8,18 @@ class Arma2OaCoAppsetting < Arma2OaAppsetting
8
8
  STATIC_TYPES = [Arma2CaAppsetting]
9
9
  GAMESPY_TYPES = ["arma2oapc", "arma2pc"]
10
10
  GAME_MIN_VERSIONS = ["1.5", "1.0"]
11
- end
11
+
12
+ def modfolders
13
+ v = Appsetting::REGKEYS["Arma2"]
14
+ @mpath = begin; Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, v[0])[v[1]]; rescue; nil; end
15
+ m = !File.directory?(File.join(self.class.default_path, 'addons')) && !@mpath.nil? && @mpath != self.class.default_path ? [@mpath] : []
16
+ if !m.empty?
17
+ m = m + self.class::MODS
18
+ end
19
+ if self.beta
20
+ m + self.edition::DEFAULT_BETA_MODS
21
+ else
22
+ m
23
+ end
24
+ end
25
+ end
@@ -48,7 +48,7 @@ Rails::Initializer.run do |config|
48
48
  # Specify gems that this application depends on and have them installed with rake gems:install
49
49
  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
50
50
  config.gem "sqlite3-ruby", :lib => "sqlite3"
51
- config.gem "haml", :version => "~> 3.0.18"
51
+ config.gem "haml", :version => "~> 3.0.21"
52
52
  config.gem "coderay"
53
53
  #config.gem "minitar"
54
54
  #config.gem "uuidtools"
@@ -23,7 +23,7 @@ end
23
23
  require 'open3'
24
24
 
25
25
  module SixUpdaterWeb
26
- VERSION = "0.24.4"
26
+ VERSION = "0.24.5"
27
27
  COMPONENT = "six-updater-web"
28
28
 
29
29
  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
  - 24
8
- - 4
9
- version: 0.24.4
8
+ - 5
9
+ version: 0.24.5
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-09-21 00:00:00 +02:00
17
+ date: 2010-10-17 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -88,8 +88,8 @@ dependencies:
88
88
  segments:
89
89
  - 3
90
90
  - 0
91
- - 18
92
- version: 3.0.18
91
+ - 21
92
+ version: 3.0.21
93
93
  type: :runtime
94
94
  version_requirements: *id005
95
95
  - !ruby/object:Gem::Dependency