[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.1rc1-141-gcdb2b90

Markus Roberts Markus at reality.com
Mon Aug 16 12:49:03 UTC 2010


The following commit has been merged in the upstream branch:
commit fef8800acaddd54659602b65bd9fdc728d187c67
Author: James Turnbull <james at lovedthanlost.net>
Date:   Thu Aug 12 08:36:28 2010 +1000

    Updated reference output to generate valid Markdown

diff --git a/lib/puppet/util/docs.rb b/lib/puppet/util/docs.rb
index efd054d..1746ef3 100644
--- a/lib/puppet/util/docs.rb
+++ b/lib/puppet/util/docs.rb
@@ -47,25 +47,19 @@ module Puppet::Util::Docs
       lengths[i] = value.to_s.length if value.to_s.length > lengths[i]
     end
 
-    # Add the top header row
-    str += lengths.collect { |num| "=" * num }.join(" ") + "\n"
+    # Add the header names
+    str += headers.zip(lengths).collect { |value, num| pad(value, num) }.join(" | ") + " |" + "\n"
 
-    # And the header names
-    str += headers.zip(lengths).collect { |value, num| pad(value, num) }.join(" ") + "\n"
-
-    # And the second header row
-    str += lengths.collect { |num| "=" * num }.join(" ") + "\n"
+    # And the header row
+    str += lengths.collect { |num| "-" * num }.join(" | ") + " |" + "\n"
 
     # Now each data row
     data.sort { |a, b| a[0].to_s <=> b[0].to_s }.each do |name, rows|
       str += [name, rows].flatten.zip(lengths).collect do |value, length|
         pad(value, length)
-      end.join(" ") + "\n"
+      end.join(" | ") + " |" + "\n"
     end
 
-    # And the bottom line row
-    str += lengths.collect { |num| "=" * num }.join(" ") + "\n"
-
     str + "\n"
   end
 
diff --git a/lib/puppet/util/provider_features.rb b/lib/puppet/util/provider_features.rb
index ac294d2..30e8dcb 100644
--- a/lib/puppet/util/provider_features.rb
+++ b/lib/puppet/util/provider_features.rb
@@ -72,7 +72,7 @@ module Puppet::Util::ProviderFeatures
     names = @features.keys.sort { |a,b| a.to_s <=> b.to_s }
     names.each do |name|
       doc = @features[name].docs.gsub(/\n\s+/, " ")
-      str += "- **#{name}**: #{doc}\n"
+      str += "- *#{name}*: #{doc}\n"
     end
 
     if providers.length > 0
@@ -83,7 +83,7 @@ module Puppet::Util::ProviderFeatures
         prov = provider(provname)
         names.each do |name|
           if prov.feature?(name)
-            data[provname] << "**X**"
+            data[provname] << "*X*"
           else
             data[provname] << ""
           end
diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb
index 3fdd37f..0039074 100644
--- a/lib/puppet/util/reference.rb
+++ b/lib/puppet/util/reference.rb
@@ -32,7 +32,7 @@ class Puppet::Util::Reference
       section = reference(name) or raise "Could not find section #{name}"
       depth = section.depth if section.depth < depth
     end
-    text = ".. contents:: :depth: 2\n\n"
+    text = "{:toc}\n\n"
   end
 
   def self.pdf(text)
@@ -167,7 +167,7 @@ class Puppet::Util::Reference
     # First the header
     text = h(@title, 1)
     text += "\n\n**This page is autogenerated; any changes will get overwritten** *(last generated on #{Time.now.to_s})*\n\n"
-    text +=  ".. contents:: :depth: #{@depth}\n\n" if withcontents
+    text +=  "{:toc}\n\n" if withcontents
 
     text += @header
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list