knife-cookbook-doc 0.25.2 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +3 -1
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/chef/knife/README.md.erb +1 -1
- data/lib/knife_cookbook_doc/resource_model.rb +8 -4
- data/lib/knife_cookbook_doc/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: cd01eb69e966c4ab62ee76a13e15190c42c04203
         | 
| 4 | 
            +
              data.tar.gz: 205ccffab152a9cafe8aef0a4a9ae69bb6a00d31
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 760d1427b610240bb186fb4315e788a8b02d8395d23230a4115ebb26fe284cf376c08eb13a6039d5a2b6db6cc32316298e4c02cec9fc08dfe3c46a68d7d7ec03
         | 
| 7 | 
            +
              data.tar.gz: 62c6fb76631b6c52b1065a09e9fe3c259508805cf99f4ffb14b312b15ba6ffe8a59de5d335d429d207fa4f9b1d3e684250d6272c13554a6b88c4332fa6819854
         | 
    
        data/.github/ISSUE_TEMPLATE.md
    CHANGED
    
    | @@ -35,7 +35,9 @@ Reproduction repository: | |
| 35 35 |  | 
| 36 36 | 
             
            <!--
         | 
| 37 37 | 
             
            If possible, please create a repository that reproduces the issue with the
         | 
| 38 | 
            -
            minimal amount of code possible.
         | 
| 38 | 
            +
            minimal amount of code possible. It is highly recommended you take the time
         | 
| 39 | 
            +
            to read "How to create a Minimal, Complete, and Verifiable example" at
         | 
| 40 | 
            +
            https://stackoverflow.com/help/mcve
         | 
| 39 41 | 
             
            -->
         | 
| 40 42 |  | 
| 41 43 | 
             
            Problem description:
         | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    
| @@ -147,7 +147,7 @@ | |
| 147 147 | 
             
            ### Attribute Parameters
         | 
| 148 148 |  | 
| 149 149 | 
             
            <% resource.attributes.each do |attribute| -%>
         | 
| 150 | 
            -
            - <%= attribute %>: <%= resource.attribute_description(attribute) %><% if resource.attribute_has_default_value?(attribute) %> Defaults to <code><%= resource.attribute_default_value(attribute) | 
| 150 | 
            +
            - <%= attribute %>: <%= resource.attribute_description(attribute) %><% if resource.attribute_has_default_value?(attribute) %> Defaults to <code><%= resource.attribute_default_value(attribute) %></code>.<% end %>
         | 
| 151 151 | 
             
            <% end -%>
         | 
| 152 152 | 
             
            <% end -%>
         | 
| 153 153 | 
             
            <% resource.top_level_descriptions.keys.select{|k| k != 'main'}.each do |key| -%>
         | 
| @@ -52,14 +52,18 @@ module KnifeCookbookDoc | |
| 52 52 |  | 
| 53 53 | 
             
                def attribute_has_default_value?(attribute)
         | 
| 54 54 | 
             
                  specification = @native_resource.attribute_specifications[attribute]
         | 
| 55 | 
            -
                  specification && specification. | 
| 55 | 
            +
                  specification && specification.key?(:default)
         | 
| 56 56 | 
             
                end
         | 
| 57 57 |  | 
| 58 58 | 
             
                def attribute_default_value(attribute)
         | 
| 59 | 
            -
                  if attribute_has_default_value?(attribute)
         | 
| 60 | 
            -
             | 
| 59 | 
            +
                  default = if attribute_has_default_value?(attribute)
         | 
| 60 | 
            +
                              @native_resource.attribute_specifications[attribute][:default]
         | 
| 61 | 
            +
                            end
         | 
| 62 | 
            +
             | 
| 63 | 
            +
                  if default.is_a?(Chef::DelayedEvaluator)
         | 
| 64 | 
            +
                    'lazy { ... }'
         | 
| 61 65 | 
             
                  else
         | 
| 62 | 
            -
                     | 
| 66 | 
            +
                    default.inspect
         | 
| 63 67 | 
             
                  end
         | 
| 64 68 | 
             
                end
         | 
| 65 69 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: knife-cookbook-doc
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.26.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Mathias Lafeldt
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date:  | 
| 12 | 
            +
            date: 2019-03-04 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: chef
         |