inspec-core 4.25.1 → 4.26.4

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: 4db76b09c46f02e91dca61f334693d773d0c0c470104ef8d28b89a443b1b6c55
4
- data.tar.gz: 9834a18148bf8f2851f7a030e3766b3932f6592e7a3fdfb5a354daf7c8cdfff1
3
+ metadata.gz: d272d9e12d62df3c7913ac77ae8eb39afe94c53ca0bb1b6cb4e51909cfa2169d
4
+ data.tar.gz: c0f4245b7a361e2736827bf4512098640aa58c1f7ec5e02754a72d47a3e91895
5
5
  SHA512:
6
- metadata.gz: 2c8330268f60a8b8d895e33ee3fb75b3076b81be5c3e8816250ad8775ea00d76332796181aba8da27c15c251c0b6ce8379279c693158c969bbe1003e0985bd7a
7
- data.tar.gz: 3e6e5096e98c3198a650bfa4c6f88a66db84fdbf366d451bae21e38a1e430e0cb77b9d1ebe5a85d03c354390e8eb884bddb586ef28d5ece4d9a57d7830838bb9
6
+ metadata.gz: d62a4be7c3c74b09d0fa7d99bb7af2e26b45fcafd9e14d51bd5719d0c1a1c816cf5e133458c07ed3354a3966b6a571cf24a5147a887713671aa8ecca1ac7328d
7
+ data.tar.gz: '006889d328e75a0d339f082e4c17b57474660fd5b3855bbe3100a7b67ae0a0e98f06cef3ec914ff0232779cf76c01e11fa63797451221afe33d3b00624a6b3a6'
@@ -36,11 +36,12 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency "sslshake", "~> 1.2"
37
37
  spec.add_dependency "parallel", "~> 1.9"
38
38
  spec.add_dependency "faraday", ">= 0.9.0", "< 1.4"
39
+ spec.add_dependency "faraday_middleware", "~> 1.0"
39
40
  spec.add_dependency "tty-table", "~> 0.10"
40
41
  spec.add_dependency "tty-prompt", "~> 0.17"
41
42
  spec.add_dependency "tomlrb", ">= 1.2", "< 2.1"
42
43
  spec.add_dependency "addressable", "~> 2.4"
43
- spec.add_dependency "parslet", ">= 1.5", "< 3.0"
44
+ spec.add_dependency "parslet", ">= 1.5", "< 2.0" # Pinned < 2.0, see #5389
44
45
  spec.add_dependency "semverse", "~> 3.0"
45
46
  spec.add_dependency "multipart-post", "~> 2.0"
46
47
 
@@ -118,6 +118,8 @@ module Inspec
118
118
  desc: "Disable SSL verification on select targets"
119
119
  option :target_id, type: :string,
120
120
  desc: "Provide a ID which will be included on reports"
121
+ option :winrm_shell_type, type: :string, default: "powershell",
122
+ desc: "Specify a shell type for winrm (eg. 'elevated' or 'powershell')"
121
123
  end
122
124
 
123
125
  def self.profile_options
@@ -128,12 +128,25 @@ module Inspec
128
128
  end
129
129
 
130
130
  #-----------------------------------------------------------------------#
131
- # Fetching Plugin Data
131
+ # Handling Plugin Data
132
132
  #-----------------------------------------------------------------------#
133
133
  def fetch_plugin_config(plugin_name)
134
134
  Thor::CoreExt::HashWithIndifferentAccess.new(@plugin_cfg[plugin_name] || {})
135
135
  end
136
136
 
137
+ def set_plugin_config(plugin_name, plugin_config)
138
+ plugin_name = plugin_name.to_s unless plugin_name.is_a? String
139
+
140
+ @plugin_cfg[plugin_name] = plugin_config
141
+ end
142
+
143
+ def merge_plugin_config(plugin_name, additional_plugin_config)
144
+ plugin_name = plugin_name.to_s unless plugin_name.is_a? String
145
+
146
+ @plugin_cfg[plugin_name] = {} if @plugin_cfg[plugin_name].nil?
147
+ @plugin_cfg[plugin_name].merge!(additional_plugin_config)
148
+ end
149
+
137
150
  # clear the cached config
138
151
  def self.__reset
139
152
  @cached_config = nil
@@ -54,6 +54,21 @@ module Inspec::Resources
54
54
  "nginx_conf #{@conf_path}"
55
55
  end
56
56
 
57
+ def method_missing(name)
58
+ return super if name.to_s.match?(/^to_/)
59
+
60
+ v = params[name.to_s]
61
+ return v.flatten unless v.nil?
62
+
63
+ nil
64
+ end
65
+
66
+ def respond_to_missing?(name, include_all = false)
67
+ return super if name.to_s.match?(/^to_/)
68
+
69
+ true
70
+ end
71
+
57
72
  private
58
73
 
59
74
  def read_content(path)
@@ -175,6 +190,18 @@ module Inspec::Resources
175
190
  end
176
191
  alias inspect to_s
177
192
 
193
+ def method_missing(name)
194
+ return super if name.to_s.match?(/^to_/)
195
+
196
+ (@params[name.to_s] || []).flatten
197
+ end
198
+
199
+ def respond_to_missing?(name, include_all = false)
200
+ return super if name.to_s.match?(/^to_/)
201
+
202
+ true
203
+ end
204
+
178
205
  private
179
206
 
180
207
  def server_table
@@ -207,6 +234,18 @@ module Inspec::Resources
207
234
  end
208
235
  alias inspect to_s
209
236
 
237
+ def method_missing(name)
238
+ return super if name.to_s.match?(/^to_/)
239
+
240
+ (@params[name.to_s] || []).flatten
241
+ end
242
+
243
+ def respond_to_missing?(name, include_all = false)
244
+ return super if name.to_s.match?(/^to_/)
245
+
246
+ true
247
+ end
248
+
210
249
  private
211
250
 
212
251
  def location_table
@@ -48,7 +48,7 @@ module Inspec::Resources
48
48
  format_options = "set sqlformat csv\nSET FEEDBACK OFF"
49
49
  else
50
50
  @bin = "#{@sqlplus_bin} -S"
51
- format_options = "SET MARKUP CSV ON\nSET PAGESIZE 32000\nSET FEEDBACK OFF"
51
+ format_options = "SET PAGESIZE 32000\nSET FEEDBACK OFF\nSET UNDERLINE OFF"
52
52
  end
53
53
 
54
54
  command = command_builder(format_options, sql)
@@ -1,3 +1,3 @@
1
1
  module Inspec
2
- VERSION = "4.25.1".freeze
2
+ VERSION = "4.26.4".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.25.1
4
+ version: 4.26.4
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: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2021-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-telemetry
@@ -234,6 +234,20 @@ dependencies:
234
234
  - - "<"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '1.4'
237
+ - !ruby/object:Gem::Dependency
238
+ name: faraday_middleware
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '1.0'
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '1.0'
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: tty-table
239
253
  requirement: !ruby/object:Gem::Requirement
@@ -305,7 +319,7 @@ dependencies:
305
319
  version: '1.5'
306
320
  - - "<"
307
321
  - !ruby/object:Gem::Version
308
- version: '3.0'
322
+ version: '2.0'
309
323
  type: :runtime
310
324
  prerelease: false
311
325
  version_requirements: !ruby/object:Gem::Requirement
@@ -315,7 +329,7 @@ dependencies:
315
329
  version: '1.5'
316
330
  - - "<"
317
331
  - !ruby/object:Gem::Version
318
- version: '3.0'
332
+ version: '2.0'
319
333
  - !ruby/object:Gem::Dependency
320
334
  name: semverse
321
335
  requirement: !ruby/object:Gem::Requirement