inspec-core 4.24.8 → 4.24.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -12
  3. data/inspec-core.gemspec +8 -8
  4. data/lib/bundles/inspec-supermarket/api.rb +2 -2
  5. data/lib/bundles/inspec-supermarket/target.rb +1 -1
  6. data/lib/inspec/archive/tar.rb +1 -1
  7. data/lib/inspec/archive/zip.rb +3 -3
  8. data/lib/inspec/base_cli.rb +1 -1
  9. data/lib/inspec/cached_fetcher.rb +1 -1
  10. data/lib/inspec/cli.rb +1 -1
  11. data/lib/inspec/config.rb +5 -5
  12. data/lib/inspec/dependencies/cache.rb +1 -1
  13. data/lib/inspec/env_printer.rb +2 -2
  14. data/lib/inspec/fetcher/git.rb +3 -3
  15. data/lib/inspec/fetcher/local.rb +1 -1
  16. data/lib/inspec/fetcher/url.rb +4 -4
  17. data/lib/inspec/file_provider.rb +4 -4
  18. data/lib/inspec/input.rb +3 -0
  19. data/lib/inspec/input_registry.rb +5 -3
  20. data/lib/inspec/metadata.rb +1 -1
  21. data/lib/inspec/plugin/v1/plugins.rb +2 -2
  22. data/lib/inspec/plugin/v2.rb +5 -0
  23. data/lib/inspec/plugin/v2/config_file.rb +1 -1
  24. data/lib/inspec/plugin/v2/filter.rb +2 -2
  25. data/lib/inspec/plugin/v2/installer.rb +5 -5
  26. data/lib/inspec/plugin/v2/loader.rb +1 -1
  27. data/lib/inspec/plugin/v2/registry.rb +2 -2
  28. data/lib/inspec/profile.rb +3 -3
  29. data/lib/inspec/profile_context.rb +1 -1
  30. data/lib/inspec/reporters/automate.rb +2 -2
  31. data/lib/inspec/reporters/json.rb +1 -1
  32. data/lib/inspec/reporters/json_automate.rb +1 -1
  33. data/lib/inspec/resources.rb +5 -5
  34. data/lib/inspec/resources/apt.rb +1 -1
  35. data/lib/inspec/resources/auditd.rb +1 -1
  36. data/lib/inspec/resources/csv.rb +1 -1
  37. data/lib/inspec/resources/dh_params.rb +1 -1
  38. data/lib/inspec/resources/file.rb +1 -1
  39. data/lib/inspec/resources/http.rb +1 -1
  40. data/lib/inspec/resources/iis_website.rb +1 -1
  41. data/lib/inspec/resources/interfaces.rb +1 -1
  42. data/lib/inspec/resources/json.rb +2 -2
  43. data/lib/inspec/resources/key_rsa.rb +1 -1
  44. data/lib/inspec/resources/mssql_session.rb +5 -1
  45. data/lib/inspec/resources/mysql_session.rb +1 -1
  46. data/lib/inspec/resources/nginx.rb +1 -1
  47. data/lib/inspec/resources/nginx_conf.rb +1 -1
  48. data/lib/inspec/resources/npm.rb +1 -1
  49. data/lib/inspec/resources/oracledb_session.rb +1 -1
  50. data/lib/inspec/resources/parse_config.rb +5 -2
  51. data/lib/inspec/resources/port.rb +1 -1
  52. data/lib/inspec/resources/postgres_session.rb +1 -1
  53. data/lib/inspec/resources/ppa.rb +1 -1
  54. data/lib/inspec/resources/processes.rb +1 -1
  55. data/lib/inspec/resources/rabbitmq_conf.rb +1 -1
  56. data/lib/inspec/resources/registry_key.rb +1 -1
  57. data/lib/inspec/resources/sshd_config.rb +1 -1
  58. data/lib/inspec/resources/ssl.rb +2 -2
  59. data/lib/inspec/resources/toml.rb +1 -1
  60. data/lib/inspec/resources/vbscript.rb +1 -1
  61. data/lib/inspec/resources/windows_registry_key.rb +1 -1
  62. data/lib/inspec/resources/wmi.rb +1 -1
  63. data/lib/inspec/resources/x509_certificate.rb +1 -1
  64. data/lib/inspec/resources/xml.rb +1 -1
  65. data/lib/inspec/runner.rb +2 -2
  66. data/lib/inspec/schema.rb +1 -1
  67. data/lib/inspec/schema/output_schema.rb +1 -1
  68. data/lib/inspec/schema/primitives.rb +1 -1
  69. data/lib/inspec/shell_detector.rb +2 -2
  70. data/lib/inspec/utils/command_wrapper.rb +1 -1
  71. data/lib/inspec/utils/deprecation/config_file.rb +2 -2
  72. data/lib/inspec/utils/json_log.rb +1 -1
  73. data/lib/inspec/utils/telemetry/collector.rb +1 -1
  74. data/lib/inspec/utils/telemetry/data_series.rb +1 -1
  75. data/lib/inspec/version.rb +1 -1
  76. data/lib/plugins/inspec-artifact/lib/inspec-artifact/base.rb +5 -5
  77. data/lib/plugins/inspec-compliance/README.md +1 -1
  78. data/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb +3 -3
  79. data/lib/plugins/inspec-compliance/lib/inspec-compliance/http.rb +2 -2
  80. data/lib/plugins/inspec-compliance/lib/inspec-compliance/target.rb +2 -2
  81. data/lib/plugins/inspec-habitat/lib/inspec-habitat/profile.rb +3 -3
  82. data/lib/plugins/inspec-init/lib/inspec-init/cli.rb +1 -1
  83. data/lib/plugins/inspec-init/lib/inspec-init/cli_profile.rb +1 -1
  84. data/lib/plugins/inspec-init/lib/inspec-init/renderer.rb +2 -2
  85. data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb +3 -3
  86. data/lib/plugins/inspec-reporter-html2/lib/inspec-reporter-html2/reporter.rb +1 -1
  87. data/lib/plugins/inspec-reporter-json-min/lib/inspec-reporter-json-min/reporter.rb +1 -1
  88. data/lib/plugins/inspec-reporter-junit/lib/inspec-reporter-junit/reporter.rb +1 -1
  89. data/lib/plugins/shared/core_plugin_test_helper.rb +6 -6
  90. metadata +40 -22
@@ -1,4 +1,4 @@
1
- require "pathname"
1
+ require "pathname" unless defined?(Pathname)
2
2
  require "inspec/plugin/v2"
3
3
  require "inspec/plugin/v2/installer"
4
4
  require "inspec/dist"
@@ -505,8 +505,8 @@ module InspecPlugins
505
505
  plugin_name = status.name.to_s
506
506
  Inspec::Plugin::V2::Loader.list_installed_plugin_gems
507
507
  .select { |spec| spec.name == plugin_name }
508
- .sort_by(&:version)
509
- .last.version
508
+ .max_by(&:version)
509
+ .version
510
510
  end
511
511
  when :path
512
512
  "src"
@@ -1,4 +1,4 @@
1
- require "erb"
1
+ require "erb" unless defined?(Erb)
2
2
  require "inspec/config"
3
3
 
4
4
  module InspecPlugins::Html2Reporter
@@ -1,4 +1,4 @@
1
- require "json"
1
+ require "json" unless defined?(JSON)
2
2
 
3
3
  module InspecPlugins::JsonMinReporter
4
4
  class Reporter < Inspec.plugin(2, :reporter)
@@ -5,7 +5,7 @@ module InspecPlugins::JUnitReporter
5
5
  end
6
6
 
7
7
  def render
8
- require "rexml/document"
8
+ require "rexml/document" unless defined?(REXML::Document)
9
9
  xml_output = REXML::Document.new
10
10
  xml_output.add(REXML::XMLDecl.new)
11
11
 
@@ -3,14 +3,14 @@ require "minitest/autorun"
3
3
  require "minitest/pride"
4
4
 
5
5
  # Data formats commonly used in testing
6
- require "json"
7
- require "ostruct"
6
+ require "json" unless defined?(JSON)
7
+ require "ostruct" unless defined?(OpenStruct)
8
8
 
9
9
  # Utilities often needed
10
- require "fileutils"
11
- require "tmpdir"
12
- require "pathname"
13
- require "forwardable"
10
+ require "fileutils" unless defined?(FileUtils)
11
+ require "tmpdir" unless defined?(Dir.mktmpdir)
12
+ require "pathname" unless defined?(Pathname)
13
+ require "forwardable" unless defined?(Forwardable)
14
14
 
15
15
  require "functional/helper"
16
16
  require "inspec/plugin/v2"
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.8
4
+ version: 4.24.26
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-09 00:00:00.000000000 Z
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-telemetry
@@ -88,36 +88,36 @@ dependencies:
88
88
  name: rubyzip
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - "~>"
92
- - !ruby/object:Gem::Version
93
- version: '1.2'
94
91
  - - ">="
95
92
  - !ruby/object:Gem::Version
96
93
  version: 1.2.2
94
+ - - "<"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
97
  type: :runtime
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.2'
104
101
  - - ">="
105
102
  - !ruby/object:Gem::Version
106
103
  version: 1.2.2
104
+ - - "<"
105
+ - !ruby/object:Gem::Version
106
+ version: '3.0'
107
107
  - !ruby/object:Gem::Dependency
108
108
  name: rspec
109
109
  requirement: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - "~>"
112
112
  - !ruby/object:Gem::Version
113
- version: 3.9.0
113
+ version: '3.10'
114
114
  type: :runtime
115
115
  prerelease: false
116
116
  version_requirements: !ruby/object:Gem::Requirement
117
117
  requirements:
118
118
  - - "~>"
119
119
  - !ruby/object:Gem::Version
120
- version: 3.9.0
120
+ version: '3.10'
121
121
  - !ruby/object:Gem::Dependency
122
122
  name: rspec-its
123
123
  requirement: !ruby/object:Gem::Requirement
@@ -150,16 +150,22 @@ dependencies:
150
150
  name: hashie
151
151
  requirement: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - "~>"
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '3.4'
156
+ - - "<"
157
+ - !ruby/object:Gem::Version
158
+ version: '5.0'
156
159
  type: :runtime
157
160
  prerelease: false
158
161
  version_requirements: !ruby/object:Gem::Requirement
159
162
  requirements:
160
- - - "~>"
163
+ - - ">="
161
164
  - !ruby/object:Gem::Version
162
165
  version: '3.4'
166
+ - - "<"
167
+ - !ruby/object:Gem::Version
168
+ version: '5.0'
163
169
  - !ruby/object:Gem::Dependency
164
170
  name: mixlib-log
165
171
  requirement: !ruby/object:Gem::Requirement
@@ -211,7 +217,7 @@ dependencies:
211
217
  version: 0.9.0
212
218
  - - "<"
213
219
  - !ruby/object:Gem::Version
214
- version: '1.1'
220
+ version: '1.2'
215
221
  type: :runtime
216
222
  prerelease: false
217
223
  version_requirements: !ruby/object:Gem::Requirement
@@ -221,7 +227,7 @@ dependencies:
221
227
  version: 0.9.0
222
228
  - - "<"
223
229
  - !ruby/object:Gem::Version
224
- version: '1.1'
230
+ version: '1.2'
225
231
  - !ruby/object:Gem::Dependency
226
232
  name: tty-table
227
233
  requirement: !ruby/object:Gem::Requirement
@@ -254,16 +260,22 @@ dependencies:
254
260
  name: tomlrb
255
261
  requirement: !ruby/object:Gem::Requirement
256
262
  requirements:
257
- - - "~>"
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ version: '1.2'
266
+ - - "<"
258
267
  - !ruby/object:Gem::Version
259
- version: 1.2.0
268
+ version: '2.1'
260
269
  type: :runtime
261
270
  prerelease: false
262
271
  version_requirements: !ruby/object:Gem::Requirement
263
272
  requirements:
264
- - - "~>"
273
+ - - ">="
265
274
  - !ruby/object:Gem::Version
266
- version: 1.2.0
275
+ version: '1.2'
276
+ - - "<"
277
+ - !ruby/object:Gem::Version
278
+ version: '2.1'
267
279
  - !ruby/object:Gem::Dependency
268
280
  name: addressable
269
281
  requirement: !ruby/object:Gem::Requirement
@@ -282,16 +294,22 @@ dependencies:
282
294
  name: parslet
283
295
  requirement: !ruby/object:Gem::Requirement
284
296
  requirements:
285
- - - "~>"
297
+ - - ">="
286
298
  - !ruby/object:Gem::Version
287
299
  version: '1.5'
300
+ - - "<"
301
+ - !ruby/object:Gem::Version
302
+ version: '3.0'
288
303
  type: :runtime
289
304
  prerelease: false
290
305
  version_requirements: !ruby/object:Gem::Requirement
291
306
  requirements:
292
- - - "~>"
307
+ - - ">="
293
308
  - !ruby/object:Gem::Version
294
309
  version: '1.5'
310
+ - - "<"
311
+ - !ruby/object:Gem::Version
312
+ version: '3.0'
295
313
  - !ruby/object:Gem::Dependency
296
314
  name: semverse
297
315
  requirement: !ruby/object:Gem::Requirement
@@ -723,9 +741,9 @@ require_paths:
723
741
  - lib
724
742
  required_ruby_version: !ruby/object:Gem::Requirement
725
743
  requirements:
726
- - - "~>"
744
+ - - ">="
727
745
  - !ruby/object:Gem::Version
728
- version: '2.4'
746
+ version: '2.5'
729
747
  required_rubygems_version: !ruby/object:Gem::Requirement
730
748
  requirements:
731
749
  - - ">="