inspec-core 4.7.18 → 4.7.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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: d8ebdd6aaafd9ef4f423418a420b3e46658f013f1f95c6117be5d1a19ae9a609
|
4
|
+
data.tar.gz: 8e11217be61503e5f478a30586aad4b9247752f37354caebf7746fa0483da8b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4cee03272408e51c0870fd0dc2fca4e743a94a5d8f2d3f1b4d423540062c1f913c6971526cd3c5f647eb5e6ac617dd9722f6ecd3d4788c49ac5e130b1e022ac
|
7
|
+
data.tar.gz: 269f2962d1011a85f72a80fa3d22ca59bc727cb4d8e197e2bc2bb4bddc1941cc097a59ee2272ed4a104107597a977756be27ceea638bb436ade579fd7a48b066
|
@@ -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-core
|
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
|
- Dominik Richter
|
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-core
|