diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-27 22:57:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-27 22:57:16 -0700 |
commit | 66371ddff1bd99368c76f6d56dacb815b221cc5d (patch) | |
tree | 4a096211c6e6efaf222d0a98946c588406deb56d /lib/chef/run_context.rb | |
parent | edea7e24cc63f716b595baa542adb01d887584de (diff) | |
download | chef-66371ddff1bd99368c76f6d56dacb815b221cc5d.tar.gz |
add a hook for compat_resourcelcg/compat-resource-run-context-hooks
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/run_context.rb')
-rw-r--r-- | lib/chef/run_context.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb index 7ef476c44b..5d29f766c9 100644 --- a/lib/chef/run_context.rb +++ b/lib/chef/run_context.rb @@ -658,9 +658,11 @@ ERROR_MESSAGE }.map { |x| x.to_sym } # Verify that we didn't miss any methods - missing_methods = superclass.instance_methods(false) - instance_methods(false) - CHILD_STATE - if !missing_methods.empty? - raise "ERROR: not all methods of RunContext accounted for in ChildRunContext! All methods must be marked as child methods with CHILD_STATE or delegated to the parent_run_context. Missing #{missing_methods.join(", ")}." + unless @__skip_method_checking # hook specifically for compat_resource + missing_methods = superclass.instance_methods(false) - instance_methods(false) - CHILD_STATE + if !missing_methods.empty? + raise "ERROR: not all methods of RunContext accounted for in ChildRunContext! All methods must be marked as child methods with CHILD_STATE or delegated to the parent_run_context. Missing #{missing_methods.join(", ")}." + end end end end |