summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/docs.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-08-12 13:53:13 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-08-12 13:53:29 -0700
commit1f3070c4bc77b38e3dd6170cf6a58bee7ec337ac (patch)
tree3c6495838d1b876528cb4522de3484c44749140d /lib/puppet/util/docs.rb
parentd5db8db116aff58215ab0feebd7ec02086040f51 (diff)
parent0f56c1b02d40f1f8552d933dd78b24745937b137 (diff)
downloadpuppet-1f3070c4bc77b38e3dd6170cf6a58bee7ec337ac.tar.gz
puppet-1f3070c4bc77b38e3dd6170cf6a58bee7ec337ac.tar.xz
puppet-1f3070c4bc77b38e3dd6170cf6a58bee7ec337ac.zip
Merge branch 'next'
This synchronizes the 2.7 master branch with 2.6.1RC2
Diffstat (limited to 'lib/puppet/util/docs.rb')
-rw-r--r--lib/puppet/util/docs.rb17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/puppet/util/docs.rb b/lib/puppet/util/docs.rb
index efd054d85..4344d67ab 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
@@ -111,4 +105,3 @@ module Puppet::Util::Docs
module_function :scrub
end
-