inspec 4.17.15 → 4.17.17
Sign up to get free protection for your applications and to get access to all the features.
- 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: 1834559fb185f5d2d7477563f319605dc3111db8f598777c7d78d0e32b1fd11c
|
4
|
+
data.tar.gz: 17b3b6a638f067cf14cdfa836940a1f620de0ae1310b7b3d45bf27b4d7a0552b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 282930a4ab520be61d4d187aba3e7721a628882c0a6ded0f5df619ac681ed1f8951ffdc11212913066e77ebf9905e4d8ed47c4c275da0fada0a7e8c8a99c9704
|
7
|
+
data.tar.gz: c1797f51e7552ea8930c50dfe3a25719430eb3221dd9d0799b32cf3e0a1290ae369c5df11c0d83a20e19a3928d176dade29a12fa904f8d5dd140164bb71bdd17
|
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
|
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
|
- Chef InSpec Team
|
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
|
@@ -584,6 +584,7 @@ files:
|
|
584
584
|
- lib/inspec/resources/mysql_session.rb
|
585
585
|
- lib/inspec/resources/nginx.rb
|
586
586
|
- lib/inspec/resources/nginx_conf.rb
|
587
|
+
- lib/inspec/resources/noop.rb
|
587
588
|
- lib/inspec/resources/npm.rb
|
588
589
|
- lib/inspec/resources/ntp_conf.rb
|
589
590
|
- lib/inspec/resources/oneget.rb
|