Commit Graph

7 Commits

Author SHA1 Message Date
Charlie Sharpsteen 9cd4fd14a9 Extend doc generation to defined types
Puppet Yardoc now generates documentation for defined types in addition to host
classes. The actual change was fairly small, however this patch is quite large
as most of the host class bits were re-architected to inherit from defined
types. Host classes are basically the same as defined types with the addition
of inheritance. Pops also models Host Class using a similar inheritance
relationship.
2014-05-30 09:28:25 -07:00
Charlie Sharpsteen 005a8521bd Extract class parameters from parser output
Re-worked the YARD transformer and handlers to attach parameters to the
resulting code objects. Some architectural debt was incurred in the interests
of producing a working prototype quickly.
2014-05-28 23:53:12 -07:00
Charlie Sharpsteen d6a4791c30 Fix signature of HostClassObject#inheritance_tree
The `YARD::Registry` expects all subclasses of `NamespaceObject` to accept one
argument when `inheritance_tree` is called.
2014-05-27 20:52:59 -07:00
Charlie Sharpsteen 787fca8ebc Implement inheritance tree for host classes
Documentation pages for host classes now show the full inheritance tree instead
of just the immediate parent.
2014-05-27 19:34:12 -07:00
Charlie Sharpsteen d8bc2f3dce Display inheritance relationships for host classes 2014-05-26 22:36:22 -07:00
Charlie Sharpsteen a051319b34 Clobber YARD namespace proxies
When creating an object, YARD will split the object name using `::` and
recursively create proxy namespaces for each component. Unfortunately this
process is optimized for Ruby and somewhat mangles Puppet code as Puppet class
names are not capitalized.

For now, dispense with this behavior by implementing `HostClassObject.new`.
2014-05-26 17:55:43 -07:00
Charlie Sharpsteen e3d2602cba Move Puppet classes into a custom namespace
Instead of documenting Puppet classes using `ClassObject`, use a custom
subclass of `NamespaceObject`. This is done because Puppet classes are not Ruby
classes and will have components that don't fit into the model offered by
`ClassObject`.

This commit also adds a couple of monkey patches to integrate the new
`:hostclass` into YARD tooling and the beginnings of some custom templating.
2014-05-25 22:59:46 -07:00