[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08

James Turnbull james at lovedthanlost.net
Fri Jan 15 09:07:03 UTC 2010


The following commit has been merged in the upstream branch:
commit f05a04eabdee2299f884933010234358c41ac46d
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date:   Wed Nov 4 20:21:16 2009 +0100

    Fix #2784 - puppetdoc/rdoc didn't parse mono-instruction class content
    
    class klass {
      include a, b, c
    }
    
    wasn't producing any rdoc documentation.
    We were thinking code was always embedded in an array which is not
    the case for mono-instruction code.
    
    Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>

diff --git a/lib/puppet/util/rdoc/parser.rb b/lib/puppet/util/rdoc/parser.rb
index 97a245a..fff8aab 100644
--- a/lib/puppet/util/rdoc/parser.rb
+++ b/lib/puppet/util/rdoc/parser.rb
@@ -148,6 +148,7 @@ class Parser
     # create documentation for include statements we can find in +code+
     # and associate it with +container+
     def scan_for_include(container, code)
+        code = [code] unless code.is_a?(Array)
         code.each do |stmt|
             scan_for_include(container,stmt.children) if stmt.is_a?(Puppet::Parser::AST::ASTArray)
 
@@ -163,6 +164,7 @@ class Parser
     # create documentation for global variables assignements we can find in +code+
     # and associate it with +container+
     def scan_for_vardef(container, code)
+        code = [code] unless code.is_a?(Array)
         code.each do |stmt|
             scan_for_vardef(container,stmt.children) if stmt.is_a?(Puppet::Parser::AST::ASTArray)
 
@@ -176,6 +178,7 @@ class Parser
     # create documentation for resources we can find in +code+
     # and associate it with +container+
     def scan_for_resource(container, code)
+        code = [code] unless code.is_a?(Array)
         code.each do |stmt|
             scan_for_resource(container,stmt.children) if stmt.is_a?(Puppet::Parser::AST::ASTArray)
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list