diff options
author | Micah Anderson <micah@riseup.net> | 2009-11-23 11:54:04 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2009-11-23 11:54:04 -0500 |
commit | 3ff12051c8efabcdfb43b99810ff1c2ea22750a3 (patch) | |
tree | 5145331d85099abd1e01dabca1a474b9651184f6 /plugins/puppet | |
parent | 8a389425075f54f8c10e2ff08c1aa07827d14622 (diff) | |
download | puppet-common-3ff12051c8efabcdfb43b99810ff1c2ea22750a3.tar.gz puppet-common-3ff12051c8efabcdfb43b99810ff1c2ea22750a3.tar.bz2 |
move plugin directory to fit new 0.25.x style and update file paths accordingly
Diffstat (limited to 'plugins/puppet')
-rw-r--r-- | plugins/puppet/parser/functions/basename.rb | 22 | ||||
-rw-r--r-- | plugins/puppet/parser/functions/dirname.rb | 22 | ||||
-rw-r--r-- | plugins/puppet/parser/functions/gsub.rb | 21 | ||||
-rw-r--r-- | plugins/puppet/parser/functions/prefix_with.rb | 19 | ||||
-rw-r--r-- | plugins/puppet/parser/functions/re_escape.rb | 7 | ||||
-rw-r--r-- | plugins/puppet/parser/functions/split.rb | 23 |
6 files changed, 0 insertions, 114 deletions
diff --git a/plugins/puppet/parser/functions/basename.rb b/plugins/puppet/parser/functions/basename.rb deleted file mode 100644 index dc72537..0000000 --- a/plugins/puppet/parser/functions/basename.rb +++ /dev/null @@ -1,22 +0,0 @@ -# This function has two modes of operation: -# -# basename(string) : string -# -# Returns the last component of the filename given as argument, which must be -# formed using forward slashes ("/") regardless of the separator used on the -# local file system. -# -# basename(string[]) : string[] -# -# Returns an array of strings with the basename of each item from the argument. -# -module Puppet::Parser::Functions - newfunction(:basename, :type => :rvalue) do |args| - if args[0].is_a?(Array) - args.collect do |a| File.basename(a) end - else - File.basename(args[0]) - end - end -end - diff --git a/plugins/puppet/parser/functions/dirname.rb b/plugins/puppet/parser/functions/dirname.rb deleted file mode 100644 index ea0d50b..0000000 --- a/plugins/puppet/parser/functions/dirname.rb +++ /dev/null @@ -1,22 +0,0 @@ -# This function has two modes of operation: -# -# dirname(string) : string -# -# Returns all components of the filename given as argument except the last -# one. The filename must be formed using forward slashes (``/..) regardless of -# the separator used on the local file system. -# -# dirname(string[]) : string[] -# -# Returns an array of strings with the basename of each item from the argument. -# -module Puppet::Parser::Functions - newfunction(:dirname, :type => :rvalue) do |args| - if args[0].is_a?(Array) - args.collect do |a| File.dirname(a) end - else - File.dirname(args[0]) - end - end -end - diff --git a/plugins/puppet/parser/functions/gsub.rb b/plugins/puppet/parser/functions/gsub.rb deleted file mode 100644 index 27e6192..0000000 --- a/plugins/puppet/parser/functions/gsub.rb +++ /dev/null @@ -1,21 +0,0 @@ -# -# A 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 single value or an array. In the latter case, each -# element of the array will be processed in turn. -# -module Puppet::Parser::Functions - 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 - diff --git a/plugins/puppet/parser/functions/prefix_with.rb b/plugins/puppet/parser/functions/prefix_with.rb deleted file mode 100644 index 5a12986..0000000 --- a/plugins/puppet/parser/functions/prefix_with.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Prefixes arguments 2..n with first argument. -# -# prefix_with(string prefix, string[] arguments) : string[] -# -# Example: -# -# prefix_with("php-", [ "blah", "foo" ]) -# -# will result in this array: -# -# [ "php-blah", "php-foo" ] -# -module Puppet::Parser::Functions - newfunction(:prefix_with, :type => :rvalue) do |args| - prefix = args.shift - args.collect {|v| "%s%s" % [prefix, v] } - end -end - diff --git a/plugins/puppet/parser/functions/re_escape.rb b/plugins/puppet/parser/functions/re_escape.rb deleted file mode 100644 index 7bee90a..0000000 --- a/plugins/puppet/parser/functions/re_escape.rb +++ /dev/null @@ -1,7 +0,0 @@ -# apply ruby regexp escaping to a string -module Puppet::Parser::Functions - newfunction(:re_escape, :type => :rvalue) do |args| - Regexp.escape(args[0]) - end -end - diff --git a/plugins/puppet/parser/functions/split.rb b/plugins/puppet/parser/functions/split.rb deleted file mode 100644 index bffecc1..0000000 --- a/plugins/puppet/parser/functions/split.rb +++ /dev/null @@ -1,23 +0,0 @@ -# This function has two modes of operation: -# -# split($string, $delimiter) : $string -# -# Split the first argument on every $delimiter. $delimiter is interpreted as -# Ruby regular expression. -# -# split($string[], $delimiter) : $string[][] -# -# Returns an array of split results with the result of applying split to each -# item from the first argument. -# -# For long-term portability it is recommended to refrain from using Ruby's -# extended RE features. -module Puppet::Parser::Functions - newfunction(:split, :type => :rvalue) do |args| - if args[0].is_a?(Array) - args.collect do |a| a.split(/#{args[1]}/) end - else - args[0].split(/#{args[1]}/) - end - end -end |