puppet-strings 3.0.1 → 4.0.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/CHANGELOG.md +17 -88
- data/LICENSE +174 -10
- data/README.md +1 -1
- data/lib/puppet/face/strings.rb +3 -3
- data/lib/puppet-strings/describe.rb +7 -11
- data/lib/puppet-strings/markdown/base.rb +6 -4
- data/lib/puppet-strings/markdown/data_type.rb +3 -4
- data/lib/puppet-strings/markdown/function.rb +5 -5
- data/lib/puppet-strings/markdown/resource_type.rb +1 -1
- data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +4 -0
- data/lib/puppet-strings/markdown/templates/data_type.erb +4 -0
- data/lib/puppet-strings/markdown/templates/function.erb +4 -0
- data/lib/puppet-strings/markdown/templates/resource_type.erb +4 -0
- data/lib/puppet-strings/markdown.rb +9 -11
- data/lib/puppet-strings/tasks/generate.rb +5 -3
- data/lib/puppet-strings/tasks/gh_pages.rb +6 -6
- data/lib/puppet-strings/tasks/validate.rb +3 -3
- data/lib/puppet-strings/tasks.rb +3 -3
- data/lib/puppet-strings/version.rb +1 -1
- data/lib/puppet-strings/yard/code_objects/base.rb +2 -2
- data/lib/puppet-strings/yard/code_objects/class.rb +1 -2
- data/lib/puppet-strings/yard/code_objects/data_type.rb +2 -2
- data/lib/puppet-strings/yard/code_objects/defined_type.rb +1 -2
- data/lib/puppet-strings/yard/code_objects/function.rb +6 -6
- data/lib/puppet-strings/yard/code_objects/plan.rb +1 -2
- data/lib/puppet-strings/yard/code_objects/type.rb +6 -6
- data/lib/puppet-strings/yard/handlers/helpers.rb +1 -0
- data/lib/puppet-strings/yard/handlers/json/task_handler.rb +1 -0
- data/lib/puppet-strings/yard/handlers/puppet/base.rb +3 -3
- data/lib/puppet-strings/yard/handlers/ruby/base.rb +2 -2
- data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +5 -9
- data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +33 -32
- data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +1 -1
- data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +4 -4
- data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +3 -0
- data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +6 -5
- data/lib/puppet-strings/yard/parsers/json/parser.rb +1 -1
- data/lib/puppet-strings/yard/parsers/puppet/parser.rb +0 -6
- data/lib/puppet-strings/yard/parsers/puppet/statement.rb +12 -20
- data/lib/puppet-strings/yard/tags/overload_tag.rb +4 -4
- data/lib/puppet-strings/yard/tags/parameter_directive.rb +1 -1
- data/lib/puppet-strings/yard/tags/property_directive.rb +1 -1
- data/lib/puppet-strings/yard/templates/default/fulldoc/html/setup.rb +11 -9
- data/lib/puppet-strings/yard/templates/default/layout/html/setup.rb +16 -14
- data/lib/puppet-strings/yard/templates/default/puppet_class/html/deprecated.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_class/html/setup.rb +5 -3
- data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/deprecated.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +4 -2
- data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/deprecated.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/setup.rb +5 -3
- data/lib/puppet-strings/yard/templates/default/puppet_defined_type/html/deprecated.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_defined_type/html/setup.rb +3 -1
- data/lib/puppet-strings/yard/templates/default/puppet_function/html/deprecated.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb +3 -1
- data/lib/puppet-strings/yard/templates/default/puppet_plan/html/deprecated.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_plan/html/setup.rb +3 -1
- data/lib/puppet-strings/yard/templates/default/puppet_provider/html/setup.rb +2 -0
- data/lib/puppet-strings/yard/templates/default/puppet_task/html/setup.rb +2 -0
- data/lib/puppet-strings/yard/templates/default/puppet_type/html/deprecated.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +5 -3
- data/lib/puppet-strings/yard/templates/default/tags/setup.rb +3 -1
- data/lib/puppet-strings/yard/util.rb +3 -5
- data/lib/puppet-strings/yard.rb +1 -1
- data/lib/puppet-strings.rb +3 -8
- metadata +16 -11
- data/COMMITTERS.md +0 -185
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d62acfc0a3e4fa9561fc3d3291a70335101c9705697b7736c17eb270547a0c2e
|
4
|
+
data.tar.gz: 81606aea417506c5e2d3041d042df2b8a5299b08d6cf517993fe92019bd3b9ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 261ed46f4fd0da48e210942d6d61b3bbac7dc6e1bb3fabe101a30651b3cb0377e0864ed9f4ff7ebbea477a288ef6e09f477bca366cfd71564b74eda6a60c7d86
|
7
|
+
data.tar.gz: 2aa3781199b8cb71bf9356c92a83df920d433fe07917c80ad500db8c16a54bcbf21ada74fcd41d4a063c6bad6ab9a874e830b4bde82ccfb4170749b31b6f6ba8
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,25 @@
|
|
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](https://github.com/puppetlabs/puppet-strings/tree/v4.0.0) - 2023-04-25
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.0.0.rc.1...v4.0.0)
|
11
|
+
|
12
|
+
## [v4.0.0.rc.1](https://github.com/puppetlabs/puppet-strings/tree/v4.0.0.rc.1) - 2023-04-17
|
13
|
+
|
14
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.1...v4.0.0.rc.1)
|
15
|
+
|
16
|
+
### Added
|
17
|
+
|
18
|
+
- Add deprecated tag [#342](https://github.com/puppetlabs/puppet-strings/pull/342) ([b4ldr](https://github.com/b4ldr))
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
- (CONT-812) Puppet 8 / Ruby 3 support [#348](https://github.com/puppetlabs/puppet-strings/pull/348) ([chelnak](https://github.com/chelnak))
|
22
|
+
|
6
23
|
## [v3.0.1](https://github.com/puppetlabs/puppet-strings/tree/v3.0.1) - 2022-10-25
|
7
24
|
|
8
25
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.0...v3.0.1)
|
@@ -18,28 +35,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
18
35
|
### Added
|
19
36
|
|
20
37
|
- (#223) Use code blocks as appropriate in Markdown [#319](https://github.com/puppetlabs/puppet-strings/pull/319) ([danielparks](https://github.com/danielparks))
|
21
|
-
|
22
38
|
- Use tilde heredocs for readability [#317](https://github.com/puppetlabs/puppet-strings/pull/317) ([danielparks](https://github.com/danielparks))
|
23
39
|
|
24
40
|
### Changed
|
25
41
|
- (CONT-228) Remove deprecated emit flags [#329](https://github.com/puppetlabs/puppet-strings/pull/329) ([chelnak](https://github.com/chelnak))
|
26
|
-
|
27
42
|
- (CONT-228) Bump ruby version [#326](https://github.com/puppetlabs/puppet-strings/pull/326) ([chelnak](https://github.com/chelnak))
|
28
|
-
|
29
43
|
- (#301) Update minimum Ruby version to 2.5.0 [#313](https://github.com/puppetlabs/puppet-strings/pull/313) ([danielparks](https://github.com/danielparks))
|
30
44
|
|
31
45
|
### Fixed
|
32
46
|
|
33
47
|
- (#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
48
|
- (#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
49
|
- (#307) Always enable plan parsing [#312](https://github.com/puppetlabs/puppet-strings/pull/312) ([danielparks](https://github.com/danielparks))
|
38
|
-
|
39
50
|
- (#302) Fix warnings generated by ERB.new [#308](https://github.com/puppetlabs/puppet-strings/pull/308) ([danielparks](https://github.com/danielparks))
|
40
|
-
|
41
51
|
- (#304) Fix double backticks in Markdown [#305](https://github.com/puppetlabs/puppet-strings/pull/305) ([danielparks](https://github.com/danielparks))
|
42
|
-
|
43
52
|
- (#300) Fix anchor links in Markdown docs [#303](https://github.com/puppetlabs/puppet-strings/pull/303) ([danielparks](https://github.com/danielparks))
|
44
53
|
|
45
54
|
## [v2.9.0](https://github.com/puppetlabs/puppet-strings/tree/v2.9.0) - 2021-11-29
|
@@ -65,7 +74,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
65
74
|
### Fixed
|
66
75
|
|
67
76
|
- (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
77
|
- README.md: update link to docs [#276](https://github.com/puppetlabs/puppet-strings/pull/276) ([kenyon](https://github.com/kenyon))
|
70
78
|
|
71
79
|
## [v2.7.0](https://github.com/puppetlabs/puppet-strings/tree/v2.7.0) - 2021-05-17
|
@@ -90,13 +98,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
90
98
|
### Fixed
|
91
99
|
|
92
100
|
- 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
101
|
- Handle a missing description gracefully [#260](https://github.com/puppetlabs/puppet-strings/pull/260) ([scotje](https://github.com/scotje))
|
95
|
-
|
96
102
|
- Fix ERB failure - parameters without descriptions [#255](https://github.com/puppetlabs/puppet-strings/pull/255) ([trevor-vaughan](https://github.com/trevor-vaughan))
|
97
|
-
|
98
103
|
- puppet_function template: fix tags, source [#249](https://github.com/puppetlabs/puppet-strings/pull/249) ([raemer](https://github.com/raemer))
|
99
|
-
|
100
104
|
- Handle a missing description gracefully [#246](https://github.com/puppetlabs/puppet-strings/pull/246) ([ekohl](https://github.com/ekohl))
|
101
105
|
|
102
106
|
## [v2.5.0](https://github.com/puppetlabs/puppet-strings/tree/v2.5.0) - 2020-07-15
|
@@ -106,15 +110,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
106
110
|
### Added
|
107
111
|
|
108
112
|
- (GH-225) Document functions in Puppet Datatypes [#235](https://github.com/puppetlabs/puppet-strings/pull/235) ([glennsarti](https://github.com/glennsarti))
|
109
|
-
|
110
113
|
- 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
114
|
- (#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
115
|
|
114
116
|
### Fixed
|
115
117
|
|
116
118
|
- (#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
119
|
- Eliminate trailing spaces w/o descriptions [#224](https://github.com/puppetlabs/puppet-strings/pull/224) ([binford2k](https://github.com/binford2k))
|
119
120
|
|
120
121
|
## [v2.4.0](https://github.com/puppetlabs/puppet-strings/tree/v2.4.0) - 2020-02-20
|
@@ -124,9 +125,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
124
125
|
### Added
|
125
126
|
|
126
127
|
- Add missing HTML output support for enum tag [#218](https://github.com/puppetlabs/puppet-strings/pull/218) ([seanmil](https://github.com/seanmil))
|
127
|
-
|
128
128
|
- (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
129
|
- Expanded default search glob for plans. [#214](https://github.com/puppetlabs/puppet-strings/pull/214) ([Raskil](https://github.com/Raskil))
|
131
130
|
|
132
131
|
## [v2.3.1](https://github.com/puppetlabs/puppet-strings/tree/v2.3.1) - 2019-09-23
|
@@ -136,7 +135,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
136
135
|
### Fixed
|
137
136
|
|
138
137
|
- (maint) Use parameters method instead of json['parameters'] [#211](https://github.com/puppetlabs/puppet-strings/pull/211) ([lucywyman](https://github.com/lucywyman))
|
139
|
-
|
140
138
|
- (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
139
|
|
142
140
|
## [v2.3.0](https://github.com/puppetlabs/puppet-strings/tree/v2.3.0) - 2019-07-17
|
@@ -158,11 +156,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
158
156
|
### Added
|
159
157
|
|
160
158
|
- (PDOC-272) Add required features attribute [#194](https://github.com/puppetlabs/puppet-strings/pull/194) ([kris-bosland](https://github.com/kris-bosland))
|
161
|
-
|
162
159
|
- (maint) Implement a strings:generate:reference task [#192](https://github.com/puppetlabs/puppet-strings/pull/192) ([ekohl](https://github.com/ekohl))
|
163
|
-
|
164
160
|
- (PDOC-265) Add examples to function reference docs [#188](https://github.com/puppetlabs/puppet-strings/pull/188) ([ekohl](https://github.com/ekohl))
|
165
|
-
|
166
161
|
- (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
162
|
|
168
163
|
### Fixed
|
@@ -176,7 +171,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
176
171
|
### Added
|
177
172
|
|
178
173
|
- (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
174
|
- (PDOC-255) markdown table of contents update [#181](https://github.com/puppetlabs/puppet-strings/pull/181) ([eputnam](https://github.com/eputnam))
|
181
175
|
|
182
176
|
### Fixed
|
@@ -190,9 +184,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
190
184
|
### Added
|
191
185
|
|
192
186
|
- (PDOC-238) add generated message to markdown [#175](https://github.com/puppetlabs/puppet-strings/pull/175) ([eputnam](https://github.com/eputnam))
|
193
|
-
|
194
187
|
- (PDOC-228) puppet plan support [#168](https://github.com/puppetlabs/puppet-strings/pull/168) ([eputnam](https://github.com/eputnam))
|
195
|
-
|
196
188
|
- (PDOC-206) support for tasks [#161](https://github.com/puppetlabs/puppet-strings/pull/161) ([eputnam](https://github.com/eputnam))
|
197
189
|
|
198
190
|
### Changed
|
@@ -201,21 +193,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
201
193
|
### Fixed
|
202
194
|
|
203
195
|
- (PDOC-36) fix hack for README urls [#176](https://github.com/puppetlabs/puppet-strings/pull/176) ([eputnam](https://github.com/eputnam))
|
204
|
-
|
205
196
|
- (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
197
|
- (PDOC-159) server urls fix [#173](https://github.com/puppetlabs/puppet-strings/pull/173) ([eputnam](https://github.com/eputnam))
|
208
|
-
|
209
198
|
- (maint) display Plans in markdown table of contents [#171](https://github.com/puppetlabs/puppet-strings/pull/171) ([eputnam](https://github.com/eputnam))
|
210
|
-
|
211
199
|
- (PDOC-233) markdown whitespace fixes [#170](https://github.com/puppetlabs/puppet-strings/pull/170) ([JohnLyman](https://github.com/JohnLyman))
|
212
|
-
|
213
200
|
- (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
201
|
- (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
202
|
- (PDOC-192) remove warning for title/name [#166](https://github.com/puppetlabs/puppet-strings/pull/166) ([eputnam](https://github.com/eputnam))
|
218
|
-
|
219
203
|
- (maint) add condition for misleading warning [#155](https://github.com/puppetlabs/puppet-strings/pull/155) ([eputnam](https://github.com/eputnam))
|
220
204
|
|
221
205
|
## [1.2.1](https://github.com/puppetlabs/puppet-strings/tree/1.2.1) - 2018-03-01
|
@@ -233,13 +217,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
233
217
|
### Added
|
234
218
|
|
235
219
|
- (PDOC-184) generate markdown [#156](https://github.com/puppetlabs/puppet-strings/pull/156) ([eputnam](https://github.com/eputnam))
|
236
|
-
|
237
220
|
- (PDK-437) Add support for Resource API types [#153](https://github.com/puppetlabs/puppet-strings/pull/153) ([DavidS](https://github.com/DavidS))
|
238
221
|
|
239
222
|
### Fixed
|
240
223
|
|
241
224
|
- Fix return type matching for Puppet functions [#159](https://github.com/puppetlabs/puppet-strings/pull/159) ([pegasd](https://github.com/pegasd))
|
242
|
-
|
243
225
|
- Add rgen as a runtime dependency [#149](https://github.com/puppetlabs/puppet-strings/pull/149) ([rnelson0](https://github.com/rnelson0))
|
244
226
|
|
245
227
|
## [1.1.1](https://github.com/puppetlabs/puppet-strings/tree/1.1.1) - 2017-10-20
|
@@ -249,7 +231,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
249
231
|
### Fixed
|
250
232
|
|
251
233
|
- (PDOC-160) Remove the timestamp from output [#137](https://github.com/puppetlabs/puppet-strings/pull/137) ([GeoffWilliams](https://github.com/GeoffWilliams))
|
252
|
-
|
253
234
|
- Fix args handling for rake strings::generate [#136](https://github.com/puppetlabs/puppet-strings/pull/136) ([hashar](https://github.com/hashar))
|
254
235
|
|
255
236
|
## [1.1.0](https://github.com/puppetlabs/puppet-strings/tree/1.1.0) - 2017-03-20
|
@@ -259,7 +240,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
259
240
|
### Added
|
260
241
|
|
261
242
|
- (PDOC-161) Add `summary` tag for short descriptions [#138](https://github.com/puppetlabs/puppet-strings/pull/138) ([whopper](https://github.com/whopper))
|
262
|
-
|
263
243
|
- (PDOC-155) Allow type documentation in Puppet 4 code [#132](https://github.com/puppetlabs/puppet-strings/pull/132) ([whopper](https://github.com/whopper))
|
264
244
|
|
265
245
|
## [1.0.0](https://github.com/puppetlabs/puppet-strings/tree/1.0.0) - 2016-11-28
|
@@ -269,25 +249,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
269
249
|
### Added
|
270
250
|
|
271
251
|
- (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
252
|
- (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
253
|
- (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
254
|
- (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
255
|
|
279
256
|
### Fixed
|
280
257
|
|
281
258
|
- (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
259
|
- (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
260
|
- (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
261
|
- (PDOC-127) Strip whitespace from type feature docstrings [#112](https://github.com/puppetlabs/puppet-strings/pull/112) ([whopper](https://github.com/whopper))
|
288
|
-
|
289
262
|
- (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
263
|
- (PDOC-122) Properly parse `newfunction` calls with newlines [#110](https://github.com/puppetlabs/puppet-strings/pull/110) ([whopper](https://github.com/whopper))
|
292
264
|
|
293
265
|
## [0.99.0](https://github.com/puppetlabs/puppet-strings/tree/0.99.0) - 2016-10-10
|
@@ -297,11 +269,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
297
269
|
### Fixed
|
298
270
|
|
299
271
|
- (PDOC-80) Remove runtime dependency on puppet [#103](https://github.com/puppetlabs/puppet-strings/pull/103) ([whopper](https://github.com/whopper))
|
300
|
-
|
301
272
|
- (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
273
|
- (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
274
|
- 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
275
|
|
307
276
|
## [0.4.0](https://github.com/puppetlabs/puppet-strings/tree/0.4.0) - 2016-03-30
|
@@ -311,11 +280,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
311
280
|
### Fixed
|
312
281
|
|
313
282
|
- (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
283
|
- (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
284
|
- 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
285
|
- (PDOC-23) Emit json [#55](https://github.com/puppetlabs/puppet-strings/pull/55) ([iankronquist](https://github.com/iankronquist))
|
320
286
|
|
321
287
|
## [0.3.1](https://github.com/puppetlabs/puppet-strings/tree/0.3.1) - 2015-09-22
|
@@ -325,9 +291,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
325
291
|
### Fixed
|
326
292
|
|
327
293
|
- make metadata match pmt output [#65](https://github.com/puppetlabs/puppet-strings/pull/65) ([underscorgan](https://github.com/underscorgan))
|
328
|
-
|
329
294
|
- Last PR for the Summer [#62](https://github.com/puppetlabs/puppet-strings/pull/62) ([iankronquist](https://github.com/iankronquist))
|
330
|
-
|
331
295
|
- Same name type and provider [#61](https://github.com/puppetlabs/puppet-strings/pull/61) ([iankronquist](https://github.com/iankronquist))
|
332
296
|
|
333
297
|
## [0.3.0](https://github.com/puppetlabs/puppet-strings/tree/0.3.0) - 2015-09-21
|
@@ -337,43 +301,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
337
301
|
### Added
|
338
302
|
|
339
303
|
- Actually/pdoc 19 [#36](https://github.com/puppetlabs/puppet-strings/pull/36) ([iankronquist](https://github.com/iankronquist))
|
340
|
-
|
341
304
|
- Type checking/pdoc 21 [#35](https://github.com/puppetlabs/puppet-strings/pull/35) ([iankronquist](https://github.com/iankronquist))
|
342
|
-
|
343
305
|
- Dispatch params/pdoc 37 [#33](https://github.com/puppetlabs/puppet-strings/pull/33) ([iankronquist](https://github.com/iankronquist))
|
344
306
|
|
345
307
|
### Fixed
|
346
308
|
|
347
309
|
- Types and providers fixes [#60](https://github.com/puppetlabs/puppet-strings/pull/60) ([iankronquist](https://github.com/iankronquist))
|
348
|
-
|
349
310
|
- (PDOC-35) Format generated html properly [#59](https://github.com/puppetlabs/puppet-strings/pull/59) ([iankronquist](https://github.com/iankronquist))
|
350
|
-
|
351
311
|
- (PDOC-49) Improve warnings [#57](https://github.com/puppetlabs/puppet-strings/pull/57) ([iankronquist](https://github.com/iankronquist))
|
352
|
-
|
353
312
|
- (PDOC-45) Puppet 4x functions handle unusual names [#53](https://github.com/puppetlabs/puppet-strings/pull/53) ([iankronquist](https://github.com/iankronquist))
|
354
|
-
|
355
313
|
- (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
314
|
- (PDOC-38) Prevent warnings from being issued twice [#50](https://github.com/puppetlabs/puppet-strings/pull/50) ([iankronquist](https://github.com/iankronquist))
|
358
|
-
|
359
315
|
- (PDOC-21) Duplicate warnings [#49](https://github.com/puppetlabs/puppet-strings/pull/49) ([iankronquist](https://github.com/iankronquist))
|
360
|
-
|
361
316
|
- (PDOC-21) Only create HostClass parameters once [#48](https://github.com/puppetlabs/puppet-strings/pull/48) ([iankronquist](https://github.com/iankronquist))
|
362
|
-
|
363
317
|
- (PDOC-35) Support types and providers [#46](https://github.com/puppetlabs/puppet-strings/pull/46) ([iankronquist](https://github.com/iankronquist))
|
364
|
-
|
365
318
|
- (maint) Don't print extraneous "true". [#45](https://github.com/puppetlabs/puppet-strings/pull/45) ([iankronquist](https://github.com/iankronquist))
|
366
|
-
|
367
319
|
- (PDOC-21) Check mismatched types in defined types [#44](https://github.com/puppetlabs/puppet-strings/pull/44) ([iankronquist](https://github.com/iankronquist))
|
368
|
-
|
369
320
|
- Forgot defined types [#42](https://github.com/puppetlabs/puppet-strings/pull/42) ([iankronquist](https://github.com/iankronquist))
|
370
|
-
|
371
321
|
- Nested classes/pdoc 35 [#41](https://github.com/puppetlabs/puppet-strings/pull/41) ([iankronquist](https://github.com/iankronquist))
|
372
|
-
|
373
322
|
- (maint) Remove unused code path [#38](https://github.com/puppetlabs/puppet-strings/pull/38) ([iankronquist](https://github.com/iankronquist))
|
374
|
-
|
375
323
|
- (PDOC-30) Fix Markdown parsing lists parsing [#37](https://github.com/puppetlabs/puppet-strings/pull/37) ([iankronquist](https://github.com/iankronquist))
|
376
|
-
|
377
324
|
- (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
325
|
|
379
326
|
## [0.2.0](https://github.com/puppetlabs/puppet-strings/tree/0.2.0) - 2015-03-17
|
@@ -383,17 +330,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
383
330
|
### Added
|
384
331
|
|
385
332
|
- (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
333
|
- (PDOC-24) Add basic templates for functions [#22](https://github.com/puppetlabs/puppet-strings/pull/22) ([HAIL9000](https://github.com/HAIL9000))
|
388
|
-
|
389
334
|
- (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
335
|
|
391
336
|
### Fixed
|
392
337
|
|
393
338
|
- 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
339
|
- (PDOC-25) Fix mangled puppet namespaces [#27](https://github.com/puppetlabs/puppet-strings/pull/27) ([HAIL9000](https://github.com/HAIL9000))
|
396
|
-
|
397
340
|
- (PDOC-26) Rename Puppetx to PuppetX [#25](https://github.com/puppetlabs/puppet-strings/pull/25) ([HAIL9000](https://github.com/HAIL9000))
|
398
341
|
|
399
342
|
## [0.1.1](https://github.com/puppetlabs/puppet-strings/tree/0.1.1) - 2014-10-21
|
@@ -407,17 +350,3 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
407
350
|
## [0.1.0](https://github.com/puppetlabs/puppet-strings/tree/0.1.0) - 2014-10-07
|
408
351
|
|
409
352
|
[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
|
-
|
4
|
-
|
5
|
-
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
6
5
|
|
7
|
-
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
data/lib/puppet/face/strings.rb
CHANGED
@@ -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?(
|
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
|
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-
|
50
|
+
puts format("\n- **%<name>s**\n", name: parameter[:name])
|
51
51
|
puts parameter[:description]
|
52
|
-
puts 'Valid values are
|
53
|
-
puts 'Requires features
|
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
|
-
|
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
|