inspec-core 4.24.26 → 4.24.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/inspec/base_cli.rb +1 -1
- data/lib/inspec/utils/run_data_filters.rb +7 -5
- data/lib/inspec/version.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: a6bfd73094c1841563b430595d99aa5007d5e6a3067b4d174c608d8db92e76fb
|
4
|
+
data.tar.gz: 8a39bdfee98500463151a5fac6a6970b5c34dd504c7fc7e1184b2b10d0bbd40d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64d616c2e3f3ee17af271dc5681c3af9dd17a409902d84061649e4ee6350b3bc8cf33a38615bcd2330e19430235efa5bc74d04c67b6605f6226db9c969216854
|
7
|
+
data.tar.gz: e5f6686d79c49d937bd216edad0226e64106c21693d6bffa6d40c520d7a04617b7aac55abdf73c0e05fb8366c7b4eaaeb37d9ad5e106de31a2c8d93febc60f17
|
data/Gemfile
CHANGED
@@ -9,7 +9,7 @@ gem "inspec", path: "."
|
|
9
9
|
# in it in order to package the executable. Hence the odd backwards dependency.
|
10
10
|
gem "inspec-bin", path: "./inspec-bin"
|
11
11
|
|
12
|
-
gem "ffi", ">= 1.9.14", "!= 1.13.0"
|
12
|
+
gem "ffi", ">= 1.9.14", "!= 1.13.0", "!= 1.14.2"
|
13
13
|
|
14
14
|
if Gem.ruby_version.to_s.start_with?("2.5")
|
15
15
|
# 16.7.23 required ruby 2.6+
|
data/lib/inspec/base_cli.rb
CHANGED
@@ -136,7 +136,7 @@ module Inspec
|
|
136
136
|
banner: "one two:/output/file/path",
|
137
137
|
desc: "Enable one or more output reporters: cli, documentation, html, progress, json, json-min, json-rspec, junit, yaml"
|
138
138
|
option :reporter_message_truncation, type: :string,
|
139
|
-
desc: "Number of characters to truncate failure messages in report data to (default: no truncation)"
|
139
|
+
desc: "Number of characters to truncate failure messages and code_desc in report data to (default: no truncation)"
|
140
140
|
option :reporter_backtrace_inclusion, type: :boolean,
|
141
141
|
desc: "Include a code backtrace in report data (default: true)"
|
142
142
|
option :input, type: :array, banner: "name1=value1 name2=value2",
|
@@ -18,7 +18,7 @@ module Inspec
|
|
18
18
|
sort_controls
|
19
19
|
end
|
20
20
|
|
21
|
-
# Apply options such as message truncation and removal of backtraces
|
21
|
+
# Apply options such as message and code_desc truncation, and removal of backtraces
|
22
22
|
def apply_report_resize_options
|
23
23
|
runtime_config = @config[:runtime_config]
|
24
24
|
|
@@ -30,7 +30,7 @@ module Inspec
|
|
30
30
|
p[:controls].each do |c|
|
31
31
|
c[:results]&.map! do |r|
|
32
32
|
r.delete(:backtrace) unless include_backtrace
|
33
|
-
|
33
|
+
process_truncation(r)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -93,9 +93,11 @@ module Inspec
|
|
93
93
|
|
94
94
|
private
|
95
95
|
|
96
|
-
def
|
97
|
-
|
98
|
-
result
|
96
|
+
def process_truncation(result)
|
97
|
+
%i{code_desc message}.each do |field|
|
98
|
+
if result.key?(field) && result[field] != "" && @trunc > -1 && result[field].length > @trunc
|
99
|
+
result[field] = result[field][0...@trunc] + "[Truncated to #{@trunc} characters]"
|
100
|
+
end
|
99
101
|
end
|
100
102
|
result
|
101
103
|
end
|
data/lib/inspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.24.
|
4
|
+
version: 4.24.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef InSpec Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-telemetry
|