diff options
author | David Schmitt <david@schmitt.edv-bus.at> | 2007-10-06 10:11:47 +0200 |
---|---|---|
committer | David Schmitt <david@schmitt.edv-bus.at> | 2007-10-06 10:11:47 +0200 |
commit | d9a3c7617a402a19f7114d9b262d62b3a7b7b24c (patch) | |
tree | 6919d055caa886317595314fa5753a115af5e559 /files/functions | |
parent | dbf92194b77f5545ab67a9ea83241102406b4392 (diff) | |
download | puppet-common-d9a3c7617a402a19f7114d9b262d62b3a7b7b24c.tar.gz puppet-common-d9a3c7617a402a19f7114d9b262d62b3a7b7b24c.tar.bz2 |
common: remove hand made plugins install defines and use matt's plugins patch
This moves all facts and puppet plugins to the plugins/ directory of modules to
get the benefits of Matt's plugins patch, that distributes these files before
the configuration is requested. This reduces the number of configuration runs to
convergence by one.
Diffstat (limited to 'files/functions')
-rwxr-xr-x | files/functions/basename.rb | 7 | ||||
-rwxr-xr-x | files/functions/dirname.rb | 7 | ||||
-rw-r--r-- | files/functions/gsub.rb | 13 | ||||
-rw-r--r-- | files/functions/re_escape.rb | 7 | ||||
-rw-r--r-- | files/functions/sha1.rb | 9 | ||||
-rw-r--r-- | files/functions/slash_escape.rb | 7 | ||||
-rwxr-xr-x | files/functions/split.rb | 7 |
7 files changed, 0 insertions, 57 deletions
diff --git a/files/functions/basename.rb b/files/functions/basename.rb deleted file mode 100755 index 14f0ca0..0000000 --- a/files/functions/basename.rb +++ /dev/null @@ -1,7 +0,0 @@ -# get the basename of the given filename -module Puppet::Parser::Functions - newfunction(:basename, :type => :rvalue) do |args| - File.basename(args[0]) - end -end - diff --git a/files/functions/dirname.rb b/files/functions/dirname.rb deleted file mode 100755 index 3f784ac..0000000 --- a/files/functions/dirname.rb +++ /dev/null @@ -1,7 +0,0 @@ -# get the directory corresponding to this filename -module Puppet::Parser::Functions - newfunction(:dirname, :type => :rvalue) do |args| - File.dirname(args[0]) - end -end - diff --git a/files/functions/gsub.rb b/files/functions/gsub.rb deleted file mode 100644 index 371820f..0000000 --- a/files/functions/gsub.rb +++ /dev/null @@ -1,13 +0,0 @@ -# generic gsub call -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/files/functions/re_escape.rb b/files/functions/re_escape.rb deleted file mode 100644 index 6e5904b..0000000 --- a/files/functions/re_escape.rb +++ /dev/null @@ -1,7 +0,0 @@ -# apply 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/files/functions/sha1.rb b/files/functions/sha1.rb deleted file mode 100644 index b5aa813..0000000 --- a/files/functions/sha1.rb +++ /dev/null @@ -1,9 +0,0 @@ -# return the sha1 hash -require 'digest/sha1' - -module Puppet::Parser::Functions - newfunction(:sha1, :type => :rvalue) do |args| - Digest::SHA1.hexdigest(args[0]) - end -end - diff --git a/files/functions/slash_escape.rb b/files/functions/slash_escape.rb deleted file mode 100644 index 04d3b95..0000000 --- a/files/functions/slash_escape.rb +++ /dev/null @@ -1,7 +0,0 @@ -# escape slashes in a String -module Puppet::Parser::Functions - newfunction(:slash_escape, :type => :rvalue) do |args| - args[0].gsub(/\//, '\\/') - end -end - diff --git a/files/functions/split.rb b/files/functions/split.rb deleted file mode 100755 index d08a40b..0000000 --- a/files/functions/split.rb +++ /dev/null @@ -1,7 +0,0 @@ -# generic split call -module Puppet::Parser::Functions - newfunction(:split, :type => :rvalue) do |args| - args[0].split(/#{args[1]}/) - end -end - |