inspec-core 4.17.15 → 4.17.17
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/describe.rb +4 -0
- data/lib/inspec/resources/noop.rb +9 -0
- data/lib/inspec/rule.rb +8 -11
- data/lib/inspec/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9cfd01a9da3acdf34494cfad5f09ce2656ab12bd0bc727322eb8de72c342fa3
|
4
|
+
data.tar.gz: 111c6ea5d24bc14f76b0d9d3b25d92639a2fdcdb14711b2e8045e51b4b5033f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd3169c135e2600a54d7282e5e86579043b118530377ecaac4537805eba272ef7f87f64f0ad744812fb04dda6f53326e14687c1e15b5b0fe031379cc6fe1c9fd
|
7
|
+
data.tar.gz: 1c6f45bf5e0372ae8c529f275df59cd336ec180cf118f8d34219f7de0a85b46659c6c084e468963eca38d841c1fc7961bfbebd6496caf557e8a4c217e7732d6c
|
data/lib/inspec/describe.rb
CHANGED
@@ -17,6 +17,10 @@ module Inspec
|
|
17
17
|
@action.call("describe.one", @checks, nil)
|
18
18
|
end
|
19
19
|
|
20
|
+
def method_missing(method_name, *arguments)
|
21
|
+
Inspec::DSL.method_missing_resource(inspec, method_name, *arguments)
|
22
|
+
end
|
23
|
+
|
20
24
|
def describe(*args, &block)
|
21
25
|
@checks.push(["describe", args, block])
|
22
26
|
end
|
data/lib/inspec/rule.rb
CHANGED
@@ -227,9 +227,7 @@ module Inspec
|
|
227
227
|
msg = "Skipped control due to #{skip_check[:type]} condition."
|
228
228
|
end
|
229
229
|
|
230
|
-
|
231
|
-
# a separate resource to do skipping
|
232
|
-
resource = rule.os
|
230
|
+
resource = rule.noop
|
233
231
|
resource.skip_resource(msg)
|
234
232
|
[["describe", [resource], nil]]
|
235
233
|
end
|
@@ -344,14 +342,13 @@ module Inspec
|
|
344
342
|
def with_dsl(block)
|
345
343
|
return nil if block.nil?
|
346
344
|
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
block
|
345
|
+
dsl = self.class.resource_dsl
|
346
|
+
|
347
|
+
return block unless dsl
|
348
|
+
|
349
|
+
proc do |*args|
|
350
|
+
include dsl
|
351
|
+
instance_exec(*args, &block)
|
355
352
|
end
|
356
353
|
end
|
357
354
|
|
data/lib/inspec/version.rb
CHANGED
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.17.
|
4
|
+
version: 4.17.17
|
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-
|
11
|
+
date: 2019-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: train-core
|
@@ -531,6 +531,7 @@ files:
|
|
531
531
|
- lib/inspec/resources/mysql_session.rb
|
532
532
|
- lib/inspec/resources/nginx.rb
|
533
533
|
- lib/inspec/resources/nginx_conf.rb
|
534
|
+
- lib/inspec/resources/noop.rb
|
534
535
|
- lib/inspec/resources/npm.rb
|
535
536
|
- lib/inspec/resources/ntp_conf.rb
|
536
537
|
- lib/inspec/resources/oneget.rb
|