mirror of
https://github.com/inspec/inspec
synced 2024-11-14 00:47:10 +00:00
Merge pull request #4549 from inspec/zenspider/describe.one
Added method_missing to Inspec::DescribeBase (used by describe.one) to fix resource loading
This commit is contained in:
commit
a4090f9c1c
2 changed files with 11 additions and 8 deletions
|
@ -17,6 +17,10 @@ module Inspec
|
|||
@action.call("describe.one", @checks, nil)
|
||||
end
|
||||
|
||||
def method_missing(method_name, *arguments)
|
||||
Inspec::DSL.method_missing_resource(inspec, method_name, *arguments)
|
||||
end
|
||||
|
||||
def describe(*args, &block)
|
||||
@checks.push(["describe", args, block])
|
||||
end
|
||||
|
|
|
@ -344,14 +344,13 @@ module Inspec
|
|||
def with_dsl(block)
|
||||
return nil if block.nil?
|
||||
|
||||
if self.class.resource_dsl
|
||||
dsl = self.class.resource_dsl
|
||||
proc do |*args|
|
||||
include dsl
|
||||
instance_exec(*args, &block)
|
||||
end
|
||||
else
|
||||
block
|
||||
dsl = self.class.resource_dsl
|
||||
|
||||
return block unless dsl
|
||||
|
||||
proc do |*args|
|
||||
include dsl
|
||||
instance_exec(*args, &block)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue