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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfed5976ebd618d37b1fbf0058fbd9389b243dbd5070444fda7558cf309392c3
4
- data.tar.gz: 3b894051f2f56e249af59acf0de10c50d8a826d3af1755eaf60100a7a4934dab
3
+ metadata.gz: a6bfd73094c1841563b430595d99aa5007d5e6a3067b4d174c608d8db92e76fb
4
+ data.tar.gz: 8a39bdfee98500463151a5fac6a6970b5c34dd504c7fc7e1184b2b10d0bbd40d
5
5
  SHA512:
6
- metadata.gz: c1d9b3598a4bc81085d95b5a4b254ac57001aa301e4371394b8b8b307b54ed26644784ccf9dafd2e52d4e2553e5c1ff77ae821691ef738e542f13d892f692f81
7
- data.tar.gz: 54f9be8adc1870127be3e825e809499270717d395fa26d11408f186a66fdb61ca7db0ac78fd73143652893bd482acf2d1009c3343609e8b34bcd3ff3eb0aaa0c
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+
@@ -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
- process_message_truncation(r)
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 process_message_truncation(result)
97
- if result.key?(:message) && result[:message] != "" && @trunc > -1 && result[:message].length > @trunc
98
- result[:message] = result[:message][0...@trunc] + "[Truncated to #{@trunc} characters]"
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
@@ -1,3 +1,3 @@
1
1
  module Inspec
2
- VERSION = "4.24.26".freeze
2
+ VERSION = "4.24.28".freeze
3
3
  end
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.26
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: 2020-12-23 00:00:00.000000000 Z
11
+ date: 2021-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-telemetry