diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-03-07 16:48:09 -0800 |
|---|---|---|
| committer | Max Martin <max@puppetlabs.com> | 2011-03-08 13:16:34 -0800 |
| commit | 28ce355be0a16caa8e1cc0b6f531d2be070ca6f2 (patch) | |
| tree | fcca8a27d1af4d596c2384c649159d823f283647 /lib/puppet | |
| parent | 75af5827b68774d0300499fab969239bb8ae6d30 (diff) | |
| download | puppet-28ce355be0a16caa8e1cc0b6f531d2be070ca6f2.tar.gz puppet-28ce355be0a16caa8e1cc0b6f531d2be070ca6f2.tar.xz puppet-28ce355be0a16caa8e1cc0b6f531d2be070ca6f2.zip | |
maint: Fix rdoc when documenting manifest files
The structure of the AST has changed from 2.6.x to master, so the code
to generate documentation from the AST had to change.
Generating documentation for resources other than classes, nodes and
defines is still broken, see ticket #6634
Paired-with: Daniel Pittman <daniel@puppetlabs.com>
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/util/rdoc.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/puppet/util/rdoc.rb b/lib/puppet/util/rdoc.rb index bdac579d6..16d1fa15b 100644 --- a/lib/puppet/util/rdoc.rb +++ b/lib/puppet/util/rdoc.rb @@ -53,17 +53,10 @@ module Puppet::Util::RDoc # of a manifest def output(file, ast) astobj = [] - ast.nodes.each do |name, k| - astobj << k if k.file == file + ast.instantiate('').each do |resource_type| + astobj << resource_type if resource_type.file == file end - ast.hostclasses.each do |name,k| - astobj << k if k.file == file - end - - ast.definitions.each do |name, k| - astobj << k if k.file == file - end astobj.sort! {|a,b| a.line <=> b.line }.each do |k| output_astnode_doc(k) end @@ -89,4 +82,4 @@ module Puppet::Util::RDoc end end -end
\ No newline at end of file +end |
