+1 On Jul 2, 2009, at 11:33 AM, Brice Figureau wrote:
> > It could happend that we were generating doc for subclasses > before classes, in which case we were forgotting some > parent class instance and recreating them. > We ended up generating doc for some classes multiple times, from > which some were missing documentation. > The fix is to sort the parsed classes alphabetically, which auto- > matically puts enclosing class before enclosed classes. > > Signed-off-by: Brice Figureau <[email protected]> > --- > lib/puppet/util/rdoc/parser.rb | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/lib/puppet/util/rdoc/parser.rb b/lib/puppet/util/rdoc/ > parser.rb > index 61316b4..1d4fa96 100644 > --- a/lib/puppet/util/rdoc/parser.rb > +++ b/lib/puppet/util/rdoc/parser.rb > @@ -281,7 +281,8 @@ class Parser > # that contains the documentation > def parse_elements(container) > Puppet.debug "rdoc: scanning manifest" > - @ast[:classes].each do |name, klass| > + @ast[:classes].values.sort { |a,b| a.classname <=> > b.classname }.each do |klass| > + name = klass.classname > if klass.file == @input_file_name > unless name.empty? > document_class(name,klass,container) > -- > 1.6.0.2 > > > > -- In our civilization, and under our republican form of government, intelligence is so highly honored that it is rewarded by exemption from the cares of office. --Ambrose Bierce --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
