six-arma-tools 0.2.0 → 0.2.1
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 +1 -1
- data/lib/six/arma/tools.rb +1 -1
- data/lib/six/arma/tools/pbodll.rb +9 -4
- metadata +3 -3
data/Rakefile
CHANGED
data/lib/six/arma/tools.rb
CHANGED
|
@@ -14,10 +14,11 @@ module Six
|
|
|
14
14
|
attr_reader(:source) # allows instance.attribute to be read (e.g convert.source)
|
|
15
15
|
attr_accessor(:destination) # allows instance.attribute to be read and written (e.g convert.destination)
|
|
16
16
|
|
|
17
|
-
def initialize(source, destination = source)
|
|
17
|
+
def initialize(source, destination = source, options = {})
|
|
18
18
|
source.gsub!("\\", "/")
|
|
19
19
|
destination.gsub!("\\", "/")
|
|
20
20
|
@source = source
|
|
21
|
+
@options = options
|
|
21
22
|
source[/(.*)\//]
|
|
22
23
|
if destination == $1
|
|
23
24
|
@same = true
|
|
@@ -215,8 +216,13 @@ module Six
|
|
|
215
216
|
end
|
|
216
217
|
|
|
217
218
|
def sign(params = {})
|
|
218
|
-
# TODO: Prefix calculation.... use auto_prefix?
|
|
219
|
+
# TODO: Prefix calculation.... use auto_prefix?
|
|
220
|
+
params[:key] = @options[:key] unless params[:key]
|
|
221
|
+
params[:key] = settings[:key] unless params[:key]
|
|
219
222
|
if params[:key]
|
|
223
|
+
unless File.exists?(params[:key])
|
|
224
|
+
Dir.chdir(File.dirname(params[:key])) { system "#{tool('dscreatekey.exe')} #{File.basename(params[:key].sub(".biprivatekey", ""))}" }
|
|
225
|
+
end
|
|
220
226
|
params[:key].gsub!('/', '\\')
|
|
221
227
|
@source[/(.*)\/(.*)/]
|
|
222
228
|
path = $1
|
|
@@ -224,8 +230,7 @@ module Six
|
|
|
224
230
|
file += ".pbo" unless file[/\.pbo\Z/]
|
|
225
231
|
# TODO: Export path to config
|
|
226
232
|
log.info "Signing"
|
|
227
|
-
Dir.chdir
|
|
228
|
-
system "#{tool('dssignfile.exe')} #{params[:key]} #{file}"
|
|
233
|
+
Dir.chdir(path) { system "#{tool('dssignfile.exe')} #{params[:key]} #{file}" }
|
|
229
234
|
end
|
|
230
235
|
end
|
|
231
236
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: six-arma-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.2.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- ""
|