six-updater-web 0.21.1 → 0.21.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.21.1'
10
+ s.version = '0.21.2'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -264,7 +264,7 @@ class MainController < ApplicationController
264
264
  @msg << "<br /><b>WARNING:</b> There seem to be open arma processes: #{setting.real_exe}<br />Pids: #{procs}"
265
265
  end
266
266
 
267
- preset.all_mods(server).each do |mod|
267
+ preset.all_mods(server, setting).each do |mod|
268
268
  mod.update_version(setting.real_path) # TODO: this already runs in updater_yml, but there doesn't run if autoskip is disabled
269
269
  if reset && !@autoskip
270
270
  mod.skip = false
@@ -49,7 +49,7 @@ class Appsetting < ActiveRecord::Base
49
49
  hash[:app_path] = self.real_path unless hash[:app_path]
50
50
  hash[:app_exe] = self.real_exe unless hash[:app_exe]
51
51
  if self.beta
52
- hash[:mods] = self.found_type::DEFAULT_BETA_MODS.join(";")
52
+ hash[:mods] = self.found_type::DEFAULT_BETA_MODS.map{|e| e.gsub("/", "\\")}.join(";")
53
53
  end
54
54
  hash
55
55
  end
@@ -7,7 +7,7 @@ class Arma2OaAppsetting < Arma2Appsetting
7
7
  DEFAULT_BETA_EXE_PATH = "expansion/beta"
8
8
  DEFAULT_SERVER_EXE = "arma2oaserver.exe"
9
9
  DEFAULT_SERVER_EXE_PATH = DEFAULT_EXE_PATH
10
- DEFAULT_BETA_MODS = ["expansion\\beta", "expansion\\beta\\expansion"]
10
+ DEFAULT_BETA_MODS = ["expansion/beta", "expansion/beta/expansion"]
11
11
 
12
12
  REGKEYS = {"Arma2Oa" => ['SOFTWARE\\Bohemia Interactive Studio\\ArmA 2 OA', 'MAIN']}
13
13
 
@@ -14,10 +14,17 @@ class Sixconfig < ActiveRecord::Base
14
14
  end
15
15
  end
16
16
 
17
- def all_mods(srv = self.get_server)
17
+ def all_mods(srv = self.get_server, setting = Appsetting.new)
18
18
  m = []
19
19
  m += srv.mods if srv
20
20
  self.mods.each { |mod| m << mod unless m.include?(mod) }
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)
26
+ end
27
+ end
21
28
  m.each {|mod| if (mod.new_record? && !mod.exists?(self.appsetting)); mod.disabled = true; end }
22
29
  ms = []
23
30
  m.each {|mod| ms += mod.all_dependentmods; ms << mod }
@@ -94,7 +101,7 @@ class Sixconfig < ActiveRecord::Base
94
101
 
95
102
  setting = Appsetting.new unless setting
96
103
 
97
- self.all_mods(srv).each do |mod|
104
+ self.all_mods(srv, setting).each do |mod|
98
105
  if force
99
106
  mod.skip = false
100
107
  else
@@ -130,7 +137,7 @@ class Sixconfig < ActiveRecord::Base
130
137
  hash = setting.to_updater_yml
131
138
  hash[:folders] = []
132
139
 
133
- self.all_mods(srv).each do |mod|
140
+ self.all_mods(srv, setting).each do |mod|
134
141
  y = mod.to_updater_yml
135
142
  hash[:folders] << y unless hash[:folders].include?(y)
136
143
  end
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.21.1"
25
+ VERSION = "0.21.2"
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
- - 1
9
- version: 0.21.1
8
+ - 2
9
+ version: 0.21.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy