aboutsummaryrefslogtreecommitdiff
path: root/plugins/puppet/parser/functions/gsub.rb
diff options
context:
space:
mode:
authorDavid Schmitt <david@schmitt.edv-bus.at>2009-05-31 21:14:37 +0200
committerDavid Schmitt <david@schmitt.edv-bus.at>2009-05-31 21:14:37 +0200
commit53d0fde15feb30777a6929cada73d5f6e6ceb513 (patch)
tree1c81f431393991beabff6011a337dce2d0d76931 /plugins/puppet/parser/functions/gsub.rb
parent9a2c68367f8ac75ce52e315253d28f6710a80702 (diff)
downloadpuppet-common-53d0fde15feb30777a6929cada73d5f6e6ceb513.tar.gz
puppet-common-53d0fde15feb30777a6929cada73d5f6e6ceb513.tar.bz2
Major cleanup of the common module
* improve documentation on all defines * rename modules_dir to module_dir and modules_file to module_file * create $module_dir_path to achieve DRY-ness * silence the lsb_release stuff * improve concatenated_file to use an intermediate file, improving reliability and decoupling the updateing from notifying our peers. * remove serveral functions that were moved to puppet proper: - sha1 => sha1 - gsub,substitute,slash_escape => regsubst
Diffstat (limited to 'plugins/puppet/parser/functions/gsub.rb')
-rw-r--r--plugins/puppet/parser/functions/gsub.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/plugins/puppet/parser/functions/gsub.rb b/plugins/puppet/parser/functions/gsub.rb
deleted file mode 100644
index e2410ff..0000000
--- a/plugins/puppet/parser/functions/gsub.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-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|
- val.gsub(/#{args[1]}/, args[2])
- end
- else
- args[0].gsub(/#{args[1]}/, args[2])
- end
- end
-end
-