mirror of
https://github.com/inspec/inspec
synced 2024-11-22 20:53:11 +00:00
Remove spurious 'unless activated?' on most activation calls
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
91ed6e3256
commit
591317e659
4 changed files with 6 additions and 5 deletions
|
@ -40,7 +40,8 @@ module Inspec
|
|||
if hook
|
||||
# OK, load the hook if it hasn't been already. We'll then know a module,
|
||||
# which we can then inject into the context
|
||||
hook.activate unless hook.activated?
|
||||
hook.activate
|
||||
|
||||
# Inject the module's methods into the context.
|
||||
# implementation_class is the field name, but this is actually a module.
|
||||
self.class.include(hook.implementation_class)
|
||||
|
|
|
@ -38,7 +38,7 @@ module Inspec::DSL
|
|||
if hook
|
||||
# OK, load the hook if it hasn't been already. We'll then know a module,
|
||||
# which we can then inject into the context
|
||||
hook.activate unless hook.activated?
|
||||
hook.activate
|
||||
# Inject the module's methods into the context
|
||||
# implementation_class is the field name, but this is actually a module.
|
||||
self.class.include(hook.implementation_class)
|
||||
|
|
|
@ -52,7 +52,7 @@ module Inspec
|
|||
if hook
|
||||
# OK, load the hook if it hasn't been already. We'll then know a module,
|
||||
# which we can then inject into the resource
|
||||
hook.activate unless hook.activated?
|
||||
hook.activate
|
||||
# Inject the module's methods into the resource as class methods.
|
||||
# implementation_class is the field name, but this is actually a module.
|
||||
extend(hook.implementation_class)
|
||||
|
|
|
@ -17,7 +17,7 @@ module Inspec
|
|||
if hook
|
||||
# OK, load the hook if it hasn't been already. We'll then know a module,
|
||||
# which we can then inject into the context
|
||||
hook.activate unless hook.activated?
|
||||
hook.activate
|
||||
|
||||
# Inject the module's methods into the example group contexts.
|
||||
# implementation_class is the field name, but this is actually a module.
|
||||
|
@ -46,7 +46,7 @@ module Inspec
|
|||
if hook
|
||||
# OK, load the hook if it hasn't been already. We'll then know a module,
|
||||
# which we can then inject into the context
|
||||
hook.activate unless hook.activated?
|
||||
hook.activate
|
||||
|
||||
# Inject the module's methods into the example group contexts.
|
||||
# implementation_class is the field name, but this is actually a module.
|
||||
|
|
Loading…
Reference in a new issue