From d383ab897937a7e7e5fcf2929a63241e894f7616 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Thu, 15 Oct 2009 19:07:22 -0400 Subject: Use notice() in the versioncmp() docs Use of notify() is an error, so replace it with notice, which is a function. Alternately, notify { msg => '2.6-1 is > than 2.4.5' } could be used. Signed-off-by: Todd Zullinger --- lib/puppet/parser/functions/versioncmp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser/functions') diff --git a/lib/puppet/parser/functions/versioncmp.rb b/lib/puppet/parser/functions/versioncmp.rb index bdf539127..9435655a7 100644 --- a/lib/puppet/parser/functions/versioncmp.rb +++ b/lib/puppet/parser/functions/versioncmp.rb @@ -18,7 +18,7 @@ This functions returns a number:: Example:: if versioncmp('2.6-1', '2.4.5') > 0 { - notify('2.6-1 is > than 2.4.5') + notice('2.6-1 is > than 2.4.5') } ") do |args| -- cgit From 09fb3f707dfce31a11eda2f35bd77e65c911c15f Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Mon, 26 Oct 2009 20:39:41 -0700 Subject: Fixing #2752 - "require" loads "include" Signed-off-by: Luke Kanies --- lib/puppet/parser/functions/require.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/puppet/parser/functions') diff --git a/lib/puppet/parser/functions/require.rb b/lib/puppet/parser/functions/require.rb index 3a2032d7f..d72169af5 100644 --- a/lib/puppet/parser/functions/require.rb +++ b/lib/puppet/parser/functions/require.rb @@ -27,7 +27,10 @@ Note that this function only works with clients 0.25 and later, and it will fail if used with earlier clients. ") do |vals| - send(:function_include, vals) + # Verify that the 'include' function is loaded + method = Puppet::Parser::Functions.function(:include) + + send(method, vals) if resource.metaparam_compatibility_mode? warning "The 'require' function is only compatible with clients at 0.25 and above; including class but not adding dependency" else -- cgit From e2c675edb5aecb5af6399ac53f9a85ed8214b8e9 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Fri, 13 Nov 2009 14:35:34 +1100 Subject: Updated generate function documentation to make it clear it runs on the master --- lib/puppet/parser/functions/generate.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/puppet/parser/functions') diff --git a/lib/puppet/parser/functions/generate.rb b/lib/puppet/parser/functions/generate.rb index 1be9016ed..18fe883b4 100644 --- a/lib/puppet/parser/functions/generate.rb +++ b/lib/puppet/parser/functions/generate.rb @@ -1,7 +1,7 @@ # Runs an external command and returns the results Puppet::Parser::Functions::newfunction(:generate, :type => :rvalue, - :doc => "Calls an external command and returns the results of the - command. Any arguments are passed to the external command as + :doc => "Calls an external command on the Puppet master and returns + the results of the command. Any arguments are passed to the external command as arguments. If the generator does not exit with return code of 0, the generator is considered to have failed and a parse error is thrown. Generators can only have file separators, alphanumerics, dashes, -- cgit