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

Support notdefaultfor provider DSL method #282

Open joshcooper opened 3 years ago

joshcooper commented 3 years ago

Use Case

Puppet added a notdefaultfor DSL method to constrain providers, similar to defaultfor. This allows providers to default to a given osfamily, except on earlier os versions. However, strings doesn't support notdefaultfor

Describe the Solution You Would Like

Strings should emit documentation when a provider uses notdefaultfor. For example, the systemd service provider defines:

  defaultfor :operatingsystem => :debian
  notdefaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["5", "6", "7"] 

I would expect to see documentation similar to defaultfor in the docs for each provider:

<div class="tags">
  <p class="tag_title">Default Provider For</p>
  <ul>

      <li><tt>osfamily &mdash; [:archlinux]</tt></li>

      <li><tt>osfamily &mdash; redhat, operatingsystemmajrelease &mdash; ["7", "8"]</tt></li>

See also https://tickets.puppetlabs.com/browse/PUP-8552