roku_builder 4.26.1 → 4.26.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roku_builder/plugins/analyzer.rb +14 -9
- data/lib/roku_builder/plugins/line_inspector.rb +2 -2
- data/lib/roku_builder/plugins/sca-cmd/bin/sca-cmd +1 -1
- data/lib/roku_builder/plugins/sca-cmd/bin/sca-cmd.bat +1 -1
- data/lib/roku_builder/plugins/sca-cmd/lib/sca-cmd.jar +0 -0
- data/lib/roku_builder/version.rb +1 -1
- data/test/roku_builder/plugins/test_loader.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f9b82cc8cd8d2da493f330d4b41d35eb26a1efb89a3e5546e427a9c1381cb36
|
4
|
+
data.tar.gz: 66cc47ae8975cb4dcfc5271d2d1cdb12e5813c37297679e96e64bedb64707108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41712b6228bf1fca02ededce8d0baee62cdec83ec8c0d39abbd4a6e187c496d62d723e67a1918cea8a01b55b15f0e16f295dfae0a725783d68c052cb37b34a02
|
7
|
+
data.tar.gz: 803f81014a8319163a9b95445f5902a4b027299194f8df53cda8fb6d52bfd4a770601f305c6b9ee277d4498c993975cce05cdbe1132151c09d748ec84a661a84
|
@@ -40,7 +40,7 @@ module RokuBuilder
|
|
40
40
|
loader = Loader.new(config: @config)
|
41
41
|
Dir.mktmpdir do |dir|
|
42
42
|
loader.copy(options: options, path: dir)
|
43
|
-
run_sca_tool(path: dir,
|
43
|
+
run_sca_tool(path: dir, linter_config: linter_config)
|
44
44
|
libraries = @config.project[:libraries]
|
45
45
|
libraries ||= []
|
46
46
|
Dir.glob(File.join(dir, "**", "*")).each do |file_path|
|
@@ -63,7 +63,7 @@ module RokuBuilder
|
|
63
63
|
|
64
64
|
private
|
65
65
|
|
66
|
-
def run_sca_tool(path:,
|
66
|
+
def run_sca_tool(path:, linter_config:)
|
67
67
|
if OS.unix?
|
68
68
|
command = File.join(File.dirname(__FILE__), "sca-cmd", "bin", "sca-cmd")
|
69
69
|
stderr = "/dev/null"
|
@@ -73,20 +73,20 @@ module RokuBuilder
|
|
73
73
|
end
|
74
74
|
@logger.debug("Command: '#{command}'")
|
75
75
|
results = `#{command} #{path} 2>#{stderr}`.split("\n")
|
76
|
-
process_sca_results(results,
|
76
|
+
process_sca_results(results, linter_config)
|
77
77
|
end
|
78
78
|
|
79
|
-
def process_sca_results(results,
|
79
|
+
def process_sca_results(results, linter_config)
|
80
80
|
results.each do |result_line|
|
81
81
|
if /-----+/.match(result_line) or /\*\*\*\*\*+/.match(result_line)
|
82
|
-
@warnings.push(@sca_warning) if add_warning?(
|
82
|
+
@warnings.push(@sca_warning) if add_warning?(linter_config)
|
83
83
|
@sca_warning = {}
|
84
84
|
elsif data = /^(\[WARNING\]|\[INFO\]|\[ERROR\])(.*)$/.match(result_line)
|
85
|
-
@warnings.push(@sca_warning) if add_warning?(
|
85
|
+
@warnings.push(@sca_warning) if add_warning?(linter_config)
|
86
86
|
@sca_warning = {}
|
87
87
|
@sca_warning[:severity] = data[1].gsub(/(\[|\])/, "").downcase
|
88
88
|
@sca_warning[:message] = data[2]
|
89
|
-
elsif data = /^\
|
89
|
+
elsif data = /^\s*Path: ([^ ]*) Line: (\d*)./.match(result_line)
|
90
90
|
@sca_warning[:path] = data[1]+":"+data[2]
|
91
91
|
elsif @sca_warning and @sca_warning[:message]
|
92
92
|
@sca_warning[:message] += " " + result_line
|
@@ -94,9 +94,9 @@ module RokuBuilder
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
def add_warning?(
|
97
|
+
def add_warning?(linter_config)
|
98
98
|
if @sca_warning and @sca_warning[:severity]
|
99
|
-
if ssai and /SetAdUrl\(\) method is missing/.match(@sca_warning[:message])
|
99
|
+
if linter_config[:ssai] and /SetAdUrl\(\) method is missing/.match(@sca_warning[:message])
|
100
100
|
return false
|
101
101
|
end
|
102
102
|
libraries = @config.project[:libraries]
|
@@ -104,6 +104,11 @@ module RokuBuilder
|
|
104
104
|
if @sca_warning[:path] and libraries.any_is_start?(@sca_warning[:path].gsub(/pkg:/, "")) and not @options[:include_libraries]
|
105
105
|
return false
|
106
106
|
end
|
107
|
+
if linter_config[:ignore_warnings]
|
108
|
+
linter_config[:ignore_warnings].each do |regexp|
|
109
|
+
return false if @sca_warning[:message] =~ /#{regexp}/
|
110
|
+
end
|
111
|
+
end
|
107
112
|
return true
|
108
113
|
end
|
109
114
|
return false
|
@@ -67,8 +67,8 @@ module RokuBuilder
|
|
67
67
|
if (not line_inspector[:pass_if_match] and match) or (line_inspector[:pass_if_match] and not match)
|
68
68
|
error_match = match
|
69
69
|
if match
|
70
|
-
|
71
|
-
|
70
|
+
line_number = to_check[0..match.begin(0)+start].split("\n", -1).count - 1
|
71
|
+
start = match.end(0) + start
|
72
72
|
else
|
73
73
|
error_match = pass_match
|
74
74
|
line_number = to_check[0..start].split("\n", -1).count - 1
|
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
|
114
114
|
NONSTOP* ) nonstop=true ;;
|
115
115
|
esac
|
116
116
|
|
117
|
-
CLASSPATH=$APP_HOME/lib/sca-cmd.jar:$APP_HOME/lib/sca-library.jar:$APP_HOME/lib/utils-
|
117
|
+
CLASSPATH=$APP_HOME/lib/sca-cmd.jar:$APP_HOME/lib/sca-library.jar:$APP_HOME/lib/utils-4.0.0.jar:$APP_HOME/lib/configuration-4.0.0.jar:$APP_HOME/lib/compress-4.0.0.jar:$APP_HOME/lib/io-4.0.0.jar:$APP_HOME/lib/imaging-4.0.0.jar:$APP_HOME/lib/manifest-4.0.0.jar:$APP_HOME/lib/commons-cli-1.5.0.jar:$APP_HOME/lib/jackson-databind-2.13.3.jar:$APP_HOME/lib/jackson-core-2.13.3.jar:$APP_HOME/lib/jackson-annotations-2.13.3.jar:$APP_HOME/lib/jackson-dataformat-xml-2.13.3.jar:$APP_HOME/lib/commons-lang3-3.12.0.jar:$APP_HOME/lib/woodstox-core-6.2.7.jar:$APP_HOME/lib/stax2-api-4.2.1.jar:$APP_HOME/lib/commons-compress-1.21.jar:$APP_HOME/lib/commons-io-2.11.0.jar
|
118
118
|
|
119
119
|
|
120
120
|
# Determine the Java command to use to start the JVM.
|
@@ -67,7 +67,7 @@ goto fail
|
|
67
67
|
:execute
|
68
68
|
@rem Setup the command line
|
69
69
|
|
70
|
-
set CLASSPATH=%APP_HOME%\lib\sca-cmd.jar;%APP_HOME%\lib\sca-library.jar;%APP_HOME%\lib\utils-
|
70
|
+
set CLASSPATH=%APP_HOME%\lib\sca-cmd.jar;%APP_HOME%\lib\sca-library.jar;%APP_HOME%\lib\utils-4.0.0.jar;%APP_HOME%\lib\configuration-4.0.0.jar;%APP_HOME%\lib\compress-4.0.0.jar;%APP_HOME%\lib\io-4.0.0.jar;%APP_HOME%\lib\imaging-4.0.0.jar;%APP_HOME%\lib\manifest-4.0.0.jar;%APP_HOME%\lib\commons-cli-1.5.0.jar;%APP_HOME%\lib\jackson-databind-2.13.3.jar;%APP_HOME%\lib\jackson-core-2.13.3.jar;%APP_HOME%\lib\jackson-annotations-2.13.3.jar;%APP_HOME%\lib\jackson-dataformat-xml-2.13.3.jar;%APP_HOME%\lib\commons-lang3-3.12.0.jar;%APP_HOME%\lib\woodstox-core-6.2.7.jar;%APP_HOME%\lib\stax2-api-4.2.1.jar;%APP_HOME%\lib\commons-compress-1.21.jar;%APP_HOME%\lib\commons-io-2.11.0.jar
|
71
71
|
|
72
72
|
|
73
73
|
@rem Execute sca-cmd
|
Binary file
|
data/lib/roku_builder/version.rb
CHANGED
@@ -136,7 +136,7 @@ module RokuBuilder
|
|
136
136
|
end
|
137
137
|
def test_loader_squash
|
138
138
|
@request_stubs.push(stub_request(:post, "http://#{@device_config[:ip]}/plugin_install").
|
139
|
-
to_return(status: 200, body: "
|
139
|
+
to_return(status: 200, body: "squashfs file in internal memory", headers: {}))
|
140
140
|
@device_manager.expect(:reserve_device, @device, no_lock: false)
|
141
141
|
@device_manager.expect(:release_device, nil, [@device])
|
142
142
|
|
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.26.
|
4
|
+
version: 4.26.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greeneca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|