knife-cookbook-doc 0.25.2 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37887ab7ebaf12a054d994a6901d24d9e5783685
4
- data.tar.gz: ed7ff7f97bc54ca4eaa390610632f8f1caedbdc0
3
+ metadata.gz: cd01eb69e966c4ab62ee76a13e15190c42c04203
4
+ data.tar.gz: 205ccffab152a9cafe8aef0a4a9ae69bb6a00d31
5
5
  SHA512:
6
- metadata.gz: 641fea042b4c32c4ab37ce6c17074e6d697fa9c0bf2c0d776b11a349c34b327a18501a67e4bc809e7f149f437609e01569826d5ebbdd24cf7b12f95034d691ee
7
- data.tar.gz: abd0276748d694e383a32bcf3ad8bc9ba500fe3f173a474a52017ca053c97bb70c68e064de7a9be470048d54a5bb049ded17571cfad467daf1d23e1ec26e6bd8
6
+ metadata.gz: 760d1427b610240bb186fb4315e788a8b02d8395d23230a4115ebb26fe284cf376c08eb13a6039d5a2b6db6cc32316298e4c02cec9fc08dfe3c46a68d7d7ec03
7
+ data.tar.gz: 62c6fb76631b6c52b1065a09e9fe3c259508805cf99f4ffb14b312b15ba6ffe8a59de5d335d429d207fa4f9b1d3e684250d6272c13554a6b88c4332fa6819854
@@ -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
@@ -1,4 +1,5 @@
1
1
  /Gemfile.lock
2
+ /*.gem
2
3
 
3
4
  # Intermediate package dir
4
5
  /pkg
@@ -1,3 +1,7 @@
1
+ # v0.26.0 (Mar 4 2019)
2
+
3
+ * Display `lazy` defaults as such. Submitted by Joe Nuspl.
4
+
1
5
  # v0.25.2 (Dec 18 2018)
2
6
 
3
7
  * Re-release gem with the appropriate version.
@@ -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).inspect %></code>.<% end %>
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.has_key?(:default)
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
- return @native_resource.attribute_specifications[attribute][:default]
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
- return nil
66
+ default.inspect
63
67
  end
64
68
  end
65
69
 
@@ -1,3 +1,3 @@
1
1
  module KnifeCookbookDoc
2
- VERSION = '0.25.2'
2
+ VERSION = '0.26.0'
3
3
  end
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.25.2
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: 2018-12-17 00:00:00.000000000 Z
12
+ date: 2019-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef