]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Minor changes. Added placeholder for :doc in Puppet's newfunction to fill later.
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 23 Apr 2011 00:18:52 +0000 (01:18 +0100)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 23 Apr 2011 00:18:52 +0000 (01:18 +0100)
load_variables.rb
persistent_crontab_minutes.rb
random_crontab_minutes.rb

index 304bf005e526a4a9419ea44109067b04bbb414e3..a6ccc608a6e280718653e890d196fb1ced1427cc 100644 (file)
@@ -67,7 +67,7 @@ This will result in a variable $foo being added and ready for use.
     end
 
     data.each { |param, value| setvar(param, strinterp(value)) }
-  end # def newfunction
-end # module Puppet::Parser::Functions
+  end
+end
 
 # vim: set ts=2 sw=2 et :
index 5a768681690393998159bddfd8eba36f88d66e9f..cd800942830c9ac221f189964fa22c36a4d5c557 100644 (file)
@@ -2,14 +2,16 @@
 # persistent_crontab_minutes.rb
 #
 
-require 'md5'
-
 module Puppet::Parser::Functions
-  newfunction(:persistent_crontab_minutes, :type => :rvalue) do |arguments|
+  newfunction(:persistent_crontab_minutes, :type => :rvalue, :doc => <<-EOS
+    EOS
+  ) do |arguments|
 
     raise(Puppet::ParseError, "Wrong number of arguments " +
       "given (#{arguments.size} for 2)") if arguments.size < 2
 
+    require 'md5'
+
     value = 0
 
     job  = arguments[0]
@@ -55,7 +57,7 @@ module Puppet::Parser::Functions
     parser.watch_file(file) if File.exists?(file)
 
     return value
-  end # def newfunction
-end # module Puppet::Parser::Functions
+  end
+end
 
 # vim: set ts=2 sw=2 et :
index b3fb544b67dd88f8da3b1649eb02f6671bf4e8d9..8ab29e1896dd0d20c70f33a6453bfd5d3adda039 100644 (file)
@@ -2,14 +2,16 @@
 # random_crontab_minutes.rb
 #
 
-require 'md5'
-
 module Puppet::Parser::Functions
-  newfunction(:random_crontab_minutes, :type => :rvalue) do |arguments|
+  newfunction(:random_crontab_minutes, :type => :rvalue, :doc => <<-EOS
+    EOS
+  ) do |arguments|
 
     raise(Puppet::ParseError, "Wrong number of arguments " +
       "given (#{arguments.size} for 2)") if arguments.size < 2
 
+    require 'md5'
+
     job_name = arguments[0]
     host     = arguments[1]
 
@@ -23,7 +25,7 @@ module Puppet::Parser::Functions
     value = value < 60 ? value : 59
 
     return value
-  end # def newfunction
-end # module Puppet::Parser::Functions
+  end
+end
 
 # vim: set ts=2 sw=2 et :