puppetlabs / puppet-strings

The next generation Puppet documentation extraction and presentation tool.
http://puppetlabs.github.io/puppet-strings/
Apache License 2.0
90 stars 84 forks source link

(DOCUMENT-1232) Add support for ensurable in types_extras_handler #281

Closed joshcooper closed 3 years ago

joshcooper commented 3 years ago

Puppet's file type uses the ensurable method in an extra file, so add support for that.

joshcooper commented 3 years ago

Manually tested that puppet strings generates ensure docs for the file type:

$ grep ensure doc/puppet_types/file.html 
type should be specified in the <code>ensure</code> attribute.</p>
      <span class="name">ensure</span>
<li><code>absent</code> ensures the file doesn't exist, and deletes it if necessary.</li>
<li><code>file</code> ensures it's a normal file, and enables use of the <code>content</code> or
<li><code>directory</code> ensures it's a directory, and enables use of the <code>source</code>,
<li><code>link</code> ensures the file is a symlink, and <strong>requires</strong> that you also
jpogran commented 3 years ago

Thanks for the work @joshcooper! Is there a specific issue/JIRA ticket that inspired this (so I can add it to the changelog)? If not I'll merge as is and put up a PR to amend the CHANGELOG with an Unreleased section for future releases.

joshcooper commented 3 years ago

Ah sorry forgot to update this. The issue came about in https://tickets.puppetlabs.com/browse/DOCUMENT-1232