[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch,	upstream, updated. 0.25.5-639-g8f94f35
    James Turnbull 
    james at lovedthanlost.net
       
    Wed Jul 14 10:29:46 UTC 2010
    
    
  
The following commit has been merged in the upstream branch:
commit 2044550137bf923f9620b25eb0e8c92eefd6db6f
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date:   Mon Dec 28 16:52:34 2009 +0100
    Fix #2894 - exclude .pp files under modules files directories
    
    Selinux modules files also ends in ".pp".
    Puppetdoc tries to parse them as if they are regular puppet files and
    then fails.
    This patch makes sure puppetdoc tells RDoc to exclude parsing .pp
    files in the modules files section.
    
    Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>
diff --git a/lib/puppet/util/rdoc.rb b/lib/puppet/util/rdoc.rb
index 4edbf06..fc4e2c6 100644
--- a/lib/puppet/util/rdoc.rb
+++ b/lib/puppet/util/rdoc.rb
@@ -23,6 +23,7 @@ module Puppet::Util::RDoc
             options = [ "--fmt", "puppet",
                         "--quiet",
                         "--force-update",
+                        "--exclude", "/modules/[^/]*/files/.*\.pp$",
                         "--op", outputdir ]
 
             options += files
diff --git a/spec/unit/util/rdoc.rb b/spec/unit/util/rdoc.rb
index eeaaa32..25c94a1 100755
--- a/spec/unit/util/rdoc.rb
+++ b/spec/unit/util/rdoc.rb
@@ -49,6 +49,12 @@ describe Puppet::Util::RDoc do
             Puppet::Util::RDoc.rdoc("myoutputdir", [])
         end
 
+        it "should tell RDoc to exclude .pp files under any modules/<mod>/files section" do
+            @rdoc.expects(:document).with { |args| args.include?("--exclude") and args.include?("/modules/[^/]*/files/.*\.pp$") }
+
+            Puppet::Util::RDoc.rdoc("myoutputdir", [])
+        end
+
         it "should give all the source directories to RDoc" do
             @rdoc.expects(:document).with { |args| args.include?("sourcedir") }
 
-- 
Puppet packaging for Debian
    
    
More information about the Pkg-puppet-devel
mailing list