roku_builder 4.26.2 → 4.27.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f004d2edb610a728667cd7f9e64cb8ff2274a7592c192127b844f34323acbd39
|
4
|
+
data.tar.gz: 8d5fa5f02a5b15e15ca1f4e02ee14be1cea8536902b8e8736ef99137baff7235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: feebd2677a569000a4d9d2ff3467d873c3d207491cbbdd62c76de3388752f245b57c026d8b1a949c31414f602f613cdf9e8c7f03b4189f0b8f3c9fd201e34af6
|
7
|
+
data.tar.gz: 9fc9f42ef0eefbc4674b0f3e48ae21037480a416f1994e65eca6a309f0ea8f580ba70c045089609396950f1a3803503d61b3e73af0b7a2e12f517c5e22aff1dc
|
@@ -83,24 +83,30 @@ module RokuBuilder
|
|
83
83
|
def setup_in_out_file
|
84
84
|
[:in, :out].each do |type|
|
85
85
|
@parsed[type] = {file: nil, folder: nil}
|
86
|
-
if
|
86
|
+
if user_file(type)
|
87
87
|
if file_defined?(type)
|
88
88
|
setup_file_and_folder(type)
|
89
|
-
elsif
|
90
|
-
@parsed[type][:folder] = File.expand_path(
|
89
|
+
elsif user_file(type)
|
90
|
+
@parsed[type][:folder] = File.expand_path(user_file(type))
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
94
94
|
set_default_outfile
|
95
95
|
end
|
96
96
|
|
97
|
+
def user_file(type)
|
98
|
+
file = @options[type]
|
99
|
+
file ||= @config[type]
|
100
|
+
file
|
101
|
+
end
|
102
|
+
|
97
103
|
def file_defined?(type)
|
98
|
-
|
104
|
+
user_file(type).end_with?(".zip") or user_file(type).end_with?(".pkg") or user_file(type).end_with?(".jpg")
|
99
105
|
end
|
100
106
|
|
101
107
|
def setup_file_and_folder(type)
|
102
|
-
@parsed[type][:folder], @parsed[type][:file] = Pathname.new(
|
103
|
-
if @parsed[type][:folder] == "." and not
|
108
|
+
@parsed[type][:folder], @parsed[type][:file] = Pathname.new(user_file(type)).split.map{|p| p.to_s}
|
109
|
+
if @parsed[type][:folder] == "." and not user_file(type).start_with?(".")
|
104
110
|
@parsed[type][:folder] = nil
|
105
111
|
else
|
106
112
|
@parsed[type][:folder] = File.expand_path(@parsed[type][:folder])
|
@@ -87,7 +87,8 @@ module RokuBuilder
|
|
87
87
|
@sca_warning[:severity] = data[1].gsub(/(\[|\])/, "").downcase
|
88
88
|
@sca_warning[:message] = data[2]
|
89
89
|
elsif data = /^\s*Path: ([^ ]*) Line: (\d*)./.match(result_line)
|
90
|
-
@sca_warning[:path] = data[1]
|
90
|
+
@sca_warning[:path] = data[1]
|
91
|
+
@sca_warning[:line] = data[2].to_i
|
91
92
|
elsif @sca_warning and @sca_warning[:message]
|
92
93
|
@sca_warning[:message] += " " + result_line
|
93
94
|
end
|
data/lib/roku_builder/version.rb
CHANGED
@@ -345,5 +345,39 @@ module RokuBuilder
|
|
345
345
|
assert_equal tmp_folder, parsed[:out][:folder]
|
346
346
|
assert_equal "file.jpg", parsed[:out][:file]
|
347
347
|
end
|
348
|
+
def test_outfile_config_config_out
|
349
|
+
config = good_config(ConfigParserTest)
|
350
|
+
config[:out] = "/home/user"
|
351
|
+
options = build_options({validate: true, working: true, out: nil})
|
352
|
+
parsed = ConfigParser.parse(options: options, config: config)
|
353
|
+
|
354
|
+
refute_nil parsed[:out]
|
355
|
+
refute_nil parsed[:out][:folder]
|
356
|
+
assert_nil parsed[:out][:file]
|
357
|
+
assert_equal "/home/user", parsed[:out][:folder]
|
358
|
+
end
|
359
|
+
def test_outfile_config_config_out_file
|
360
|
+
config = good_config(ConfigParserTest)
|
361
|
+
config[:out] = "/home/user/file.pkg"
|
362
|
+
options = build_options({validate: true, working: true, out: nil})
|
363
|
+
parsed = ConfigParser.parse(options: options, config: config)
|
364
|
+
|
365
|
+
refute_nil parsed[:out]
|
366
|
+
refute_nil parsed[:out][:folder]
|
367
|
+
refute_nil parsed[:out][:file]
|
368
|
+
assert_equal "/home/user", parsed[:out][:folder]
|
369
|
+
assert_equal "file.pkg", parsed[:out][:file]
|
370
|
+
end
|
371
|
+
def test_outfile_config_config_and_option_out
|
372
|
+
config = good_config(ConfigParserTest)
|
373
|
+
config[:out] = "/home/user"
|
374
|
+
options = build_options({validate: true, working: true, out: "/home/user2"})
|
375
|
+
parsed = ConfigParser.parse(options: options, config: config)
|
376
|
+
|
377
|
+
refute_nil parsed[:out]
|
378
|
+
refute_nil parsed[:out][:folder]
|
379
|
+
assert_nil parsed[:out][:file]
|
380
|
+
assert_equal "/home/user2", parsed[:out][:folder]
|
381
|
+
end
|
348
382
|
end
|
349
383
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roku_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.27.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greeneca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -653,7 +653,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
653
653
|
- !ruby/object:Gem::Version
|
654
654
|
version: '0'
|
655
655
|
requirements: []
|
656
|
-
rubygems_version: 3.3.
|
656
|
+
rubygems_version: 3.3.7
|
657
657
|
signing_key:
|
658
658
|
specification_version: 4
|
659
659
|
summary: Build Tool for Roku Apps
|