puppet-strings 3.0.1 → 4.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -88
  3. data/LICENSE +174 -10
  4. data/README.md +1 -1
  5. data/lib/puppet/face/strings.rb +3 -3
  6. data/lib/puppet-strings/describe.rb +7 -11
  7. data/lib/puppet-strings/markdown/base.rb +6 -4
  8. data/lib/puppet-strings/markdown/data_type.rb +3 -4
  9. data/lib/puppet-strings/markdown/function.rb +5 -5
  10. data/lib/puppet-strings/markdown/resource_type.rb +1 -1
  11. data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +4 -0
  12. data/lib/puppet-strings/markdown/templates/data_type.erb +4 -0
  13. data/lib/puppet-strings/markdown/templates/function.erb +4 -0
  14. data/lib/puppet-strings/markdown/templates/resource_type.erb +4 -0
  15. data/lib/puppet-strings/markdown.rb +9 -11
  16. data/lib/puppet-strings/tasks/generate.rb +5 -3
  17. data/lib/puppet-strings/tasks/gh_pages.rb +6 -6
  18. data/lib/puppet-strings/tasks/validate.rb +3 -3
  19. data/lib/puppet-strings/tasks.rb +3 -3
  20. data/lib/puppet-strings/version.rb +1 -1
  21. data/lib/puppet-strings/yard/code_objects/base.rb +2 -2
  22. data/lib/puppet-strings/yard/code_objects/class.rb +1 -2
  23. data/lib/puppet-strings/yard/code_objects/data_type.rb +2 -2
  24. data/lib/puppet-strings/yard/code_objects/defined_type.rb +1 -2
  25. data/lib/puppet-strings/yard/code_objects/function.rb +6 -6
  26. data/lib/puppet-strings/yard/code_objects/plan.rb +1 -2
  27. data/lib/puppet-strings/yard/code_objects/type.rb +6 -6
  28. data/lib/puppet-strings/yard/handlers/helpers.rb +1 -0
  29. data/lib/puppet-strings/yard/handlers/json/task_handler.rb +1 -0
  30. data/lib/puppet-strings/yard/handlers/puppet/base.rb +3 -3
  31. data/lib/puppet-strings/yard/handlers/ruby/base.rb +2 -2
  32. data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +5 -9
  33. data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +33 -32
  34. data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +1 -1
  35. data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +4 -4
  36. data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +3 -0
  37. data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +6 -5
  38. data/lib/puppet-strings/yard/parsers/json/parser.rb +1 -1
  39. data/lib/puppet-strings/yard/parsers/puppet/parser.rb +0 -6
  40. data/lib/puppet-strings/yard/parsers/puppet/statement.rb +12 -20
  41. data/lib/puppet-strings/yard/tags/overload_tag.rb +4 -4
  42. data/lib/puppet-strings/yard/tags/parameter_directive.rb +1 -1
  43. data/lib/puppet-strings/yard/tags/property_directive.rb +1 -1
  44. data/lib/puppet-strings/yard/templates/default/fulldoc/html/setup.rb +11 -9
  45. data/lib/puppet-strings/yard/templates/default/layout/html/setup.rb +16 -14
  46. data/lib/puppet-strings/yard/templates/default/puppet_class/html/deprecated.erb +6 -0
  47. data/lib/puppet-strings/yard/templates/default/puppet_class/html/setup.rb +5 -3
  48. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/deprecated.erb +6 -0
  49. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +4 -2
  50. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/deprecated.erb +6 -0
  51. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/setup.rb +5 -3
  52. data/lib/puppet-strings/yard/templates/default/puppet_defined_type/html/deprecated.erb +6 -0
  53. data/lib/puppet-strings/yard/templates/default/puppet_defined_type/html/setup.rb +3 -1
  54. data/lib/puppet-strings/yard/templates/default/puppet_function/html/deprecated.erb +6 -0
  55. data/lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb +3 -1
  56. data/lib/puppet-strings/yard/templates/default/puppet_plan/html/deprecated.erb +6 -0
  57. data/lib/puppet-strings/yard/templates/default/puppet_plan/html/setup.rb +3 -1
  58. data/lib/puppet-strings/yard/templates/default/puppet_provider/html/setup.rb +2 -0
  59. data/lib/puppet-strings/yard/templates/default/puppet_task/html/setup.rb +2 -0
  60. data/lib/puppet-strings/yard/templates/default/puppet_type/html/deprecated.erb +6 -0
  61. data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +5 -3
  62. data/lib/puppet-strings/yard/templates/default/tags/setup.rb +3 -1
  63. data/lib/puppet-strings/yard/util.rb +3 -5
  64. data/lib/puppet-strings/yard.rb +1 -1
  65. data/lib/puppet-strings.rb +3 -8
  66. metadata +18 -13
  67. data/COMMITTERS.md +0 -185
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '05735069d766d983fa334a6c15040709e42e3a270edf2d52b3a021b39505395d'
4
- data.tar.gz: 88875f3d75858d3dba7ca3b29f75e6037a1e6c82922d492b14bd0a668721afef
3
+ metadata.gz: d71c38863e3ae96a9d624ae16c7863a5bce3a79478b001fb3d07fde4794bdfcb
4
+ data.tar.gz: 309e63741780ae8faa25eaff4f89d19e0bbe0004af18ea6c62540357fca643eb
5
5
  SHA512:
6
- metadata.gz: 8df1dd824e795381077b65f3fb97c8c5153e7249412bf9067e9a6d4ce7a99b8839ec65f3238fac112afb3425aa3a51121bdff363f62f158acec1e1cef429f8da
7
- data.tar.gz: 35b9ceadc498d543613ab2e9ce0d098a73c4f9b9fba8fa64728fdd7573fb50eb91405fcb4adc2398c14fd4c40e844093c00f000544b6a2413531bcaf496f20ce
6
+ metadata.gz: 50c765b822be1aa00c9ea147eefcfe2e42023f1b94b0975e45a526dd22fea403850a6aef00065cf48f574792d2af0f8597034a865a016013e28fa2ba68f2f3ba
7
+ data.tar.gz: 24b43ef7887be10c01be9e987b08195a0f3282b4631d16b66f750f8582ab9fbe57214a3fd40ac5586e62212d68ca6fea7400607e3d6c9169ac390dc4dbb8cf96
data/CHANGELOG.md CHANGED
@@ -1,8 +1,21 @@
1
+ <!-- markdownlint-disable MD024 -->
1
2
  # Changelog
2
3
 
3
4
  All notable changes to this project will be documented in this file.
4
5
 
5
6
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
7
+
8
+ ## [v4.0.0-rc.1](https://github.com/puppetlabs/puppet-strings/tree/v4.0.0-rc.1) - 2023-04-17
9
+
10
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.1...v4.0.0-rc.1)
11
+
12
+ ### Added
13
+
14
+ - Add deprecated tag [#342](https://github.com/puppetlabs/puppet-strings/pull/342) ([b4ldr](https://github.com/b4ldr))
15
+
16
+ ### Changed
17
+ - (CONT-812) Puppet 8 / Ruby 3 support [#348](https://github.com/puppetlabs/puppet-strings/pull/348) ([chelnak](https://github.com/chelnak))
18
+
6
19
  ## [v3.0.1](https://github.com/puppetlabs/puppet-strings/tree/v3.0.1) - 2022-10-25
7
20
 
8
21
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.0...v3.0.1)
@@ -18,28 +31,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
18
31
  ### Added
19
32
 
20
33
  - (#223) Use code blocks as appropriate in Markdown [#319](https://github.com/puppetlabs/puppet-strings/pull/319) ([danielparks](https://github.com/danielparks))
21
-
22
34
  - Use tilde heredocs for readability [#317](https://github.com/puppetlabs/puppet-strings/pull/317) ([danielparks](https://github.com/danielparks))
23
35
 
24
36
  ### Changed
25
37
  - (CONT-228) Remove deprecated emit flags [#329](https://github.com/puppetlabs/puppet-strings/pull/329) ([chelnak](https://github.com/chelnak))
26
-
27
38
  - (CONT-228) Bump ruby version [#326](https://github.com/puppetlabs/puppet-strings/pull/326) ([chelnak](https://github.com/chelnak))
28
-
29
39
  - (#301) Update minimum Ruby version to 2.5.0 [#313](https://github.com/puppetlabs/puppet-strings/pull/313) ([danielparks](https://github.com/danielparks))
30
40
 
31
41
  ### Fixed
32
42
 
33
43
  - (#240) Fix output of default values that are expressions [#315](https://github.com/puppetlabs/puppet-strings/pull/315) ([danielparks](https://github.com/danielparks))
34
-
35
44
  - (#267) Don’t show “Public X” header without contents [#314](https://github.com/puppetlabs/puppet-strings/pull/314) ([danielparks](https://github.com/danielparks))
36
-
37
45
  - (#307) Always enable plan parsing [#312](https://github.com/puppetlabs/puppet-strings/pull/312) ([danielparks](https://github.com/danielparks))
38
-
39
46
  - (#302) Fix warnings generated by ERB.new [#308](https://github.com/puppetlabs/puppet-strings/pull/308) ([danielparks](https://github.com/danielparks))
40
-
41
47
  - (#304) Fix double backticks in Markdown [#305](https://github.com/puppetlabs/puppet-strings/pull/305) ([danielparks](https://github.com/danielparks))
42
-
43
48
  - (#300) Fix anchor links in Markdown docs [#303](https://github.com/puppetlabs/puppet-strings/pull/303) ([danielparks](https://github.com/danielparks))
44
49
 
45
50
  ## [v2.9.0](https://github.com/puppetlabs/puppet-strings/tree/v2.9.0) - 2021-11-29
@@ -65,7 +70,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
65
70
  ### Fixed
66
71
 
67
72
  - (FIXUP) Check for nil before injecting provider param into Types [#285](https://github.com/puppetlabs/puppet-strings/pull/285) ([scotje](https://github.com/scotje))
68
-
69
73
  - README.md: update link to docs [#276](https://github.com/puppetlabs/puppet-strings/pull/276) ([kenyon](https://github.com/kenyon))
70
74
 
71
75
  ## [v2.7.0](https://github.com/puppetlabs/puppet-strings/tree/v2.7.0) - 2021-05-17
@@ -90,13 +94,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
90
94
  ### Fixed
91
95
 
92
96
  - Do not fail in case return tag has no type specified [#268](https://github.com/puppetlabs/puppet-strings/pull/268) ([tiandrey](https://github.com/tiandrey))
93
-
94
97
  - Handle a missing description gracefully [#260](https://github.com/puppetlabs/puppet-strings/pull/260) ([scotje](https://github.com/scotje))
95
-
96
98
  - Fix ERB failure - parameters without descriptions [#255](https://github.com/puppetlabs/puppet-strings/pull/255) ([trevor-vaughan](https://github.com/trevor-vaughan))
97
-
98
99
  - puppet_function template: fix tags, source [#249](https://github.com/puppetlabs/puppet-strings/pull/249) ([raemer](https://github.com/raemer))
99
-
100
100
  - Handle a missing description gracefully [#246](https://github.com/puppetlabs/puppet-strings/pull/246) ([ekohl](https://github.com/ekohl))
101
101
 
102
102
  ## [v2.5.0](https://github.com/puppetlabs/puppet-strings/tree/v2.5.0) - 2020-07-15
@@ -106,15 +106,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
106
106
  ### Added
107
107
 
108
108
  - (GH-225) Document functions in Puppet Datatypes [#235](https://github.com/puppetlabs/puppet-strings/pull/235) ([glennsarti](https://github.com/glennsarti))
109
-
110
109
  - Add checks to resource_type handler and code objects [#232](https://github.com/puppetlabs/puppet-strings/pull/232) ([scotje](https://github.com/scotje))
111
-
112
110
  - (#227) Inject `provider` into params list for types with providers [#231](https://github.com/puppetlabs/puppet-strings/pull/231) ([scotje](https://github.com/scotje))
113
111
 
114
112
  ### Fixed
115
113
 
116
114
  - (#242) Wrap names in backticks when rendering to markdown [#243](https://github.com/puppetlabs/puppet-strings/pull/243) ([scotje](https://github.com/scotje))
117
-
118
115
  - Eliminate trailing spaces w/o descriptions [#224](https://github.com/puppetlabs/puppet-strings/pull/224) ([binford2k](https://github.com/binford2k))
119
116
 
120
117
  ## [v2.4.0](https://github.com/puppetlabs/puppet-strings/tree/v2.4.0) - 2020-02-20
@@ -124,9 +121,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
124
121
  ### Added
125
122
 
126
123
  - Add missing HTML output support for enum tag [#218](https://github.com/puppetlabs/puppet-strings/pull/218) ([seanmil](https://github.com/seanmil))
127
-
128
124
  - (PDOC-295) Add @enum tag support for Enum data types [#215](https://github.com/puppetlabs/puppet-strings/pull/215) ([seanmil](https://github.com/seanmil))
129
-
130
125
  - Expanded default search glob for plans. [#214](https://github.com/puppetlabs/puppet-strings/pull/214) ([Raskil](https://github.com/Raskil))
131
126
 
132
127
  ## [v2.3.1](https://github.com/puppetlabs/puppet-strings/tree/v2.3.1) - 2019-09-23
@@ -136,7 +131,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
136
131
  ### Fixed
137
132
 
138
133
  - (maint) Use parameters method instead of json['parameters'] [#211](https://github.com/puppetlabs/puppet-strings/pull/211) ([lucywyman](https://github.com/lucywyman))
139
-
140
134
  - (PDOC-285) Fix data_type_handler for errors and numbers [#209](https://github.com/puppetlabs/puppet-strings/pull/209) ([glennsarti](https://github.com/glennsarti))
141
135
 
142
136
  ## [v2.3.0](https://github.com/puppetlabs/puppet-strings/tree/v2.3.0) - 2019-07-17
@@ -158,11 +152,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
158
152
  ### Added
159
153
 
160
154
  - (PDOC-272) Add required features attribute [#194](https://github.com/puppetlabs/puppet-strings/pull/194) ([kris-bosland](https://github.com/kris-bosland))
161
-
162
155
  - (maint) Implement a strings:generate:reference task [#192](https://github.com/puppetlabs/puppet-strings/pull/192) ([ekohl](https://github.com/ekohl))
163
-
164
156
  - (PDOC-265) Add examples to function reference docs [#188](https://github.com/puppetlabs/puppet-strings/pull/188) ([ekohl](https://github.com/ekohl))
165
-
166
157
  - (PDOC-252) Add describe features to puppet-strings face [#183](https://github.com/puppetlabs/puppet-strings/pull/183) ([kris-bosland](https://github.com/kris-bosland))
167
158
 
168
159
  ### Fixed
@@ -176,7 +167,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
176
167
  ### Added
177
168
 
178
169
  - (PDOC-212, PDOC-213) add support for @note and @todo [#182](https://github.com/puppetlabs/puppet-strings/pull/182) ([eputnam](https://github.com/eputnam))
179
-
180
170
  - (PDOC-255) markdown table of contents update [#181](https://github.com/puppetlabs/puppet-strings/pull/181) ([eputnam](https://github.com/eputnam))
181
171
 
182
172
  ### Fixed
@@ -190,9 +180,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
190
180
  ### Added
191
181
 
192
182
  - (PDOC-238) add generated message to markdown [#175](https://github.com/puppetlabs/puppet-strings/pull/175) ([eputnam](https://github.com/eputnam))
193
-
194
183
  - (PDOC-228) puppet plan support [#168](https://github.com/puppetlabs/puppet-strings/pull/168) ([eputnam](https://github.com/eputnam))
195
-
196
184
  - (PDOC-206) support for tasks [#161](https://github.com/puppetlabs/puppet-strings/pull/161) ([eputnam](https://github.com/eputnam))
197
185
 
198
186
  ### Changed
@@ -201,21 +189,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
201
189
  ### Fixed
202
190
 
203
191
  - (PDOC-36) fix hack for README urls [#176](https://github.com/puppetlabs/puppet-strings/pull/176) ([eputnam](https://github.com/eputnam))
204
-
205
192
  - (PDOC-240) add handling for :array node type in rsapi_handler [#174](https://github.com/puppetlabs/puppet-strings/pull/174) ([eputnam](https://github.com/eputnam))
206
-
207
193
  - (PDOC-159) server urls fix [#173](https://github.com/puppetlabs/puppet-strings/pull/173) ([eputnam](https://github.com/eputnam))
208
-
209
194
  - (maint) display Plans in markdown table of contents [#171](https://github.com/puppetlabs/puppet-strings/pull/171) ([eputnam](https://github.com/eputnam))
210
-
211
195
  - (PDOC-233) markdown whitespace fixes [#170](https://github.com/puppetlabs/puppet-strings/pull/170) ([JohnLyman](https://github.com/JohnLyman))
212
-
213
196
  - (PDOC-229) fix error with return_type and @return [#169](https://github.com/puppetlabs/puppet-strings/pull/169) ([eputnam](https://github.com/eputnam))
214
-
215
197
  - (PDOC-36) hack to fix README links in generated HTML [#167](https://github.com/puppetlabs/puppet-strings/pull/167) ([eputnam](https://github.com/eputnam))
216
-
217
198
  - (PDOC-192) remove warning for title/name [#166](https://github.com/puppetlabs/puppet-strings/pull/166) ([eputnam](https://github.com/eputnam))
218
-
219
199
  - (maint) add condition for misleading warning [#155](https://github.com/puppetlabs/puppet-strings/pull/155) ([eputnam](https://github.com/eputnam))
220
200
 
221
201
  ## [1.2.1](https://github.com/puppetlabs/puppet-strings/tree/1.2.1) - 2018-03-01
@@ -233,13 +213,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
233
213
  ### Added
234
214
 
235
215
  - (PDOC-184) generate markdown [#156](https://github.com/puppetlabs/puppet-strings/pull/156) ([eputnam](https://github.com/eputnam))
236
-
237
216
  - (PDK-437) Add support for Resource API types [#153](https://github.com/puppetlabs/puppet-strings/pull/153) ([DavidS](https://github.com/DavidS))
238
217
 
239
218
  ### Fixed
240
219
 
241
220
  - Fix return type matching for Puppet functions [#159](https://github.com/puppetlabs/puppet-strings/pull/159) ([pegasd](https://github.com/pegasd))
242
-
243
221
  - Add rgen as a runtime dependency [#149](https://github.com/puppetlabs/puppet-strings/pull/149) ([rnelson0](https://github.com/rnelson0))
244
222
 
245
223
  ## [1.1.1](https://github.com/puppetlabs/puppet-strings/tree/1.1.1) - 2017-10-20
@@ -249,7 +227,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
249
227
  ### Fixed
250
228
 
251
229
  - (PDOC-160) Remove the timestamp from output [#137](https://github.com/puppetlabs/puppet-strings/pull/137) ([GeoffWilliams](https://github.com/GeoffWilliams))
252
-
253
230
  - Fix args handling for rake strings::generate [#136](https://github.com/puppetlabs/puppet-strings/pull/136) ([hashar](https://github.com/hashar))
254
231
 
255
232
  ## [1.1.0](https://github.com/puppetlabs/puppet-strings/tree/1.1.0) - 2017-03-20
@@ -259,7 +236,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
259
236
  ### Added
260
237
 
261
238
  - (PDOC-161) Add `summary` tag for short descriptions [#138](https://github.com/puppetlabs/puppet-strings/pull/138) ([whopper](https://github.com/whopper))
262
-
263
239
  - (PDOC-155) Allow type documentation in Puppet 4 code [#132](https://github.com/puppetlabs/puppet-strings/pull/132) ([whopper](https://github.com/whopper))
264
240
 
265
241
  ## [1.0.0](https://github.com/puppetlabs/puppet-strings/tree/1.0.0) - 2016-11-28
@@ -269,25 +245,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
269
245
  ### Added
270
246
 
271
247
  - (PDOC-136) Detect return type syntax in Puppet Language functions [#126](https://github.com/puppetlabs/puppet-strings/pull/126) ([whopper](https://github.com/whopper))
272
-
273
248
  - (PDOC-135) Detect `return_type` calls in 4.x function dispatches [#125](https://github.com/puppetlabs/puppet-strings/pull/125) ([whopper](https://github.com/whopper))
274
-
275
249
  - (PDOC-121) Include tag or SHA in gh_pages task commit [#121](https://github.com/puppetlabs/puppet-strings/pull/121) ([whopper](https://github.com/whopper))
276
-
277
250
  - (PDOC-125) Display all puppet function signatures in top-level signature key [#119](https://github.com/puppetlabs/puppet-strings/pull/119) ([whopper](https://github.com/whopper))
278
251
 
279
252
  ### Fixed
280
253
 
281
254
  - (PDOC-93) Ensure search bar doesn't overlap item list in nav bar [#123](https://github.com/puppetlabs/puppet-strings/pull/123) ([whopper](https://github.com/whopper))
282
-
283
255
  - (PDOC-129) Include tags in overload objects when serialized as JSON [#122](https://github.com/puppetlabs/puppet-strings/pull/122) ([whopper](https://github.com/whopper))
284
-
285
256
  - (PDOC-126) Remove `%Q` ruby quotation syntax from parsed strings [#118](https://github.com/puppetlabs/puppet-strings/pull/118) ([whopper](https://github.com/whopper))
286
-
287
257
  - (PDOC-127) Strip whitespace from type feature docstrings [#112](https://github.com/puppetlabs/puppet-strings/pull/112) ([whopper](https://github.com/whopper))
288
-
289
258
  - (PDOC-95) Properly group and display multiple provider `defaultfor`s [#111](https://github.com/puppetlabs/puppet-strings/pull/111) ([whopper](https://github.com/whopper))
290
-
291
259
  - (PDOC-122) Properly parse `newfunction` calls with newlines [#110](https://github.com/puppetlabs/puppet-strings/pull/110) ([whopper](https://github.com/whopper))
292
260
 
293
261
  ## [0.99.0](https://github.com/puppetlabs/puppet-strings/tree/0.99.0) - 2016-10-10
@@ -297,11 +265,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
297
265
  ### Fixed
298
266
 
299
267
  - (PDOC-80) Remove runtime dependency on puppet [#103](https://github.com/puppetlabs/puppet-strings/pull/103) ([whopper](https://github.com/whopper))
300
-
301
268
  - (PDOC-63) Code refactoring, fix up, and lots of new functionality. [#98](https://github.com/puppetlabs/puppet-strings/pull/98) ([peterhuene](https://github.com/peterhuene))
302
-
303
269
  - (PDOC-71) Workaround for spurious error failures [#90](https://github.com/puppetlabs/puppet-strings/pull/90) ([trevor-vaughan](https://github.com/trevor-vaughan))
304
-
305
270
  - Add Puppet type name in front of the provider name [#80](https://github.com/puppetlabs/puppet-strings/pull/80) ([dmitryilyin](https://github.com/dmitryilyin))
306
271
 
307
272
  ## [0.4.0](https://github.com/puppetlabs/puppet-strings/tree/0.4.0) - 2016-03-30
@@ -311,11 +276,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
311
276
  ### Fixed
312
277
 
313
278
  - (PDOC-75) Work with both versions of 'interpret_any' [#77](https://github.com/puppetlabs/puppet-strings/pull/77) ([HAIL9000](https://github.com/HAIL9000))
314
-
315
279
  - (PDOC-70) Always generate the JSON doc when running the rake task [#72](https://github.com/puppetlabs/puppet-strings/pull/72) ([garethr](https://github.com/garethr))
316
-
317
280
  - Fix issue running strings:generate without a yardopts file [#71](https://github.com/puppetlabs/puppet-strings/pull/71) ([garethr](https://github.com/garethr))
318
-
319
281
  - (PDOC-23) Emit json [#55](https://github.com/puppetlabs/puppet-strings/pull/55) ([iankronquist](https://github.com/iankronquist))
320
282
 
321
283
  ## [0.3.1](https://github.com/puppetlabs/puppet-strings/tree/0.3.1) - 2015-09-22
@@ -325,9 +287,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
325
287
  ### Fixed
326
288
 
327
289
  - make metadata match pmt output [#65](https://github.com/puppetlabs/puppet-strings/pull/65) ([underscorgan](https://github.com/underscorgan))
328
-
329
290
  - Last PR for the Summer [#62](https://github.com/puppetlabs/puppet-strings/pull/62) ([iankronquist](https://github.com/iankronquist))
330
-
331
291
  - Same name type and provider [#61](https://github.com/puppetlabs/puppet-strings/pull/61) ([iankronquist](https://github.com/iankronquist))
332
292
 
333
293
  ## [0.3.0](https://github.com/puppetlabs/puppet-strings/tree/0.3.0) - 2015-09-21
@@ -337,43 +297,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
337
297
  ### Added
338
298
 
339
299
  - Actually/pdoc 19 [#36](https://github.com/puppetlabs/puppet-strings/pull/36) ([iankronquist](https://github.com/iankronquist))
340
-
341
300
  - Type checking/pdoc 21 [#35](https://github.com/puppetlabs/puppet-strings/pull/35) ([iankronquist](https://github.com/iankronquist))
342
-
343
301
  - Dispatch params/pdoc 37 [#33](https://github.com/puppetlabs/puppet-strings/pull/33) ([iankronquist](https://github.com/iankronquist))
344
302
 
345
303
  ### Fixed
346
304
 
347
305
  - Types and providers fixes [#60](https://github.com/puppetlabs/puppet-strings/pull/60) ([iankronquist](https://github.com/iankronquist))
348
-
349
306
  - (PDOC-35) Format generated html properly [#59](https://github.com/puppetlabs/puppet-strings/pull/59) ([iankronquist](https://github.com/iankronquist))
350
-
351
307
  - (PDOC-49) Improve warnings [#57](https://github.com/puppetlabs/puppet-strings/pull/57) ([iankronquist](https://github.com/iankronquist))
352
-
353
308
  - (PDOC-45) Puppet 4x functions handle unusual names [#53](https://github.com/puppetlabs/puppet-strings/pull/53) ([iankronquist](https://github.com/iankronquist))
354
-
355
309
  - (MAINT) Add a space between a parameter name type and its description [#51](https://github.com/puppetlabs/puppet-strings/pull/51) ([roidelapluie](https://github.com/roidelapluie))
356
-
357
310
  - (PDOC-38) Prevent warnings from being issued twice [#50](https://github.com/puppetlabs/puppet-strings/pull/50) ([iankronquist](https://github.com/iankronquist))
358
-
359
311
  - (PDOC-21) Duplicate warnings [#49](https://github.com/puppetlabs/puppet-strings/pull/49) ([iankronquist](https://github.com/iankronquist))
360
-
361
312
  - (PDOC-21) Only create HostClass parameters once [#48](https://github.com/puppetlabs/puppet-strings/pull/48) ([iankronquist](https://github.com/iankronquist))
362
-
363
313
  - (PDOC-35) Support types and providers [#46](https://github.com/puppetlabs/puppet-strings/pull/46) ([iankronquist](https://github.com/iankronquist))
364
-
365
314
  - (maint) Don't print extraneous "true". [#45](https://github.com/puppetlabs/puppet-strings/pull/45) ([iankronquist](https://github.com/iankronquist))
366
-
367
315
  - (PDOC-21) Check mismatched types in defined types [#44](https://github.com/puppetlabs/puppet-strings/pull/44) ([iankronquist](https://github.com/iankronquist))
368
-
369
316
  - Forgot defined types [#42](https://github.com/puppetlabs/puppet-strings/pull/42) ([iankronquist](https://github.com/iankronquist))
370
-
371
317
  - Nested classes/pdoc 35 [#41](https://github.com/puppetlabs/puppet-strings/pull/41) ([iankronquist](https://github.com/iankronquist))
372
-
373
318
  - (maint) Remove unused code path [#38](https://github.com/puppetlabs/puppet-strings/pull/38) ([iankronquist](https://github.com/iankronquist))
374
-
375
319
  - (PDOC-30) Fix Markdown parsing lists parsing [#37](https://github.com/puppetlabs/puppet-strings/pull/37) ([iankronquist](https://github.com/iankronquist))
376
-
377
320
  - (PDOC-37) Warn when documented name does not match declared name [#31](https://github.com/puppetlabs/puppet-strings/pull/31) ([iankronquist](https://github.com/iankronquist))
378
321
 
379
322
  ## [0.2.0](https://github.com/puppetlabs/puppet-strings/tree/0.2.0) - 2015-03-17
@@ -383,17 +326,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
383
326
  ### Added
384
327
 
385
328
  - (PDOC-27) Don't require options for 3x functions [#26](https://github.com/puppetlabs/puppet-strings/pull/26) ([HAIL9000](https://github.com/HAIL9000))
386
-
387
329
  - (PDOC-24) Add basic templates for functions [#22](https://github.com/puppetlabs/puppet-strings/pull/22) ([HAIL9000](https://github.com/HAIL9000))
388
-
389
330
  - (PDOC-17) Add support for YARD tags in puppet code [#21](https://github.com/puppetlabs/puppet-strings/pull/21) ([HAIL9000](https://github.com/HAIL9000))
390
331
 
391
332
  ### Fixed
392
333
 
393
334
  - Make the metadata match what's generated by the PMT [#28](https://github.com/puppetlabs/puppet-strings/pull/28) ([underscorgan](https://github.com/underscorgan))
394
-
395
335
  - (PDOC-25) Fix mangled puppet namespaces [#27](https://github.com/puppetlabs/puppet-strings/pull/27) ([HAIL9000](https://github.com/HAIL9000))
396
-
397
336
  - (PDOC-26) Rename Puppetx to PuppetX [#25](https://github.com/puppetlabs/puppet-strings/pull/25) ([HAIL9000](https://github.com/HAIL9000))
398
337
 
399
338
  ## [0.1.1](https://github.com/puppetlabs/puppet-strings/tree/0.1.1) - 2014-10-21
@@ -407,17 +346,3 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
407
346
  ## [0.1.0](https://github.com/puppetlabs/puppet-strings/tree/0.1.0) - 2014-10-07
408
347
 
409
348
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/a9408c792ba48ffc5e59d8641a538a83197b7064...0.1.0)
410
-
411
- ### Added
412
-
413
- - (PDOC-6) Allow for different puppet gem versions [#9](https://github.com/puppetlabs/puppet-strings/pull/9) ([HAIL9000](https://github.com/HAIL9000))
414
-
415
- - Add -q option to suppress warnings for server [#6](https://github.com/puppetlabs/puppet-strings/pull/6) ([petems](https://github.com/petems))
416
-
417
- - (PDOC-3) Rename face to strings instead of yardoc [#4](https://github.com/puppetlabs/puppet-strings/pull/4) ([HAIL9000](https://github.com/HAIL9000))
418
-
419
- ### Fixed
420
-
421
- - Make metadata match file generated by pmt [#14](https://github.com/puppetlabs/puppet-strings/pull/14) ([underscorgan](https://github.com/underscorgan))
422
-
423
- - (PDOC-3) Refactor prototype code to make it more readable [#7](https://github.com/puppetlabs/puppet-strings/pull/7) ([HAIL9000](https://github.com/HAIL9000))
data/LICENSE CHANGED
@@ -1,13 +1,177 @@
1
- Copyright (C) 2014 Puppet Labs Inc
2
1
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
6
5
 
7
- http://www.apache.org/licenses/LICENSE-2.0
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
7
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
data/README.md CHANGED
@@ -10,7 +10,7 @@ Strings processes code and YARD-style code comments to create documentation in H
10
10
  ### Requirements
11
11
 
12
12
  * Ruby 2.7.0 or newer
13
- * Puppet 6.0.0 or newer
13
+ * Puppet 7.0.0 or newer
14
14
 
15
15
  ### Install Puppet Strings
16
16
 
@@ -28,7 +28,7 @@ Puppet::Face.define(:strings, '0.0.1') do
28
28
 
29
29
  PuppetStrings.generate(
30
30
  args.count > 1 ? args[0..-2] : PuppetStrings::DEFAULT_SEARCH_PATTERNS,
31
- build_generate_options(args.last),
31
+ build_generate_options(args.last)
32
32
  )
33
33
  nil
34
34
  end
@@ -127,7 +127,7 @@ Puppet::Face.define(:strings, '0.0.1') do
127
127
  search_patterns = ['types/**/*.pp', 'lib/**/*.rb']
128
128
  PuppetStrings.generate(
129
129
  search_patterns,
130
- build_generate_options(options),
130
+ build_generate_options(options)
131
131
  )
132
132
  nil
133
133
  end
@@ -138,7 +138,7 @@ Puppet::Face.define(:strings, '0.0.1') do
138
138
  def check_required_features
139
139
  raise "The 'yard' gem must be installed in order to use this face." unless Puppet.features.yard?
140
140
  raise "The 'rgen' gem must be installed in order to use this face." unless Puppet.features.rgen?
141
- raise 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION.match?(%r{^1\.8})
141
+ raise 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION.match?(/^1\.8/)
142
142
  end
143
143
 
144
144
  # Builds the options to PuppetStrings.generate.
@@ -13,7 +13,7 @@ module PuppetStrings::Describe
13
13
  def self.render(describe_types = [], list = false, _providers = false)
14
14
  document = {
15
15
  defined_types: YARD::Registry.all(:puppet_defined_type).sort_by!(&:name).map!(&:to_hash),
16
- resource_types: YARD::Registry.all(:puppet_type).sort_by!(&:name).map!(&:to_hash),
16
+ resource_types: YARD::Registry.all(:puppet_type).sort_by!(&:name).map!(&:to_hash)
17
17
  }
18
18
 
19
19
  if list
@@ -32,7 +32,7 @@ module PuppetStrings::Describe
32
32
  end
33
33
 
34
34
  def self.show_one_type(resource_type)
35
- puts "\n%{name}\n%{underscore}" % { name: resource_type[:name], underscore: '=' * resource_type[:name].length }
35
+ puts format("\n%<name>s\n%<underscore>s", name: resource_type[:name], underscore: '=' * resource_type[:name].length)
36
36
  puts resource_type[:docstring][:text]
37
37
 
38
38
  combined_list = (resource_type[:parameters].nil? ? [] : resource_type[:parameters]) +
@@ -47,10 +47,10 @@ module PuppetStrings::Describe
47
47
  end
48
48
 
49
49
  def self.show_one_parameter(parameter)
50
- puts "\n- **%{name}**\n" % { name: parameter[:name] }
50
+ puts format("\n- **%<name>s**\n", name: parameter[:name])
51
51
  puts parameter[:description]
52
- puts 'Valid values are `%{values}`.' % { values: parameter[:values].join('`, `') } unless parameter[:values].nil?
53
- puts 'Requires features %{required_features}.' % { required_features: parameter[:required_features] } unless parameter[:required_features].nil?
52
+ puts format('Valid values are `%<values>s`.', values: parameter[:values].join('`, `')) unless parameter[:values].nil?
53
+ puts format('Requires features %<required_features>s.', required_features: parameter[:required_features]) unless parameter[:required_features].nil?
54
54
  end
55
55
 
56
56
  def self.list_one_type(type)
@@ -58,12 +58,8 @@ module PuppetStrings::Describe
58
58
  shortento = targetlength - 4
59
59
  contentstring = type[:docstring][:text]
60
60
  end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
61
- unless end_of_line.nil?
62
- contentstring = contentstring[0..end_of_line]
63
- end
64
- if contentstring.length > targetlength
65
- contentstring = contentstring[0..shortento] + ' ...'
66
- end
61
+ contentstring = contentstring[0..end_of_line] unless end_of_line.nil?
62
+ contentstring = "#{contentstring[0..shortento]} ..." if contentstring.length > targetlength
67
63
 
68
64
  puts "#{type[:name].to_s.ljust(15)} - #{contentstring}"
69
65
  end