puppet-strings 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +18 -2
- data/CONTRIBUTING.md +20 -1
- data/Gemfile +3 -8
- data/HISTORY.md +218 -0
- data/Rakefile +35 -2
- data/lib/puppet-strings/markdown/base.rb +3 -1
- data/lib/puppet-strings/markdown/table_of_contents.rb +1 -1
- data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +8 -0
- data/lib/puppet-strings/markdown/templates/function.erb +19 -1
- data/lib/puppet-strings/markdown/templates/resource_type.erb +8 -0
- data/lib/puppet-strings/markdown/templates/table_of_contents.erb +3 -3
- data/lib/puppet-strings/version.rb +3 -0
- data/lib/puppet-strings/yard/templates/default/puppet_class/html/note.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_class/html/setup.rb +1 -1
- data/lib/puppet-strings/yard/templates/default/puppet_class/html/todo.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_defined_type/html/note.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_defined_type/html/setup.rb +1 -1
- data/lib/puppet-strings/yard/templates/default/puppet_defined_type/html/todo.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_function/html/note.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb +1 -1
- data/lib/puppet-strings/yard/templates/default/puppet_function/html/todo.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_plan/html/note.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_plan/html/setup.rb +1 -1
- data/lib/puppet-strings/yard/templates/default/puppet_plan/html/todo.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_type/html/note.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +1 -1
- data/lib/puppet-strings/yard/templates/default/puppet_type/html/todo.erb +6 -0
- data/misc/ANNOUNCEMENT_TEMPLATE.md +40 -0
- data/spec/fixtures/unit/json/output.json +10 -2
- data/spec/fixtures/unit/json/output_with_plan.json +10 -2
- data/spec/fixtures/unit/json/output_without_puppet_function.json +8 -0
- data/spec/fixtures/unit/markdown/output.md +13 -7
- data/spec/fixtures/unit/markdown/output_with_plan.md +14 -8
- data/spec/unit/puppet-strings/json_spec.rb +2 -0
- data/spec/unit/puppet-strings/markdown_spec.rb +2 -0
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b656b5430c108d15ea909e2381ca758884b51c910505ab36880f76be538b5eff
|
4
|
+
data.tar.gz: 6951a084211bbdc7d0d760865acae0e839ceadadd8df337d33938097083b4bc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c359ad4b8a62e978e16f01cf17a50e86d9c011fc13ce3bde9757f2f57074d92c8df7b78119b88bd8551510adb3cf2cbe5adb5644e99e2415ed830d6744eccfe
|
7
|
+
data.tar.gz: ed4d414529d500e4dfa696271e757c4daecd3df98c89ab83b2c7f956ac16a1392779c3fcf0d601d1c91c70a75a0e8745ce36bfef6679dac9f36a7cc3428aca76
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
2
|
|
3
|
-
All
|
3
|
+
All significant changes to this repo will be summarized in this file.
|
4
|
+
|
5
|
+
|
6
|
+
## [v2.1.0](https://github.com/puppetlabs/puppet-strings/tree/v2.1.0) (2018-06-25)
|
7
|
+
|
8
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/2.0.0...v2.1.0)
|
9
|
+
|
10
|
+
**Implemented enhancements:**
|
11
|
+
|
12
|
+
- \(PDOC-212, PDOC-213\) add support for @note and @todo [\#182](https://github.com/puppetlabs/puppet-strings/pull/182) ([eputnam](https://github.com/eputnam))
|
13
|
+
- \(PDOC-255\) markdown table of contents update [\#181](https://github.com/puppetlabs/puppet-strings/pull/181) ([eputnam](https://github.com/eputnam))
|
14
|
+
|
15
|
+
**Merged pull requests:**
|
16
|
+
|
17
|
+
- \(PDOC-259\) relax ruby requirement to 2.1.0 from 2.1.9 [\#184](https://github.com/puppetlabs/puppet-strings/pull/184) ([DavidS](https://github.com/DavidS))
|
18
|
+
|
19
|
+
# Previous Changes
|
4
20
|
|
5
21
|
## [2.0.0](https://github.com/puppetlabs/puppet-strings/tree/2.0.0) (2018-05-11)
|
6
22
|
|
data/CONTRIBUTING.md
CHANGED
@@ -51,7 +51,7 @@ that we can have a chance of keeping on top of things.
|
|
51
51
|
For changes of a trivial nature to comments and documentation, it is not
|
52
52
|
always necessary to create a new ticket in Jira. In this case, it is
|
53
53
|
appropriate to start the first line of a commit with '(doc)' instead of
|
54
|
-
a ticket number.
|
54
|
+
a ticket number.
|
55
55
|
|
56
56
|
````
|
57
57
|
(doc) Add documentation commit example to CONTRIBUTING
|
@@ -76,6 +76,25 @@ a ticket number.
|
|
76
76
|
* After feedback has been given we expect responses within two weeks. After two
|
77
77
|
weeks will may close the pull request if it isn't showing any activity.
|
78
78
|
|
79
|
+
## Cutting a release
|
80
|
+
|
81
|
+
To cut a new release, from a current `master` checkout:
|
82
|
+
|
83
|
+
* Start the release branch with `git checkout -b release-prep`
|
84
|
+
* Update `lib/puppet-strings/version.rb` to the new version
|
85
|
+
* Update the CHANGELOG
|
86
|
+
* Have a [CHANGELOG_GITHUB_TOKEN](https://github.com/skywinder/github-changelog-generator#github-token) set in your environment
|
87
|
+
* run `rake changelog`
|
88
|
+
* double check the PRs to make sure they're all tagged correctly (using the new CHANGELOG for cross-checking)
|
89
|
+
* Check README and other materials for up-to-date-ness
|
90
|
+
* Commit changes with title "Release prep for v\<VERSION>"
|
91
|
+
* Upload and PR the release-prep branch to the puppetlabs GitHub repo
|
92
|
+
* Check that CI is green and merge the PR
|
93
|
+
* Run `rake release[upstream]` to release from your checkout
|
94
|
+
* make sure to use the name of your git remote pointing to the puppetlabs GitHub repo
|
95
|
+
* Remove the release-prep branch
|
96
|
+
* Send the release announcements using the template in [misc/ANNOUNCEMENT_TEMPLATE.md](misc/ANNOUNCEMENT_TEMPLATE.md)
|
97
|
+
|
79
98
|
# Additional Resources
|
80
99
|
|
81
100
|
* [More information on contributing](http://links.puppet.com/contribute-to-puppet)
|
data/Gemfile
CHANGED
@@ -29,14 +29,9 @@ group :acceptance do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
group :development do
|
32
|
+
gem 'github_changelog_generator', git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
|
32
33
|
gem 'pry'
|
33
|
-
|
34
|
-
gem 'pry-debugger'
|
35
|
-
elsif RUBY_VERSION[0] == '2'
|
36
|
-
gem 'pry-byebug'
|
37
|
-
end
|
34
|
+
gem 'pry-byebug'
|
38
35
|
end
|
39
36
|
|
40
|
-
gem '
|
41
|
-
gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0'
|
42
|
-
gem 'rubocop', '<= 0.47.0' if RUBY_VERSION >= '2.0.0'
|
37
|
+
gem 'rubocop', '<= 0.47.0'
|
data/HISTORY.md
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
# Previous Changes
|
2
|
+
|
3
|
+
## [2.0.0](https://github.com/puppetlabs/puppet-strings/tree/2.0.0) (2018-05-11)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.2.1...2.0.0)
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- bump required ruby and puppet versions [\#178](https://github.com/puppetlabs/puppet-strings/pull/178) ([eputnam](https://github.com/eputnam))
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- \(PDOC-238\) add generated message to markdown [\#175](https://github.com/puppetlabs/puppet-strings/pull/175) ([eputnam](https://github.com/eputnam))
|
14
|
+
- \(PDOC-228\) puppet plan support [\#168](https://github.com/puppetlabs/puppet-strings/pull/168) ([eputnam](https://github.com/eputnam))
|
15
|
+
- \(PDOC-206\) support for tasks [\#161](https://github.com/puppetlabs/puppet-strings/pull/161) ([eputnam](https://github.com/eputnam))
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
- \(PDOC-36\) fix hack for README urls [\#176](https://github.com/puppetlabs/puppet-strings/pull/176) ([eputnam](https://github.com/eputnam))
|
20
|
+
- \(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))
|
21
|
+
- \(PDOC-159\) server urls fix [\#173](https://github.com/puppetlabs/puppet-strings/pull/173) ([eputnam](https://github.com/eputnam))
|
22
|
+
- \(maint\) display Plans in markdown table of contents [\#171](https://github.com/puppetlabs/puppet-strings/pull/171) ([eputnam](https://github.com/eputnam))
|
23
|
+
- \(PDOC-233\) markdown whitespace fixes [\#170](https://github.com/puppetlabs/puppet-strings/pull/170) ([JohnLyman](https://github.com/JohnLyman))
|
24
|
+
- \(PDOC-229\) fix error with return\_type and @return [\#169](https://github.com/puppetlabs/puppet-strings/pull/169) ([eputnam](https://github.com/eputnam))
|
25
|
+
- \(PDOC-36\) hack to fix README links in generated HTML [\#167](https://github.com/puppetlabs/puppet-strings/pull/167) ([eputnam](https://github.com/eputnam))
|
26
|
+
- \(PDOC-192\) remove warning for title/name [\#166](https://github.com/puppetlabs/puppet-strings/pull/166) ([eputnam](https://github.com/eputnam))
|
27
|
+
- \(maint\) add condition for misleading warning [\#155](https://github.com/puppetlabs/puppet-strings/pull/155) ([eputnam](https://github.com/eputnam))
|
28
|
+
|
29
|
+
## [1.2.1](https://github.com/puppetlabs/puppet-strings/tree/1.2.1) (2018-03-01)
|
30
|
+
|
31
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.2.0...1.2.1)
|
32
|
+
|
33
|
+
### Fixed
|
34
|
+
|
35
|
+
- (PDOC-224) Handle --emit-json(-stdout) again [\#162](https://github.com/puppetlabs/puppet-strings/pull/162) ([ekohl](https://github.com/ekohl))
|
36
|
+
|
37
|
+
## [1.2.0](https://github.com/puppetlabs/puppet-strings/tree/1.2.0) (2018-02-26)
|
38
|
+
|
39
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.1.1...1.2.0)
|
40
|
+
|
41
|
+
### Added
|
42
|
+
|
43
|
+
- \(PDOC-184\) generate markdown [\#156](https://github.com/puppetlabs/puppet-strings/pull/156) ([eputnam](https://github.com/eputnam))
|
44
|
+
- \(PDK-437\) Add support for Resource API types [\#153](https://github.com/puppetlabs/puppet-strings/pull/153) ([DavidS](https://github.com/DavidS))
|
45
|
+
|
46
|
+
### Fixed
|
47
|
+
|
48
|
+
- Fix return type matching for Puppet functions [\#159](https://github.com/puppetlabs/puppet-strings/pull/159) ([pegasd](https://github.com/pegasd))
|
49
|
+
- Add rgen as a runtime dependency [\#149](https://github.com/puppetlabs/puppet-strings/pull/149) ([rnelson0](https://github.com/rnelson0))
|
50
|
+
|
51
|
+
## 2017-10-20 - Release 1.1.1
|
52
|
+
|
53
|
+
### BugFixes
|
54
|
+
- Remove timestamps from footer of generated HTML pages ([GeoffWilliams](https://github.com/GeoffWilliams))
|
55
|
+
- Fix argument handling for `rake strings::generate` ([hashar](https://github.com/hashar))
|
56
|
+
|
57
|
+
### Other
|
58
|
+
- Fixed Markdown formatting issues in CHANGELOG ([maju6406](https://github.com/maju6406))
|
59
|
+
- Fixed typo in README ([hfm](https://github.com/hfm))
|
60
|
+
- Fixed Markdown formatting issues in README ([gguillotte](https://github.com/gguillotte))
|
61
|
+
- Update Travis CI configurations for Ruby and Puppet versions ([ghoneycutt](https://github.com/ghoneycutt))
|
62
|
+
|
63
|
+
## 2017-03-20 - Release 1.1.0
|
64
|
+
|
65
|
+
### Summary
|
66
|
+
|
67
|
+
This release adds a new `summary` tag which can be used to add a short description to classes, functions, types, and providers. In addition, `@param` tags can now include type information in Puppet 4 code without warnings being issued.
|
68
|
+
|
69
|
+
All related tickets can be found under the [PDOC](https://tickets.puppetlabs.com/browse/PDOC) JIRA project with the fix version of [1.1.0](https://tickets.puppetlabs.com/issues/?filter=25603).
|
70
|
+
|
71
|
+
### Features
|
72
|
+
- The `summary` tag can be added to any code that puppet-strings supports. The recommended length limit for a summary is 140 characters. Warnings will be issued for strings longer than this limit.
|
73
|
+
- Puppet 4 parameter types can now be explicitly documented. Previously, this was not allowed because Puppet 4 parameter types can be automatically determined without extra documentation. However, users may desire to do so anyway for consistency. Strings will emit a warning if the documented type does not match the actual type. In such an event, the incorrect documented type will be ignored in favor of the real one.
|
74
|
+
|
75
|
+
## 2016-11-28 - Release 1.0.0
|
76
|
+
|
77
|
+
### Summary
|
78
|
+
|
79
|
+
This release fixes up minor bugs from the 0.99.0 release and modifies the JSON schema for Puppet functions.
|
80
|
+
|
81
|
+
All related tickets can be found under the [PDOC](https://tickets.puppetlabs.com/browse/PDOC) JIRA project with the fix version of [1.0.0](https://tickets.puppetlabs.com/issues/?filter=23607).
|
82
|
+
|
83
|
+
### Features
|
84
|
+
- The JSON schema for Puppet functions has been altered to include a new 'signatures' top-level key **(PDOC-125)**
|
85
|
+
- Includes information about all function signatures (overloads). Existing overload key format has been preserved.
|
86
|
+
- Reworked README for enhanced clarity **(PDOC-133)**
|
87
|
+
|
88
|
+
### BugFixes
|
89
|
+
- Fixed an issue where the search box in the code navigator overlapped list items below it **(PDOC-93)**
|
90
|
+
- Strings can now handle multiple `defaultfor` calls in Puppet providers **(PDOC-95)**
|
91
|
+
- Fixed an issue preventing the generated \_index.html file from being uploaded to GitHub pages via the gh_pages task **(PDOC-120)**
|
92
|
+
- Fixed several issues with String's handling of Puppet 3.x and 4.x function return types **(PDOC-135)**, **(PDOC-136)**
|
93
|
+
- Fixed an issue where String's didn't properly parse overloads if no summary description was provided **(PDOC-129)**
|
94
|
+
- Strings now correctly handles Puppet 3.x functions when the `newfunction` call is on a newline **(PDOC-122)**
|
95
|
+
- Fixed an issue where certain Ruby string constructs were incompletely stripped from some docstrings **(PDOC-126)**
|
96
|
+
- Hanging indents from type feature descriptions are now properly stripped **(PDOC-127)**
|
97
|
+
|
98
|
+
## 2016-10-10 - Release 0.99.0
|
99
|
+
|
100
|
+
### Summary
|
101
|
+
|
102
|
+
This release includes a complete rewrite of strings, fixing many bugs from previous versions and generally improving the user experience. This release is intended to be the last stop before the strings major version 1.0 is released, and nearly all of the functionality of the major release is included.
|
103
|
+
|
104
|
+
All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.99.0](https://tickets.puppetlabs.com/issues/?filter=22705).
|
105
|
+
|
106
|
+
### Features
|
107
|
+
- Complete overhaul, including code cleanup, bug fixes and new functionality **(PDOC-63)**
|
108
|
+
- Documentation has been split into sections based on type: puppet 3x API functions, puppet 4x API functions, ruby classes, puppet language functions, types, and providers
|
109
|
+
- New JSON schema organized to reflect the separation of types
|
110
|
+
- Support for custom functions written in the puppet language
|
111
|
+
- Support for puppet function overloads via the create_function 4.x API
|
112
|
+
- YARD bumped to latest version, 0.9.5
|
113
|
+
- Markdown is now the default format for parsing docstring text **(PDOC-86)**
|
114
|
+
- Note: this means Markdown text in YARD comments and tags, not a change in the output of strings
|
115
|
+
- New commandline options: --emit-json and --emit-json-stdout to generate JSON documentation **(PDOC-84)**
|
116
|
+
- Runtime dependency on Puppet has been removed, allowing strings to function in Puppet Enterprise 3.8 **(PDOC-80)**
|
117
|
+
- Note that the gem still requires puppet. We recommend that the strings gem be installed with puppet, as suggested in the [README](https://github.com/puppetlabs/puppet-strings/blob/master/README.md#installing-puppet-strings)
|
118
|
+
- New gemspec requirement on Ruby version 1.9.3, the oldest supported Ruby version
|
119
|
+
|
120
|
+
### BugFixes
|
121
|
+
|
122
|
+
- Prevents a blizzard of errors when documenting Puppet Core source and some puppet modules **(PDOC-63)**
|
123
|
+
- As this is a complete rewrite, many known and unknown bugs from the original code were fixed along the way
|
124
|
+
- Allow strings to be installed in PE 3.8 without overwriting existing puppet and facter installations with newer gems
|
125
|
+
|
126
|
+
## 2016-03-30 - Release 0.4.0
|
127
|
+
|
128
|
+
### Summary
|
129
|
+
|
130
|
+
This release adds JSON output support for strings, fixes a major bug that prevented strings from working with the 4.4.0 release of puppet, and is the last version of strings that will be released as a module.
|
131
|
+
|
132
|
+
All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.4.0](https://tickets.puppetlabs.com/issues/?filter=18810).
|
133
|
+
|
134
|
+
### Features
|
135
|
+
- Support for JSON output **(PDOC-23)**
|
136
|
+
- Strings now has the ability to produce a JSON representation of a given puppet module
|
137
|
+
- The details of the JSON schema can be found [here](https://github.com/puppetlabs/puppet-strings/blob/master/json_dom.md)
|
138
|
+
- For details on how to generate JSON, see the [README](https://github.com/puppetlabs/puppet-strings/blob/master/README.md#running-puppet-strings)
|
139
|
+
- Migrate to ruby gems as a distribution method **(PDOC-28)**
|
140
|
+
- This is the last release of strings that will be available as a puppet module
|
141
|
+
- The 0.4.0 release will be released concurrently as a ruby gem
|
142
|
+
- After this release, all updates will only be available via the gem
|
143
|
+
|
144
|
+
### Bugfixes
|
145
|
+
|
146
|
+
- Fix issue that prevented strings from running with Puppet 4.4.0 **(PDOC-75)**
|
147
|
+
|
148
|
+
## 2015-09-22 - Release 0.3.1
|
149
|
+
|
150
|
+
### Summary
|
151
|
+
|
152
|
+
This is a minor bug fix release.
|
153
|
+
|
154
|
+
All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.3.1](https://tickets.puppetlabs.com/issues/?filter=15530).
|
155
|
+
|
156
|
+
### Bugfixes
|
157
|
+
|
158
|
+
- Prevent strings from printing unnecessary quotes in error messages **(PDOC-57)**
|
159
|
+
- Issue correct type check warnings for defined types **(PDOC-56)**
|
160
|
+
- Allow providers, types, and defines to have the same name **(PDOC-54)**
|
161
|
+
|
162
|
+
## 2015-09-21 - Release 0.3.0
|
163
|
+
|
164
|
+
### Summary
|
165
|
+
|
166
|
+
This release includes support for Puppet Types and Providers, as well as
|
167
|
+
type checking Puppet 4x functions and defined types.
|
168
|
+
|
169
|
+
All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with
|
170
|
+
the fix version of [0.3.0](https://tickets.puppetlabs.com/issues/?filter=15529).
|
171
|
+
|
172
|
+
#### Features
|
173
|
+
|
174
|
+
- Support for Puppet Types and Providers **(PDOC-35)**
|
175
|
+
- Type check Puppet 4x functions and defined types where possible and warn the user when types don't match.
|
176
|
+
- Type check defined types **(PDOC-21)**
|
177
|
+
- Type check Puppet 4x functions **(PDOC-38)** **(PDOC-19)** **(PDOC-37)**
|
178
|
+
- Output type info in generated HTML **(PDOC-19)**
|
179
|
+
- Improved warnings and logging.
|
180
|
+
- Create a consistent style for warnings. **(PDOC-49)**
|
181
|
+
- All warnings get printed on stderr.
|
182
|
+
- Yard warnings are redirected to a log file **(PDOC-38)**
|
183
|
+
- Prevent duplicate warnings **(PDOC-38)**
|
184
|
+
- Improved README installation and usage instructions.
|
185
|
+
- Installation instructions using Puppet **(PDOC-33)**
|
186
|
+
|
187
|
+
|
188
|
+
#### Bugfixes
|
189
|
+
|
190
|
+
- Fix markdown list processing **(PDOC-30)**
|
191
|
+
- Fix namespacing for nested classes and defined types **(PDOC-20)**
|
192
|
+
|
193
|
+
|
194
|
+
## 2015-03-17 - Release 0.2.0
|
195
|
+
|
196
|
+
### Summary
|
197
|
+
|
198
|
+
This release includes improvements to the HTML output generated by strings and a few bug fixes.
|
199
|
+
All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.2.0](https://tickets.puppetlabs.com/issues/?filter=13760).
|
200
|
+
|
201
|
+
[PDOC JIRA]: https://tickets.puppetlabs.com/browse/PDOC
|
202
|
+
|
203
|
+
#### Features
|
204
|
+
- Custom YARD templates for classes and defined types **(PDOC-17)**
|
205
|
+
- Improved HMTL output that is more appropriate for Puppet code (especially for parameters)
|
206
|
+
- Support for the explicit list of YARD tags we will be supporting initially (@param, @return, @since, @example)
|
207
|
+
- Our own custom YARD templates which can be easily extended and tweaked
|
208
|
+
|
209
|
+
- Custom YARD templates for 3.x and 4.x functions **(PDOC-24)**
|
210
|
+
- Improved HMTL output that is more appropriate for listing several functions on one webpage in addition to being more consistent with the HTML produced for classes and defined types.
|
211
|
+
- Support for the explicit list of YARD tags we will be supporting initially (@param, @return, @since, @example)
|
212
|
+
- Our own custom YARD templates which can be easily extended and tweaked
|
213
|
+
- Addition of RubCop Travis CI job to ensure code quality and consistency **(PDOC-8)**
|
214
|
+
|
215
|
+
#### Bugfixes
|
216
|
+
- Puppet namespaces are no longer mangled for nested classes and defined types **(PDOC-25)**
|
217
|
+
- Strings is now compatible with the renaming of the Puppetx/puppetx namespace to PuppetX/puppet_x **(PDOC-26)**
|
218
|
+
- Strings will no longer crash when documenting 3x functions with less than two arguments passed into newfunction **(PDOC-27)**
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require '
|
2
|
-
require 'puppetlabs_spec_helper/rake_tasks'
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
#require 'puppetlabs_spec_helper/rake_tasks'
|
3
3
|
require 'puppet-lint/tasks/puppet-lint'
|
4
4
|
|
5
5
|
# Add our own tasks
|
@@ -58,3 +58,36 @@ task(:rubocop) do
|
|
58
58
|
cli = RuboCop::CLI.new
|
59
59
|
cli.run(%w(-D -f s))
|
60
60
|
end
|
61
|
+
|
62
|
+
#### CHANGELOG ####
|
63
|
+
begin
|
64
|
+
require 'github_changelog_generator/task'
|
65
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
66
|
+
require 'puppet-strings/version'
|
67
|
+
config.future_release = "v#{PuppetStrings::VERSION}"
|
68
|
+
config.header = "# Changelog\n\n" \
|
69
|
+
"All significant changes to this repo will be summarized in this file.\n"
|
70
|
+
config.configure_sections = {
|
71
|
+
added: {
|
72
|
+
prefix: "Added",
|
73
|
+
labels: ["enhancement"]
|
74
|
+
},
|
75
|
+
fixed: {
|
76
|
+
prefix: "Fixed",
|
77
|
+
labels: ["bugfix"]
|
78
|
+
},
|
79
|
+
breaking: {
|
80
|
+
prefix: "Changed",
|
81
|
+
labels: ["backwards-incompatible"]
|
82
|
+
}
|
83
|
+
}
|
84
|
+
config.exclude_labels = ['maintenance']
|
85
|
+
config.user = 'puppetlabs'
|
86
|
+
config.project = 'puppet-strings'
|
87
|
+
end
|
88
|
+
rescue LoadError
|
89
|
+
desc 'Install github_changelog_generator to get access to automatic changelog generation'
|
90
|
+
task :changelog do
|
91
|
+
raise 'Install github_changelog_generator to get access to automatic changelog generation'
|
92
|
+
end
|
93
|
+
end
|
@@ -57,7 +57,9 @@ module PuppetStrings::Markdown
|
|
57
57
|
# e.g. {:tag_name=>"author", :text=>"eputnam"}
|
58
58
|
{ :return_val => 'return',
|
59
59
|
:since => 'since',
|
60
|
-
:summary => 'summary'
|
60
|
+
:summary => 'summary',
|
61
|
+
:note => 'note',
|
62
|
+
:todo => 'todo' }.each do |method_name, tag_name|
|
61
63
|
# @return [String] unless the tag is nil or the string.length == 0
|
62
64
|
define_method method_name do
|
63
65
|
@tags.select { |tag| tag[:tag_name] == "#{tag_name}" }[0][:text] unless @tags.select { |tag| tag[:tag_name] == "#{tag_name}" }[0].nil? || @tags.select { |tag| tag[:tag_name] == "#{tag_name}" }[0][:text].length.zero?
|
@@ -7,7 +7,15 @@ Type: <%= type %>
|
|
7
7
|
<% elsif summary -%>
|
8
8
|
<%= summary %>
|
9
9
|
<% else -%>
|
10
|
-
<%= "The #{name}
|
10
|
+
<%= "The #{name} function." %>
|
11
|
+
<% end -%>
|
12
|
+
<% if todo -%>
|
13
|
+
* **TODO** <%= todo %>
|
14
|
+
|
15
|
+
<% end -%>
|
16
|
+
<% if note -%>
|
17
|
+
* **Note** <%= note %>
|
18
|
+
|
11
19
|
<% end -%>
|
12
20
|
|
13
21
|
<% signatures.each do |sig| -%>
|
@@ -16,6 +24,16 @@ Type: <%= type %>
|
|
16
24
|
<% if sig.text -%>
|
17
25
|
<%= sig.text %>
|
18
26
|
|
27
|
+
<% elsif sig.summary -%>
|
28
|
+
<%= sig.summary %>
|
29
|
+
|
30
|
+
<% else -%>
|
31
|
+
<%= "The #{name} function." %>
|
32
|
+
|
33
|
+
<% end -%>
|
34
|
+
<% if sig.note -%>
|
35
|
+
* **Note** <%= sig.note %>
|
36
|
+
|
19
37
|
<% end -%>
|
20
38
|
<% if sig.return_type -%>
|
21
39
|
Returns: `<%= sig.return_type %>`<% if sig.return_val %> <%= sig.return_val %><% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% if group.length > 0 -%>
|
2
|
-
|
2
|
+
**<%= group_name %>**
|
3
3
|
|
4
4
|
<% if priv -%>
|
5
|
-
|
5
|
+
_Public <%= group_name %>_
|
6
6
|
|
7
7
|
<% group.each do |item| -%>
|
8
8
|
<% unless item[:private] -%>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<% end -%>
|
11
11
|
<% end -%>
|
12
12
|
|
13
|
-
|
13
|
+
_Private <%= group_name %>_
|
14
14
|
|
15
15
|
<% group.each do |item| -%>
|
16
16
|
<% if item[:private] -%>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Initializes the template.
|
2
2
|
# @return [void]
|
3
3
|
def init
|
4
|
-
sections :header, :box_info, :summary, :overview, T('tags'), :properties, :parameters, :features
|
4
|
+
sections :header, :box_info, :summary, :overview, :note, :todo, T('tags'), :properties, :parameters, :features
|
5
5
|
end
|
6
6
|
|
7
7
|
# Renders the box_info section.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Send out announcements for major new feature releases, and high-impact bugfixes to <puppet-announce@googlegroups.com>, <puppet-dev@googlegroups.com>, <puppet-users@googlegroups.com>, <voxpupuli@groups.io>, and the puppet internal mailing lists <dev@puppet.com> and <tech-discuss@puppet.com>.
|
2
|
+
|
3
|
+
Before sending, do check that all links are still valid. Feel free to adjust the text to match better with the circumstances of the release, or add other news that are relevant at the time. If you make changes, consider committing them here, for the benefit of future-you.
|
4
|
+
|
5
|
+
The github rendering of the markdown seems to copy&paste acceptably into Google Inbox.
|
6
|
+
|
7
|
+
The [CHANGELOG](https://github.com/puppetlabs/puppet-strings/blob/master/CHANGELOG.md) is a good starting point for finding enhancements and bug-fixes.
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
Subject: [ANN] Puppet Strings vX.Y.Z Release
|
12
|
+
|
13
|
+
Hi all,
|
14
|
+
|
15
|
+
We're pleased to announce that version X.Y.Z of the Puppet Strings is being released today.
|
16
|
+
|
17
|
+
Puppet Strings provides a simple way to extract source documentation into useful docs. It is provided as a Ruby gem to be referenced within modules. See the [README](https://github.com/puppetlabs/puppet-strings#installing-puppet-strings) for documentation on how to install and use it.
|
18
|
+
|
19
|
+
|
20
|
+
The new release of Puppet Strings provides the following enhancements:
|
21
|
+
|
22
|
+
* A
|
23
|
+
* B
|
24
|
+
* C
|
25
|
+
|
26
|
+
The new release also contains the following notable bugfixes:
|
27
|
+
|
28
|
+
* D
|
29
|
+
* E
|
30
|
+
* F
|
31
|
+
|
32
|
+
See the [CHANGELOG](https://github.com/puppetlabs/puppet-strings/blob/master/CHANGELOG.md) for a full list of changes
|
33
|
+
|
34
|
+
We encourage all module developers to review puppet-strings and use it when creating modules.
|
35
|
+
|
36
|
+
Please let us know of your experiences with Puppet Strings, either here, on [Slack](https://slack.puppet.com/) (#forge-modules), or on the [github repo](https://github.com/puppetlabs/puppet-strings).
|
37
|
+
|
38
|
+
|
39
|
+
Thanks,
|
40
|
+
YOUR NAME
|
@@ -3,11 +3,19 @@
|
|
3
3
|
{
|
4
4
|
"name": "klass",
|
5
5
|
"file": "(stdin)",
|
6
|
-
"line":
|
6
|
+
"line": 7,
|
7
7
|
"inherits": "foo::bar",
|
8
8
|
"docstring": {
|
9
9
|
"text": "A simple class.",
|
10
10
|
"tags": [
|
11
|
+
{
|
12
|
+
"tag_name": "todo",
|
13
|
+
"text": "Do a thing"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"tag_name": "note",
|
17
|
+
"text": "Some note"
|
18
|
+
},
|
11
19
|
{
|
12
20
|
"tag_name": "param",
|
13
21
|
"text": "First param.",
|
@@ -44,7 +52,7 @@
|
|
44
52
|
{
|
45
53
|
"name": "dt",
|
46
54
|
"file": "(stdin)",
|
47
|
-
"line":
|
55
|
+
"line": 14,
|
48
56
|
"docstring": {
|
49
57
|
"text": "A simple defined type.",
|
50
58
|
"tags": [
|
@@ -3,11 +3,19 @@
|
|
3
3
|
{
|
4
4
|
"name": "klass",
|
5
5
|
"file": "(stdin)",
|
6
|
-
"line":
|
6
|
+
"line": 7,
|
7
7
|
"inherits": "foo::bar",
|
8
8
|
"docstring": {
|
9
9
|
"text": "A simple class.",
|
10
10
|
"tags": [
|
11
|
+
{
|
12
|
+
"tag_name": "todo",
|
13
|
+
"text": "Do a thing"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"tag_name": "note",
|
17
|
+
"text": "Some note"
|
18
|
+
},
|
11
19
|
{
|
12
20
|
"tag_name": "param",
|
13
21
|
"text": "First param.",
|
@@ -44,7 +52,7 @@
|
|
44
52
|
{
|
45
53
|
"name": "dt",
|
46
54
|
"file": "(stdin)",
|
47
|
-
"line":
|
55
|
+
"line": 14,
|
48
56
|
"docstring": {
|
49
57
|
"text": "A simple defined type.",
|
50
58
|
"tags": [
|
@@ -1,33 +1,35 @@
|
|
1
1
|
# Reference
|
2
2
|
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
|
3
3
|
|
4
|
-
##
|
4
|
+
## Table of Contents
|
5
|
+
|
6
|
+
**Classes**
|
5
7
|
|
6
|
-
|
8
|
+
_Public Classes_
|
7
9
|
|
8
10
|
* [`klass`](#klass): A simple class.
|
9
11
|
|
10
|
-
|
12
|
+
_Private Classes_
|
11
13
|
|
12
14
|
* `noparams`: Overview for class noparams
|
13
15
|
|
14
|
-
|
16
|
+
**Defined types**
|
15
17
|
|
16
18
|
* [`klass::dt`](#klassdt): A simple defined type.
|
17
19
|
|
18
|
-
|
20
|
+
**Resource types**
|
19
21
|
|
20
22
|
* [`apt_key`](#apt_key): Example resource type using the new API.
|
21
23
|
* [`database`](#database): An example database server type.
|
22
24
|
|
23
|
-
|
25
|
+
**Functions**
|
24
26
|
|
25
27
|
* [`func`](#func): A simple Puppet function.
|
26
28
|
* [`func3x`](#func3x): Documentation for an example 3.x function.
|
27
29
|
* [`func4x`](#func4x): An example 4.x function.
|
28
30
|
* [`func4x_1`](#func4x_1): An example 4.x function with only one signature.
|
29
31
|
|
30
|
-
|
32
|
+
**Tasks**
|
31
33
|
|
32
34
|
* [`(stdin)`](#(stdin)): Allows you to backup your database to local file.
|
33
35
|
|
@@ -37,6 +39,10 @@
|
|
37
39
|
|
38
40
|
An overview for a simple class.
|
39
41
|
|
42
|
+
* **TODO** Do a thing
|
43
|
+
|
44
|
+
* **Note** some note
|
45
|
+
|
40
46
|
* **Since** 1.0.0
|
41
47
|
|
42
48
|
* **See also**
|
@@ -1,37 +1,39 @@
|
|
1
1
|
# Reference
|
2
2
|
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
|
3
3
|
|
4
|
-
##
|
4
|
+
## Table of Contents
|
5
|
+
|
6
|
+
**Classes**
|
5
7
|
|
6
|
-
|
8
|
+
_Public Classes_
|
7
9
|
|
8
10
|
* [`klass`](#klass): A simple class.
|
9
11
|
|
10
|
-
|
12
|
+
_Private Classes_
|
11
13
|
|
12
14
|
* `noparams`: Overview for class noparams
|
13
15
|
|
14
|
-
|
16
|
+
**Defined types**
|
15
17
|
|
16
18
|
* [`klass::dt`](#klassdt): A simple defined type.
|
17
19
|
|
18
|
-
|
20
|
+
**Resource types**
|
19
21
|
|
20
22
|
* [`apt_key`](#apt_key): Example resource type using the new API.
|
21
23
|
* [`database`](#database): An example database server type.
|
22
24
|
|
23
|
-
|
25
|
+
**Functions**
|
24
26
|
|
25
27
|
* [`func`](#func): A simple Puppet function.
|
26
28
|
* [`func3x`](#func3x): Documentation for an example 3.x function.
|
27
29
|
* [`func4x`](#func4x): An example 4.x function.
|
28
30
|
* [`func4x_1`](#func4x_1): An example 4.x function with only one signature.
|
29
31
|
|
30
|
-
|
32
|
+
**Tasks**
|
31
33
|
|
32
34
|
* [`(stdin)`](#(stdin)): Allows you to backup your database to local file.
|
33
35
|
|
34
|
-
|
36
|
+
**Plans**
|
35
37
|
|
36
38
|
* [`plann`](#plann): A simple plan.
|
37
39
|
|
@@ -41,6 +43,10 @@
|
|
41
43
|
|
42
44
|
An overview for a simple class.
|
43
45
|
|
46
|
+
* **TODO** Do a thing
|
47
|
+
|
48
|
+
* **Note** some note
|
49
|
+
|
44
50
|
* **Since** 1.0.0
|
45
51
|
|
46
52
|
* **See also**
|
@@ -7,6 +7,8 @@ describe PuppetStrings::Json do
|
|
7
7
|
# Populate the YARD registry with both Puppet and Ruby source
|
8
8
|
YARD::Parser::SourceParser.parse_string(<<-SOURCE, :puppet)
|
9
9
|
# A simple class.
|
10
|
+
# @todo Do a thing
|
11
|
+
# @note Some note
|
10
12
|
# @param param1 First param.
|
11
13
|
# @param param2 Second param.
|
12
14
|
# @param param3 Third param.
|
@@ -9,6 +9,8 @@ describe PuppetStrings::Markdown do
|
|
9
9
|
YARD::Parser::SourceParser.parse_string(<<-SOURCE, :puppet)
|
10
10
|
# An overview for a simple class.
|
11
11
|
# @summary A simple class.
|
12
|
+
# @todo Do a thing
|
13
|
+
# @note some note
|
12
14
|
# @since 1.0.0
|
13
15
|
# @see www.puppet.com
|
14
16
|
# @example This is an example
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-strings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- COMMITTERS.md
|
54
54
|
- CONTRIBUTING.md
|
55
55
|
- Gemfile
|
56
|
+
- HISTORY.md
|
56
57
|
- JSON.md
|
57
58
|
- LICENSE
|
58
59
|
- README.md
|
@@ -84,6 +85,7 @@ files:
|
|
84
85
|
- lib/puppet-strings/tasks.rb
|
85
86
|
- lib/puppet-strings/tasks/generate.rb
|
86
87
|
- lib/puppet-strings/tasks/gh_pages.rb
|
88
|
+
- lib/puppet-strings/version.rb
|
87
89
|
- lib/puppet-strings/yard.rb
|
88
90
|
- lib/puppet-strings/yard/code_objects.rb
|
89
91
|
- lib/puppet-strings/yard/code_objects/base.rb
|
@@ -133,28 +135,36 @@ files:
|
|
133
135
|
- lib/puppet-strings/yard/templates/default/layout/html/setup.rb
|
134
136
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/box_info.erb
|
135
137
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/header.erb
|
138
|
+
- lib/puppet-strings/yard/templates/default/puppet_class/html/note.erb
|
136
139
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/overview.erb
|
137
140
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/setup.rb
|
138
141
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/source.erb
|
139
142
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/summary.erb
|
143
|
+
- lib/puppet-strings/yard/templates/default/puppet_class/html/todo.erb
|
140
144
|
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/box_info.erb
|
141
145
|
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/header.erb
|
146
|
+
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/note.erb
|
142
147
|
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/overview.erb
|
143
148
|
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/setup.rb
|
144
149
|
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/source.erb
|
145
150
|
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/summary.erb
|
151
|
+
- lib/puppet-strings/yard/templates/default/puppet_defined_type/html/todo.erb
|
146
152
|
- lib/puppet-strings/yard/templates/default/puppet_function/html/box_info.erb
|
147
153
|
- lib/puppet-strings/yard/templates/default/puppet_function/html/header.erb
|
154
|
+
- lib/puppet-strings/yard/templates/default/puppet_function/html/note.erb
|
148
155
|
- lib/puppet-strings/yard/templates/default/puppet_function/html/overview.erb
|
149
156
|
- lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb
|
150
157
|
- lib/puppet-strings/yard/templates/default/puppet_function/html/source.erb
|
151
158
|
- lib/puppet-strings/yard/templates/default/puppet_function/html/summary.erb
|
159
|
+
- lib/puppet-strings/yard/templates/default/puppet_function/html/todo.erb
|
152
160
|
- lib/puppet-strings/yard/templates/default/puppet_plan/html/box_info.erb
|
153
161
|
- lib/puppet-strings/yard/templates/default/puppet_plan/html/header.erb
|
162
|
+
- lib/puppet-strings/yard/templates/default/puppet_plan/html/note.erb
|
154
163
|
- lib/puppet-strings/yard/templates/default/puppet_plan/html/overview.erb
|
155
164
|
- lib/puppet-strings/yard/templates/default/puppet_plan/html/setup.rb
|
156
165
|
- lib/puppet-strings/yard/templates/default/puppet_plan/html/source.erb
|
157
166
|
- lib/puppet-strings/yard/templates/default/puppet_plan/html/summary.erb
|
167
|
+
- lib/puppet-strings/yard/templates/default/puppet_plan/html/todo.erb
|
158
168
|
- lib/puppet-strings/yard/templates/default/puppet_provider/html/box_info.erb
|
159
169
|
- lib/puppet-strings/yard/templates/default/puppet_provider/html/collection.erb
|
160
170
|
- lib/puppet-strings/yard/templates/default/puppet_provider/html/features.erb
|
@@ -172,10 +182,12 @@ files:
|
|
172
182
|
- lib/puppet-strings/yard/templates/default/puppet_type/html/box_info.erb
|
173
183
|
- lib/puppet-strings/yard/templates/default/puppet_type/html/features.erb
|
174
184
|
- lib/puppet-strings/yard/templates/default/puppet_type/html/header.erb
|
185
|
+
- lib/puppet-strings/yard/templates/default/puppet_type/html/note.erb
|
175
186
|
- lib/puppet-strings/yard/templates/default/puppet_type/html/overview.erb
|
176
187
|
- lib/puppet-strings/yard/templates/default/puppet_type/html/parameters.erb
|
177
188
|
- lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb
|
178
189
|
- lib/puppet-strings/yard/templates/default/puppet_type/html/summary.erb
|
190
|
+
- lib/puppet-strings/yard/templates/default/puppet_type/html/todo.erb
|
179
191
|
- lib/puppet-strings/yard/templates/default/tags/html/puppet_overload.erb
|
180
192
|
- lib/puppet-strings/yard/templates/default/tags/setup.rb
|
181
193
|
- lib/puppet-strings/yard/util.rb
|
@@ -183,6 +195,7 @@ files:
|
|
183
195
|
- lib/puppet/face/strings.rb
|
184
196
|
- lib/puppet/feature/rgen.rb
|
185
197
|
- lib/puppet/feature/yard.rb
|
198
|
+
- misc/ANNOUNCEMENT_TEMPLATE.md
|
186
199
|
- spec/acceptance/emit_json_options.rb
|
187
200
|
- spec/acceptance/generate_markdown_spec.rb
|
188
201
|
- spec/acceptance/lib/util.rb
|
@@ -230,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
230
243
|
requirements:
|
231
244
|
- - ">="
|
232
245
|
- !ruby/object:Gem::Version
|
233
|
-
version: 2.1.
|
246
|
+
version: 2.1.0
|
234
247
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
235
248
|
requirements:
|
236
249
|
- - ">="
|
@@ -239,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
252
|
requirements:
|
240
253
|
- puppet, >= 4.0.0
|
241
254
|
rubyforge_project:
|
242
|
-
rubygems_version: 2.6
|
255
|
+
rubygems_version: 2.7.6
|
243
256
|
signing_key:
|
244
257
|
specification_version: 4
|
245
258
|
summary: Puppet documentation via YARD
|