inspec 4.7.18 → 4.7.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inspec/plugin/v2/installer.rb +1 -1
- data/lib/inspec/resources/file.rb +5 -1
- data/lib/inspec/resources/sys_info.rb +28 -0
- data/lib/inspec/runner.rb +1 -1
- data/lib/inspec/version.rb +1 -1
- data/lib/matchers/matchers.rb +0 -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: 17d4755a71b5ff3f54c357d4f1af43aa021f9bf451352b26796532b82eff8171
|
4
|
+
data.tar.gz: b6adb4d407d16e0c458247f6f66df68d34defee4d237b68e491733c16be6172a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ff8d76a9eba7a9d4fb62ccd28e3832b86f2d9c0e462e2c5725010182785a9308f0f5a157011008145578742189a3820d9912ddac3e34e3f7be7495e5ee71e4b
|
7
|
+
data.tar.gz: 121d494b210eecbb5cc8a82484efb017b8f6f16317172a916b4f62a2519b3a3ce8253e50d1cd15063230f1f9a081da3f06811db2c11ef5c3bfc4f69c1c23e8d7
|
@@ -328,7 +328,7 @@ module Inspec::Plugin::V2
|
|
328
328
|
|
329
329
|
# OK, perform the installation.
|
330
330
|
# Ignore deps here, because any needed deps should already be baked into new_plugin_dependency
|
331
|
-
request_set.install_into(gem_path, true, ignore_dependencies: true)
|
331
|
+
request_set.install_into(gem_path, true, ignore_dependencies: true, document: [])
|
332
332
|
|
333
333
|
# Painful aspect of rubygems: the VendorSet request set type needs to be able to find a gemspec
|
334
334
|
# file within the source of the gem (and not all gems include it in their source tree; they are
|
@@ -26,5 +26,33 @@ module Inspec::Resources
|
|
26
26
|
skip_resource "The `sys_info.hostname` resource is not supported on your OS yet."
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
# returns the Manufacturer of the local system
|
31
|
+
def manufacturer
|
32
|
+
os = inspec.os
|
33
|
+
if os.darwin?
|
34
|
+
"Apple Inc."
|
35
|
+
elsif os.linux?
|
36
|
+
inspec.command("cat /sys/class/dmi/id/sys_vendor").stdout.chomp
|
37
|
+
elsif os.windows?
|
38
|
+
inspec.powershell("Get-CimInstance -ClassName Win32_ComputerSystem | Select Manufacturer -ExpandProperty Manufacturer").stdout.chomp
|
39
|
+
else
|
40
|
+
skip_resource "The `sys_info.manufacturer` resource is not supported on your OS yet."
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# returns the ServerModel of the local system
|
45
|
+
def model
|
46
|
+
os = inspec.os
|
47
|
+
if os.darwin?
|
48
|
+
inspec.command("sysctl -n hw.model").stdout.chomp
|
49
|
+
elsif os.linux?
|
50
|
+
inspec.command("cat /sys/class/dmi/id/product_name").stdout.chomp
|
51
|
+
elsif os.windows?
|
52
|
+
inspec.powershell("Get-CimInstance -ClassName Win32_ComputerSystem | Select Model -ExpandProperty Model").stdout.chomp
|
53
|
+
else
|
54
|
+
skip_resource "The `sys_info.model` resource is not supported on your OS yet."
|
55
|
+
end
|
56
|
+
end
|
29
57
|
end
|
30
58
|
end
|
data/lib/inspec/runner.rb
CHANGED
@@ -255,7 +255,7 @@ module Inspec
|
|
255
255
|
|
256
256
|
resource = arg[0]
|
257
257
|
# check to see if we are using a filtertable object
|
258
|
-
resource =
|
258
|
+
resource = resource.resource if resource.is_a? FilterTable::Table
|
259
259
|
if resource.respond_to?(:resource_skipped?) && resource.resource_skipped?
|
260
260
|
return rspec_skipped_block(arg, opts, resource.resource_exception_message)
|
261
261
|
end
|
data/lib/inspec/version.rb
CHANGED
data/lib/matchers/matchers.rb
CHANGED
@@ -104,7 +104,6 @@ end
|
|
104
104
|
# Deprecated: You should not use this matcher anymore
|
105
105
|
RSpec::Matchers.define :be_running do
|
106
106
|
match do |service|
|
107
|
-
Inspec.deprecate(:serverspec_compatibility, "The service `be_running?` matcher is deprecated.")
|
108
107
|
service.running? == true
|
109
108
|
end
|
110
109
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.7.
|
4
|
+
version: 4.7.24
|
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: 2019-07-
|
11
|
+
date: 2019-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: train
|