inspec-core 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b94a47b56f16dbf38f6615e8d875b52b73a33408ce77e50459e9e4e02896ce28
4
- data.tar.gz: f25ea6088072f15623ad844358f99e678740cbf569da136145b216571c29c3a0
3
+ metadata.gz: e9cfd01a9da3acdf34494cfad5f09ce2656ab12bd0bc727322eb8de72c342fa3
4
+ data.tar.gz: 111c6ea5d24bc14f76b0d9d3b25d92639a2fdcdb14711b2e8045e51b4b5033f4
5
5
  SHA512:
6
- metadata.gz: edd0ca2b83df5e036fe0269c7ff8e75ab9a68642a265d814808332127ac819ee79743df898d202f02be38010ef17293f2ef8e700892ebeca055731b951370fe9
7
- data.tar.gz: 6221337750dd654cb62ef2f0423cceb2ad373c22f4a2eb42a3cb59b57946757d64439eaadfeb0f1f08887f953dbfdc67bd9f82c790b9666663781314d5aa7afa
6
+ metadata.gz: bd3169c135e2600a54d7282e5e86579043b118530377ecaac4537805eba272ef7f87f64f0ad744812fb04dda6f53326e14687c1e15b5b0fe031379cc6fe1c9fd
7
+ data.tar.gz: 1c6f45bf5e0372ae8c529f275df59cd336ec180cf118f8d34219f7de0a85b46659c6c084e468963eca38d841c1fc7961bfbebd6496caf557e8a4c217e7732d6c
@@ -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
@@ -0,0 +1,9 @@
1
+ module Inspec::Resources
2
+ class Noop < Inspec.resource(1)
3
+ name "noop"
4
+
5
+ def to_s
6
+ "No-op"
7
+ end
8
+ end
9
+ end
@@ -227,9 +227,7 @@ module Inspec
227
227
  msg = "Skipped control due to #{skip_check[:type]} condition."
228
228
  end
229
229
 
230
- # TODO: we use os as the carrier here, but should consider
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
- if self.class.resource_dsl
348
- dsl = self.class.resource_dsl
349
- proc do |*args|
350
- include dsl
351
- instance_exec(*args, &block)
352
- end
353
- else
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
 
@@ -1,3 +1,3 @@
1
1
  module Inspec
2
- VERSION = "4.17.15".freeze
2
+ VERSION = "4.17.17".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.17.15
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-09-30 00:00:00.000000000 Z
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