-
Notifications
You must be signed in to change notification settings - Fork 87
(GH-225) Document functions in Puppet Datatypes #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(GH-225) Document functions in Puppet Datatypes #235
Conversation
54db100
to
2a41599
Compare
Previously the puppet datatype handler only documented attributes, not functions for example [1]. This commit updates the data type handler to read in the function information and then allow that to be used by puppet-strings in its JSON, Markdown and HTML renderers. This commit also adds tests for many different scenarios and all three rendering types. [1] https://github.com/puppetlabs/puppet/blob/3e03e734dda415272ec156b03ed9f021ba243228/lib/puppet/datatypes/error.rb#L13-L15
2a41599
to
1900b26
Compare
@binford2k @scotje Can I get a review (and merge) on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only thing i saw that might be worth changing is meth
and meths
to method
and methods
#methamphetamines. otherwise this is dope and always love seeing tests!
Unfortunately
|
oh duh, sorry. as you were. |
Updates the new markdown unit tests for data type functions and removes old vestigial markdown output fixtures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @glennsarti! I updated the markdown unit specs to match the new regex based specs (and deleted the old exact-match fixtures so they aren't confusing in the future).
Fixes #225
Previously the puppet datatype handler only documented attributes, not functions
for example [1]. This commit updates the data type handler to read in the
function information and then allow that to be used by puppet-strings in its
JSON, Markdown and HTML renderers. This commit also adds tests for many
different scenarios and all three rendering types.
[1] https://github.com/puppetlabs/puppet/blob/3e03e734dda415272ec156b03ed9f021ba243228/lib/puppet/datatypes/error.rb#L13-L15