From b2ed518d24580fa94442f598c9c967d47da8db92 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 31 Oct 2009 15:16:48 +0100 Subject: move plugin directory to fit new 0.25 style --- lib/puppet/parser/functions/htpasswd_sha1.rb | 8 ++++++++ plugins/puppet/parser/functions/htpasswd_sha1.rb | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 lib/puppet/parser/functions/htpasswd_sha1.rb delete mode 100644 plugins/puppet/parser/functions/htpasswd_sha1.rb diff --git a/lib/puppet/parser/functions/htpasswd_sha1.rb b/lib/puppet/parser/functions/htpasswd_sha1.rb new file mode 100644 index 0000000..937621d --- /dev/null +++ b/lib/puppet/parser/functions/htpasswd_sha1.rb @@ -0,0 +1,8 @@ +require 'digest/sha1' +require 'base64' + +module Puppet::Parser::Functions + newfunction(:htpasswd_sha1, :type => :rvalue) do |args| + "{SHA}" + Base64.encode64(Digest::SHA1.digest(args[0])) + end +end diff --git a/plugins/puppet/parser/functions/htpasswd_sha1.rb b/plugins/puppet/parser/functions/htpasswd_sha1.rb deleted file mode 100644 index 937621d..0000000 --- a/plugins/puppet/parser/functions/htpasswd_sha1.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'digest/sha1' -require 'base64' - -module Puppet::Parser::Functions - newfunction(:htpasswd_sha1, :type => :rvalue) do |args| - "{SHA}" + Base64.encode64(Digest::SHA1.digest(args[0])) - end -end -- cgit v1.2.3