puppet-strings 3.0.0 → 4.0.0.rc.1
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 +21 -92
- 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 +6 -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 +18 -13
- 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: d71c38863e3ae96a9d624ae16c7863a5bce3a79478b001fb3d07fde4794bdfcb
|
4
|
+
data.tar.gz: 309e63741780ae8faa25eaff4f89d19e0bbe0004af18ea6c62540357fca643eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50c765b822be1aa00c9ea147eefcfe2e42023f1b94b0975e45a526dd22fea403850a6aef00065cf48f574792d2af0f8597034a865a016013e28fa2ba68f2f3ba
|
7
|
+
data.tar.gz: 24b43ef7887be10c01be9e987b08195a0f3282b4631d16b66f750f8582ab9fbe57214a3fd40ac5586e62212d68ca6fea7400607e3d6c9169ac390dc4dbb8cf96
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,29 @@
|
|
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
|
+
|
19
|
+
## [v3.0.1](https://github.com/puppetlabs/puppet-strings/tree/v3.0.1) - 2022-10-25
|
20
|
+
|
21
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.0...v3.0.1)
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
- (GH-332) Ensure PuppetStrings is loaded for tasks [#333](https://github.com/puppetlabs/puppet-strings/pull/333) ([chelnak](https://github.com/chelnak))
|
26
|
+
|
6
27
|
## [v3.0.0](https://github.com/puppetlabs/puppet-strings/tree/v3.0.0) - 2022-10-21
|
7
28
|
|
8
29
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.9.0...v3.0.0)
|
@@ -10,34 +31,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
10
31
|
### Added
|
11
32
|
|
12
33
|
- (#223) Use code blocks as appropriate in Markdown [#319](https://github.com/puppetlabs/puppet-strings/pull/319) ([danielparks](https://github.com/danielparks))
|
13
|
-
|
14
34
|
- Use tilde heredocs for readability [#317](https://github.com/puppetlabs/puppet-strings/pull/317) ([danielparks](https://github.com/danielparks))
|
15
35
|
|
16
36
|
### Changed
|
17
37
|
- (CONT-228) Remove deprecated emit flags [#329](https://github.com/puppetlabs/puppet-strings/pull/329) ([chelnak](https://github.com/chelnak))
|
18
|
-
|
19
38
|
- (CONT-228) Bump ruby version [#326](https://github.com/puppetlabs/puppet-strings/pull/326) ([chelnak](https://github.com/chelnak))
|
20
|
-
|
21
39
|
- (#301) Update minimum Ruby version to 2.5.0 [#313](https://github.com/puppetlabs/puppet-strings/pull/313) ([danielparks](https://github.com/danielparks))
|
22
40
|
|
23
41
|
### Fixed
|
24
42
|
|
25
43
|
- (#240) Fix output of default values that are expressions [#315](https://github.com/puppetlabs/puppet-strings/pull/315) ([danielparks](https://github.com/danielparks))
|
26
|
-
|
27
44
|
- (#267) Don’t show “Public X” header without contents [#314](https://github.com/puppetlabs/puppet-strings/pull/314) ([danielparks](https://github.com/danielparks))
|
28
|
-
|
29
45
|
- (#307) Always enable plan parsing [#312](https://github.com/puppetlabs/puppet-strings/pull/312) ([danielparks](https://github.com/danielparks))
|
30
|
-
|
31
46
|
- (#302) Fix warnings generated by ERB.new [#308](https://github.com/puppetlabs/puppet-strings/pull/308) ([danielparks](https://github.com/danielparks))
|
32
|
-
|
33
47
|
- (#304) Fix double backticks in Markdown [#305](https://github.com/puppetlabs/puppet-strings/pull/305) ([danielparks](https://github.com/danielparks))
|
34
|
-
|
35
48
|
- (#300) Fix anchor links in Markdown docs [#303](https://github.com/puppetlabs/puppet-strings/pull/303) ([danielparks](https://github.com/danielparks))
|
36
49
|
|
37
|
-
### Other
|
38
|
-
|
39
|
-
- (MAINT) Bump gem version [#327](https://github.com/puppetlabs/puppet-strings/pull/327) ([chelnak](https://github.com/chelnak))
|
40
|
-
|
41
50
|
## [v2.9.0](https://github.com/puppetlabs/puppet-strings/tree/v2.9.0) - 2021-11-29
|
42
51
|
|
43
52
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.8.0...v2.9.0)
|
@@ -61,7 +70,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
61
70
|
### Fixed
|
62
71
|
|
63
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))
|
64
|
-
|
65
73
|
- README.md: update link to docs [#276](https://github.com/puppetlabs/puppet-strings/pull/276) ([kenyon](https://github.com/kenyon))
|
66
74
|
|
67
75
|
## [v2.7.0](https://github.com/puppetlabs/puppet-strings/tree/v2.7.0) - 2021-05-17
|
@@ -86,13 +94,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
86
94
|
### Fixed
|
87
95
|
|
88
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))
|
89
|
-
|
90
97
|
- Handle a missing description gracefully [#260](https://github.com/puppetlabs/puppet-strings/pull/260) ([scotje](https://github.com/scotje))
|
91
|
-
|
92
98
|
- Fix ERB failure - parameters without descriptions [#255](https://github.com/puppetlabs/puppet-strings/pull/255) ([trevor-vaughan](https://github.com/trevor-vaughan))
|
93
|
-
|
94
99
|
- puppet_function template: fix tags, source [#249](https://github.com/puppetlabs/puppet-strings/pull/249) ([raemer](https://github.com/raemer))
|
95
|
-
|
96
100
|
- Handle a missing description gracefully [#246](https://github.com/puppetlabs/puppet-strings/pull/246) ([ekohl](https://github.com/ekohl))
|
97
101
|
|
98
102
|
## [v2.5.0](https://github.com/puppetlabs/puppet-strings/tree/v2.5.0) - 2020-07-15
|
@@ -102,15 +106,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
102
106
|
### Added
|
103
107
|
|
104
108
|
- (GH-225) Document functions in Puppet Datatypes [#235](https://github.com/puppetlabs/puppet-strings/pull/235) ([glennsarti](https://github.com/glennsarti))
|
105
|
-
|
106
109
|
- Add checks to resource_type handler and code objects [#232](https://github.com/puppetlabs/puppet-strings/pull/232) ([scotje](https://github.com/scotje))
|
107
|
-
|
108
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))
|
109
111
|
|
110
112
|
### Fixed
|
111
113
|
|
112
114
|
- (#242) Wrap names in backticks when rendering to markdown [#243](https://github.com/puppetlabs/puppet-strings/pull/243) ([scotje](https://github.com/scotje))
|
113
|
-
|
114
115
|
- Eliminate trailing spaces w/o descriptions [#224](https://github.com/puppetlabs/puppet-strings/pull/224) ([binford2k](https://github.com/binford2k))
|
115
116
|
|
116
117
|
## [v2.4.0](https://github.com/puppetlabs/puppet-strings/tree/v2.4.0) - 2020-02-20
|
@@ -120,9 +121,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
120
121
|
### Added
|
121
122
|
|
122
123
|
- Add missing HTML output support for enum tag [#218](https://github.com/puppetlabs/puppet-strings/pull/218) ([seanmil](https://github.com/seanmil))
|
123
|
-
|
124
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))
|
125
|
-
|
126
125
|
- Expanded default search glob for plans. [#214](https://github.com/puppetlabs/puppet-strings/pull/214) ([Raskil](https://github.com/Raskil))
|
127
126
|
|
128
127
|
## [v2.3.1](https://github.com/puppetlabs/puppet-strings/tree/v2.3.1) - 2019-09-23
|
@@ -132,7 +131,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
132
131
|
### Fixed
|
133
132
|
|
134
133
|
- (maint) Use parameters method instead of json['parameters'] [#211](https://github.com/puppetlabs/puppet-strings/pull/211) ([lucywyman](https://github.com/lucywyman))
|
135
|
-
|
136
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))
|
137
135
|
|
138
136
|
## [v2.3.0](https://github.com/puppetlabs/puppet-strings/tree/v2.3.0) - 2019-07-17
|
@@ -154,11 +152,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
154
152
|
### Added
|
155
153
|
|
156
154
|
- (PDOC-272) Add required features attribute [#194](https://github.com/puppetlabs/puppet-strings/pull/194) ([kris-bosland](https://github.com/kris-bosland))
|
157
|
-
|
158
155
|
- (maint) Implement a strings:generate:reference task [#192](https://github.com/puppetlabs/puppet-strings/pull/192) ([ekohl](https://github.com/ekohl))
|
159
|
-
|
160
156
|
- (PDOC-265) Add examples to function reference docs [#188](https://github.com/puppetlabs/puppet-strings/pull/188) ([ekohl](https://github.com/ekohl))
|
161
|
-
|
162
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))
|
163
158
|
|
164
159
|
### Fixed
|
@@ -172,7 +167,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
172
167
|
### Added
|
173
168
|
|
174
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))
|
175
|
-
|
176
170
|
- (PDOC-255) markdown table of contents update [#181](https://github.com/puppetlabs/puppet-strings/pull/181) ([eputnam](https://github.com/eputnam))
|
177
171
|
|
178
172
|
### Fixed
|
@@ -186,9 +180,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
186
180
|
### Added
|
187
181
|
|
188
182
|
- (PDOC-238) add generated message to markdown [#175](https://github.com/puppetlabs/puppet-strings/pull/175) ([eputnam](https://github.com/eputnam))
|
189
|
-
|
190
183
|
- (PDOC-228) puppet plan support [#168](https://github.com/puppetlabs/puppet-strings/pull/168) ([eputnam](https://github.com/eputnam))
|
191
|
-
|
192
184
|
- (PDOC-206) support for tasks [#161](https://github.com/puppetlabs/puppet-strings/pull/161) ([eputnam](https://github.com/eputnam))
|
193
185
|
|
194
186
|
### Changed
|
@@ -197,21 +189,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
197
189
|
### Fixed
|
198
190
|
|
199
191
|
- (PDOC-36) fix hack for README urls [#176](https://github.com/puppetlabs/puppet-strings/pull/176) ([eputnam](https://github.com/eputnam))
|
200
|
-
|
201
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))
|
202
|
-
|
203
193
|
- (PDOC-159) server urls fix [#173](https://github.com/puppetlabs/puppet-strings/pull/173) ([eputnam](https://github.com/eputnam))
|
204
|
-
|
205
194
|
- (maint) display Plans in markdown table of contents [#171](https://github.com/puppetlabs/puppet-strings/pull/171) ([eputnam](https://github.com/eputnam))
|
206
|
-
|
207
195
|
- (PDOC-233) markdown whitespace fixes [#170](https://github.com/puppetlabs/puppet-strings/pull/170) ([JohnLyman](https://github.com/JohnLyman))
|
208
|
-
|
209
196
|
- (PDOC-229) fix error with return_type and @return [#169](https://github.com/puppetlabs/puppet-strings/pull/169) ([eputnam](https://github.com/eputnam))
|
210
|
-
|
211
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))
|
212
|
-
|
213
198
|
- (PDOC-192) remove warning for title/name [#166](https://github.com/puppetlabs/puppet-strings/pull/166) ([eputnam](https://github.com/eputnam))
|
214
|
-
|
215
199
|
- (maint) add condition for misleading warning [#155](https://github.com/puppetlabs/puppet-strings/pull/155) ([eputnam](https://github.com/eputnam))
|
216
200
|
|
217
201
|
## [1.2.1](https://github.com/puppetlabs/puppet-strings/tree/1.2.1) - 2018-03-01
|
@@ -229,13 +213,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
229
213
|
### Added
|
230
214
|
|
231
215
|
- (PDOC-184) generate markdown [#156](https://github.com/puppetlabs/puppet-strings/pull/156) ([eputnam](https://github.com/eputnam))
|
232
|
-
|
233
216
|
- (PDK-437) Add support for Resource API types [#153](https://github.com/puppetlabs/puppet-strings/pull/153) ([DavidS](https://github.com/DavidS))
|
234
217
|
|
235
218
|
### Fixed
|
236
219
|
|
237
220
|
- Fix return type matching for Puppet functions [#159](https://github.com/puppetlabs/puppet-strings/pull/159) ([pegasd](https://github.com/pegasd))
|
238
|
-
|
239
221
|
- Add rgen as a runtime dependency [#149](https://github.com/puppetlabs/puppet-strings/pull/149) ([rnelson0](https://github.com/rnelson0))
|
240
222
|
|
241
223
|
## [1.1.1](https://github.com/puppetlabs/puppet-strings/tree/1.1.1) - 2017-10-20
|
@@ -245,7 +227,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
245
227
|
### Fixed
|
246
228
|
|
247
229
|
- (PDOC-160) Remove the timestamp from output [#137](https://github.com/puppetlabs/puppet-strings/pull/137) ([GeoffWilliams](https://github.com/GeoffWilliams))
|
248
|
-
|
249
230
|
- Fix args handling for rake strings::generate [#136](https://github.com/puppetlabs/puppet-strings/pull/136) ([hashar](https://github.com/hashar))
|
250
231
|
|
251
232
|
## [1.1.0](https://github.com/puppetlabs/puppet-strings/tree/1.1.0) - 2017-03-20
|
@@ -255,7 +236,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
255
236
|
### Added
|
256
237
|
|
257
238
|
- (PDOC-161) Add `summary` tag for short descriptions [#138](https://github.com/puppetlabs/puppet-strings/pull/138) ([whopper](https://github.com/whopper))
|
258
|
-
|
259
239
|
- (PDOC-155) Allow type documentation in Puppet 4 code [#132](https://github.com/puppetlabs/puppet-strings/pull/132) ([whopper](https://github.com/whopper))
|
260
240
|
|
261
241
|
## [1.0.0](https://github.com/puppetlabs/puppet-strings/tree/1.0.0) - 2016-11-28
|
@@ -265,25 +245,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
265
245
|
### Added
|
266
246
|
|
267
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))
|
268
|
-
|
269
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))
|
270
|
-
|
271
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))
|
272
|
-
|
273
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))
|
274
251
|
|
275
252
|
### Fixed
|
276
253
|
|
277
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))
|
278
|
-
|
279
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))
|
280
|
-
|
281
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))
|
282
|
-
|
283
257
|
- (PDOC-127) Strip whitespace from type feature docstrings [#112](https://github.com/puppetlabs/puppet-strings/pull/112) ([whopper](https://github.com/whopper))
|
284
|
-
|
285
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))
|
286
|
-
|
287
259
|
- (PDOC-122) Properly parse `newfunction` calls with newlines [#110](https://github.com/puppetlabs/puppet-strings/pull/110) ([whopper](https://github.com/whopper))
|
288
260
|
|
289
261
|
## [0.99.0](https://github.com/puppetlabs/puppet-strings/tree/0.99.0) - 2016-10-10
|
@@ -293,11 +265,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
293
265
|
### Fixed
|
294
266
|
|
295
267
|
- (PDOC-80) Remove runtime dependency on puppet [#103](https://github.com/puppetlabs/puppet-strings/pull/103) ([whopper](https://github.com/whopper))
|
296
|
-
|
297
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))
|
298
|
-
|
299
269
|
- (PDOC-71) Workaround for spurious error failures [#90](https://github.com/puppetlabs/puppet-strings/pull/90) ([trevor-vaughan](https://github.com/trevor-vaughan))
|
300
|
-
|
301
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))
|
302
271
|
|
303
272
|
## [0.4.0](https://github.com/puppetlabs/puppet-strings/tree/0.4.0) - 2016-03-30
|
@@ -307,11 +276,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
307
276
|
### Fixed
|
308
277
|
|
309
278
|
- (PDOC-75) Work with both versions of 'interpret_any' [#77](https://github.com/puppetlabs/puppet-strings/pull/77) ([HAIL9000](https://github.com/HAIL9000))
|
310
|
-
|
311
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))
|
312
|
-
|
313
280
|
- Fix issue running strings:generate without a yardopts file [#71](https://github.com/puppetlabs/puppet-strings/pull/71) ([garethr](https://github.com/garethr))
|
314
|
-
|
315
281
|
- (PDOC-23) Emit json [#55](https://github.com/puppetlabs/puppet-strings/pull/55) ([iankronquist](https://github.com/iankronquist))
|
316
282
|
|
317
283
|
## [0.3.1](https://github.com/puppetlabs/puppet-strings/tree/0.3.1) - 2015-09-22
|
@@ -321,9 +287,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
321
287
|
### Fixed
|
322
288
|
|
323
289
|
- make metadata match pmt output [#65](https://github.com/puppetlabs/puppet-strings/pull/65) ([underscorgan](https://github.com/underscorgan))
|
324
|
-
|
325
290
|
- Last PR for the Summer [#62](https://github.com/puppetlabs/puppet-strings/pull/62) ([iankronquist](https://github.com/iankronquist))
|
326
|
-
|
327
291
|
- Same name type and provider [#61](https://github.com/puppetlabs/puppet-strings/pull/61) ([iankronquist](https://github.com/iankronquist))
|
328
292
|
|
329
293
|
## [0.3.0](https://github.com/puppetlabs/puppet-strings/tree/0.3.0) - 2015-09-21
|
@@ -333,43 +297,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
333
297
|
### Added
|
334
298
|
|
335
299
|
- Actually/pdoc 19 [#36](https://github.com/puppetlabs/puppet-strings/pull/36) ([iankronquist](https://github.com/iankronquist))
|
336
|
-
|
337
300
|
- Type checking/pdoc 21 [#35](https://github.com/puppetlabs/puppet-strings/pull/35) ([iankronquist](https://github.com/iankronquist))
|
338
|
-
|
339
301
|
- Dispatch params/pdoc 37 [#33](https://github.com/puppetlabs/puppet-strings/pull/33) ([iankronquist](https://github.com/iankronquist))
|
340
302
|
|
341
303
|
### Fixed
|
342
304
|
|
343
305
|
- Types and providers fixes [#60](https://github.com/puppetlabs/puppet-strings/pull/60) ([iankronquist](https://github.com/iankronquist))
|
344
|
-
|
345
306
|
- (PDOC-35) Format generated html properly [#59](https://github.com/puppetlabs/puppet-strings/pull/59) ([iankronquist](https://github.com/iankronquist))
|
346
|
-
|
347
307
|
- (PDOC-49) Improve warnings [#57](https://github.com/puppetlabs/puppet-strings/pull/57) ([iankronquist](https://github.com/iankronquist))
|
348
|
-
|
349
308
|
- (PDOC-45) Puppet 4x functions handle unusual names [#53](https://github.com/puppetlabs/puppet-strings/pull/53) ([iankronquist](https://github.com/iankronquist))
|
350
|
-
|
351
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))
|
352
|
-
|
353
310
|
- (PDOC-38) Prevent warnings from being issued twice [#50](https://github.com/puppetlabs/puppet-strings/pull/50) ([iankronquist](https://github.com/iankronquist))
|
354
|
-
|
355
311
|
- (PDOC-21) Duplicate warnings [#49](https://github.com/puppetlabs/puppet-strings/pull/49) ([iankronquist](https://github.com/iankronquist))
|
356
|
-
|
357
312
|
- (PDOC-21) Only create HostClass parameters once [#48](https://github.com/puppetlabs/puppet-strings/pull/48) ([iankronquist](https://github.com/iankronquist))
|
358
|
-
|
359
313
|
- (PDOC-35) Support types and providers [#46](https://github.com/puppetlabs/puppet-strings/pull/46) ([iankronquist](https://github.com/iankronquist))
|
360
|
-
|
361
314
|
- (maint) Don't print extraneous "true". [#45](https://github.com/puppetlabs/puppet-strings/pull/45) ([iankronquist](https://github.com/iankronquist))
|
362
|
-
|
363
315
|
- (PDOC-21) Check mismatched types in defined types [#44](https://github.com/puppetlabs/puppet-strings/pull/44) ([iankronquist](https://github.com/iankronquist))
|
364
|
-
|
365
316
|
- Forgot defined types [#42](https://github.com/puppetlabs/puppet-strings/pull/42) ([iankronquist](https://github.com/iankronquist))
|
366
|
-
|
367
317
|
- Nested classes/pdoc 35 [#41](https://github.com/puppetlabs/puppet-strings/pull/41) ([iankronquist](https://github.com/iankronquist))
|
368
|
-
|
369
318
|
- (maint) Remove unused code path [#38](https://github.com/puppetlabs/puppet-strings/pull/38) ([iankronquist](https://github.com/iankronquist))
|
370
|
-
|
371
319
|
- (PDOC-30) Fix Markdown parsing lists parsing [#37](https://github.com/puppetlabs/puppet-strings/pull/37) ([iankronquist](https://github.com/iankronquist))
|
372
|
-
|
373
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))
|
374
321
|
|
375
322
|
## [0.2.0](https://github.com/puppetlabs/puppet-strings/tree/0.2.0) - 2015-03-17
|
@@ -379,17 +326,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
379
326
|
### Added
|
380
327
|
|
381
328
|
- (PDOC-27) Don't require options for 3x functions [#26](https://github.com/puppetlabs/puppet-strings/pull/26) ([HAIL9000](https://github.com/HAIL9000))
|
382
|
-
|
383
329
|
- (PDOC-24) Add basic templates for functions [#22](https://github.com/puppetlabs/puppet-strings/pull/22) ([HAIL9000](https://github.com/HAIL9000))
|
384
|
-
|
385
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))
|
386
331
|
|
387
332
|
### Fixed
|
388
333
|
|
389
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))
|
390
|
-
|
391
335
|
- (PDOC-25) Fix mangled puppet namespaces [#27](https://github.com/puppetlabs/puppet-strings/pull/27) ([HAIL9000](https://github.com/HAIL9000))
|
392
|
-
|
393
336
|
- (PDOC-26) Rename Puppetx to PuppetX [#25](https://github.com/puppetlabs/puppet-strings/pull/25) ([HAIL9000](https://github.com/HAIL9000))
|
394
337
|
|
395
338
|
## [0.1.1](https://github.com/puppetlabs/puppet-strings/tree/0.1.1) - 2014-10-21
|
@@ -403,17 +346,3 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
403
346
|
## [0.1.0](https://github.com/puppetlabs/puppet-strings/tree/0.1.0) - 2014-10-07
|
404
347
|
|
405
348
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/a9408c792ba48ffc5e59d8641a538a83197b7064...0.1.0)
|
406
|
-
|
407
|
-
### Added
|
408
|
-
|
409
|
-
- (PDOC-6) Allow for different puppet gem versions [#9](https://github.com/puppetlabs/puppet-strings/pull/9) ([HAIL9000](https://github.com/HAIL9000))
|
410
|
-
|
411
|
-
- Add -q option to suppress warnings for server [#6](https://github.com/puppetlabs/puppet-strings/pull/6) ([petems](https://github.com/petems))
|
412
|
-
|
413
|
-
- (PDOC-3) Rename face to strings instead of yardoc [#4](https://github.com/puppetlabs/puppet-strings/pull/4) ([HAIL9000](https://github.com/HAIL9000))
|
414
|
-
|
415
|
-
### Fixed
|
416
|
-
|
417
|
-
- Make metadata match file generated by pmt [#14](https://github.com/puppetlabs/puppet-strings/pull/14) ([underscorgan](https://github.com/underscorgan))
|
418
|
-
|
419
|
-
- (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
|