From 2ac62545834f10e958c863adac75cbe47a597faf Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 4 Mar 2016 23:34:17 +0100 Subject: remove a crappy function --- lib/puppet/parser/functions/hostname.rb | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 lib/puppet/parser/functions/hostname.rb diff --git a/lib/puppet/parser/functions/hostname.rb b/lib/puppet/parser/functions/hostname.rb deleted file mode 100644 index 7bc477f..0000000 --- a/lib/puppet/parser/functions/hostname.rb +++ /dev/null @@ -1,13 +0,0 @@ -# get an uniq array of ipaddresses for a hostname -require 'resolv' - -module Puppet::Parser::Functions - newfunction(:hostname, :type => :rvalue) do |args| - res = Array.new - Resolv::DNS.new.each_address(args[0]){ |addr| - res << addr - } - res.uniq - end -end - -- cgit v1.2.3 From cff3734e4fc76973fd3720f1dd7f50a80e65d5f4 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 27 Mar 2016 18:33:24 +0200 Subject: this is the pick() function in stdlib --- lib/puppet/parser/functions/get_default.rb | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 lib/puppet/parser/functions/get_default.rb diff --git a/lib/puppet/parser/functions/get_default.rb b/lib/puppet/parser/functions/get_default.rb deleted file mode 100644 index 3f4359b..0000000 --- a/lib/puppet/parser/functions/get_default.rb +++ /dev/null @@ -1,15 +0,0 @@ -# get_default($value, $default) : $value -# -# return $value || $default. -module Puppet::Parser::Functions - newfunction(:get_default, :type => :rvalue) do |args| - value = nil - args.each { |x| - if ! x.nil? and x.length > 0 - value = x - break - end - } - return value - end -end -- cgit v1.2.3