From a4ebae621dd4dc09d760a51b8b221a3250142789 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Fri, 7 Oct 2016 13:00:06 +0100 Subject: (FM-5703, PUP-6717) Remove the dynamic deprecation_gen This was not working when the puppet master did not have the newest stdlib version in its environment. --- lib/puppet/functions/validate_absolute_path.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib/puppet/functions/validate_absolute_path.rb') diff --git a/lib/puppet/functions/validate_absolute_path.rb b/lib/puppet/functions/validate_absolute_path.rb index 5ae9d29..94f52e1 100644 --- a/lib/puppet/functions/validate_absolute_path.rb +++ b/lib/puppet/functions/validate_absolute_path.rb @@ -1,3 +1,10 @@ -require 'puppet_x/puppetlabs/stdlib/deprecation_gen' -PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_absolute_path", "Stdlib::Compat::Absolute_Path") -# Puppet::Functions.create_function +Puppet::Functions.create_function(:validate_absolute_path, Puppet::Functions::InternalFunction) do + dispatch :deprecation_gen do + scope_param + optional_repeated_param 'Any', :args + end + def deprecation_gen(scope, *args) + call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_Path. There is further documentation for validate_legacy function in the README.") + scope.send("function_validate_absolute_path", args) + end +end -- cgit v1.2.3