From 13ae7fbace9434091d5381208f7b25ff8cf3a5c3 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Sat, 2 Aug 2008 13:16:10 +0200 Subject: [PATCH] minor fixes to .ignore and docs --- files/empty/.ignore | 1 - manifests/defines/modules_dir.pp | 2 +- plugins/puppet/parser/functions/gsub.rb | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/files/empty/.ignore b/files/empty/.ignore index ce47061..e69de29 100644 --- a/files/empty/.ignore +++ b/files/empty/.ignore @@ -1 +0,0 @@ -A placeholder to nail this directory into git diff --git a/manifests/defines/modules_dir.pp b/manifests/defines/modules_dir.pp index a59102f..797de2d 100644 --- a/manifests/defines/modules_dir.pp +++ b/manifests/defines/modules_dir.pp @@ -19,7 +19,7 @@ define modules_dir ( source => [ "puppet:///${name}/modules_dir", "puppet:///common/empty"], checksum => mtime, # ignore the placeholder - ignore => '.ignore', + ignore => '\.ignore', recurse => true, purge => true, force => true, mode => $mode, owner => $owner, group => $group; } diff --git a/plugins/puppet/parser/functions/gsub.rb b/plugins/puppet/parser/functions/gsub.rb index 371820f..e2410ff 100644 --- a/plugins/puppet/parser/functions/gsub.rb +++ b/plugins/puppet/parser/functions/gsub.rb @@ -1,5 +1,9 @@ -# generic gsub call module Puppet::Parser::Functions + # thin wrapper around the ruby gsub function + # gsub($string, $pattern, $replacement) will replace all occurrences of + # $pattern in $string with $replacement. $string can be either a singel + # value or an array. In the latter case, each element of the array will + # be processed in turn. newfunction(:gsub, :type => :rvalue) do |args| if args[0].is_a?(Array) args[0].collect do |val|