Commit Graph

519 Commits

Author SHA1 Message Date
jbondpdx fe893a9c57 remove duplicated docs from README, refer to docs site 2018-05-10 16:44:10 -07:00
Jean B 382658404b
Merge pull request #177 from eputnam/update_docs
(maint) update various documentation
2018-05-10 16:14:06 -07:00
Eric Putnam 8bfcdffbaa
(maint) update various documentation
This updates various docs in the project.
* Get rid of MAINTAINERS
* Update JSON.md with tasks and plans
* Fix some weirndess in the README
* Polish CONTRIBUTING.md
2018-04-25 09:41:52 +01:00
willmeek d4e743dbad
Merge pull request #175 from eputnam/pdoc238
(PDOC-238) add generated message to markdown
2018-04-23 16:33:46 +01:00
willmeek 8ce914ee71
Merge pull request #176 from eputnam/pdoc36
(PDOC-36) fix hack for README urls
2018-04-23 16:33:31 +01:00
Eric Putnam 5d2c4411ca
(PDOC-36) fix hack for README urls
Discovered that this hack was finding broken links and then replacing all instances of the link text in the README. This led to a lot of non-links being affected. This patch works harder to match only actual links and works as far as I can tell.
2018-04-23 16:06:29 +01:00
Eric Putnam 2d59213b34
(PDOC-238) add generated message to markdown
Currently there is no evidence in REFERENCE.md itself that it was generated and should not be edited. This adds a comment in the markdown, so as not to disrupt its rendered appearance but still communicate to the user when editing that the file is generated.
2018-04-20 16:25:40 +01:00
willmeek 2ec1b24051
Merge pull request #174 from eputnam/pdoc240
(PDOC-240) add handling for :array node type in rsapi_handler
2018-04-20 15:17:22 +01:00
Eric Putnam 9a1a0b4af6
(PDOC-240) add handling for :array node type in rsapi_handler
The 'features' key in the resource api expects an array of feature names. Currently, if you run strings on a resource api type that specifies features, it falls over because it doesn't know what to do with an AST node of type :array. Further, the method that throws the error is looking for an undefined variable called 'parameters'. This removes the odd conditional that calls 'parameters' and adds a method that returns an array of the array contents that may be passed to features. Features are not currently sent to the renderer, but now Strings will be able to handle any array it comes across in an rsapi type.
2018-04-20 15:06:58 +01:00
willmeek 09a240dd87
Merge pull request #173 from eputnam/pdoc159
(PDOC-159) server urls fix
2018-04-20 14:24:18 +01:00
Eric Putnam e63f1c3142
(PDOC-159) server urls fix
When using `puppet strings server`, resources with names containing '::' end up 404ing from the left bar. This is because strings namespaces these objects but YARD does not when building URLs.
e.g. foo::bar's url should be /doc/foo/puppet_classes/foo/bar.html but
ends up instead being doc/foo/puppet_classes/foo_3A_3A_bar.html because
of YARD's url encoding. This is a monkey patch, courtesy @domcleal, that
decodes the urls back so that they are namespaced correctly.
2018-04-16 12:22:50 +01:00
Eric Putnam db7ac68870
Merge pull request #172 from jbondpdx/readme-edit-2
Readme edit 2
2018-04-11 18:43:47 +01:00
jbondpdx 625dd18cb8 fixes an ol and adds defined type example 2018-04-11 10:40:23 -07:00
jbondpdx 0b52e521de fixes for new readme edits 2018-04-11 09:15:33 -07:00
jbondpdx 11b9c81c7d Merge branch 'master' of https://github.com/puppetlabs/puppet-strings into readme-edit-2 2018-04-10 16:32:42 -07:00
jbondpdx 24edc85143 second edit on README 2018-04-10 16:32:28 -07:00
Hunter Haugen 99c53d1707
Merge pull request #171 from eputnam/plans_toc
(maint) display Plans in markdown table of contents
2018-04-04 14:55:01 -07:00
Eric Putnam d4ca490d1b
(maint) display Plans in markdown table of contents
Currently, Plans are not being included in the table of contents in the
markdown output. This is because Plans were not being passed to the
table of contents renderer. This adds Plans to the renderer and updates
tests accordingly.
2018-04-03 13:37:47 +01:00
Eric Putnam a4e915002b
Merge pull request #170 from JohnLyman/markdown-compatibility
(PDOC-233) markdown whitespace fixes
2018-04-03 02:22:24 -07:00
John Lyman 6ba0350928 (PDOC-233) Simplify logic for white space formatting of summary
Instead of specifying white space after each conditional, just add a
blank line at the end of the conditional similar to the `function.erb`
template.
2018-03-30 13:02:59 +00:00
John Lyman ca26677cad (PDOC-233) Make markdown white space formatting consistent
Replace arbitrary double blank lines with a single blank lines.
2018-03-30 13:02:59 +00:00
John Lyman d9065e6f2e (PDOC-233) Increase chances of markdown rendering correctly
Some variants of markdown do not convert atx-style headers correctly
unless they are surrounded by blank lines.  This commit adds blank lines
to increase chances of rendering when using those variants while still
maintaining compatibly with variants that do not require the surrounding
blank lines.  Also increases readability when viewing the raw markdown
file.
2018-03-30 13:02:35 +00:00
Hunter Haugen 6eec1544f7
Merge pull request #168 from eputnam/_pdoc228
(PDOC-228) puppet plan support
2018-03-29 10:22:50 -07:00
Hunter Haugen 9345611078
Merge pull request #169 from eputnam/pdoc229
(PDOC-229) fix error with return_type and @return
2018-03-29 10:06:31 -07:00
Eric Putnam baf000b07e
(PDOC-229) fix error with return_type and @return
Currently, if the user is documenting a Puppet 4 type custom function and they try to use the return_type method without also including an @return tag, Strings will throw an error. This is caused by the function handler trying to add a type to a return tag on the function object that doesn't exist. To fix the problem, if you are using return_type, the handler will now add an empty return tag first if one does not exist.
2018-03-29 08:48:52 -07:00
Eric Putnam da5cad7cb1
(PDOC-228) puppet plans support
Currently, Puppet Strings only supports Puppet Tasks. Since Plans are
sort of connected to Tasks, it seemed right that Strings should also
support Plans. That and Plans are a thing that needs to be documented.

First, the Puppet[:tasks] setting needs to be set to add the 'plan' keyword to the Puppet Parser's lexicon, so this sets it in the Strings parser if the setting exists. If it does not exist and Puppet.version is less than 5.0.0, Strings will error out.

Second, processing for the Plans themselves is set up. Plans are very
similar to other Puppet objects like defined types and classes, so this
involved some serious copy-pasta.

Third, all the template/to_hash scaffolding for the different outputs is in place (HTML,
JSON, Markdown).

Yey.
2018-03-27 09:59:20 -07:00
Hunter Haugen e37c8b70ae
Merge pull request #167 from eputnam/pdoc36
(PDOC-36) hack to fix README links in generated HTML
2018-03-26 17:03:39 -07:00
Hunter Haugen 414d124d18
Merge pull request #166 from eputnam/pdoc192
(PDOC-192) remove warning for title/name
2018-03-26 17:02:26 -07:00
Hunter Haugen 5407e4e48d
Merge pull request #155 from eputnam/missing_doc_warn
(maint) add condition for misleading warning
2018-03-26 16:39:03 -07:00
Eric Putnam 3076ac6187
Merge pull request #165 from jbondpdx/readme-edit
first edit pass README
2018-03-22 16:23:37 -07:00
Eric Putnam c56ee788b5
(PDOC-192) remove warning for title/name
Currently, if a user attempts to document the title or name params, Strings will throw a warning saying that these parameters are missing from the class/type. Of course, they aren't, they just may not be explicit. This removes the warning if the param name is 'name' or 'title'.
2018-03-22 16:07:24 -07:00
Eric Putnam 37cfe49f95
(PDOC-36) hack to fix README links in generated HTML 2018-03-22 15:39:38 -07:00
jbondpdx 1a778da8b0 more fixes 2018-03-22 14:46:54 -07:00
Hunter Haugen 67f249c8ea
Merge pull request #164 from eputnam/update_travis
(PDOC-223) prepare travis for dropping old version support
2018-03-22 13:35:29 -07:00
jbondpdx 911c1ccef5 more edits and big revision on Rake instructions 2018-03-22 12:55:06 -07:00
Eric Putnam be444fa6ad
(PDOC-223) revert rsapi changes and remove markdown test
First, there were some rspec problems we originally connected to directory naming (e.g. 'yard'), but now we think it's a possible bug in rspec (https://github.com/rspec/rspec-core/issues/2184). this removes the markdown_spec.rb test that was both triggering the bug and, as it turns out, is an unnecessary test.

Reverted some of the changes made to the rsapi handler during markdown
output work. Those changes were made because of a typo in the spec
tests, so the typo has been fixed and most of the handler returned to
its original state.
2018-03-22 11:35:37 -07:00
Eric Putnam 2a5d23f82b
(PDOC-223) prepare travis for dropping old version support
This gets rid of test cells for old versions of ruby (< 2.1.9) and old versions of puppet (< 4) and also updates the test command to run all 100+ unit tests instead of a whopping 27 that rake spec runs
2018-03-22 11:34:19 -07:00
jbondpdx a7331fa956 update edits 2018-03-21 12:19:41 -07:00
Jesse Scott 76b337a1e4
Merge pull request #161 from eputnam/_pdoc206
(PDOC-206) support for tasks
2018-03-21 11:30:43 -07:00
jbondpdx ed14888af8 first edit pass README 2018-03-19 17:27:23 -07:00
Eric Putnam 738275b9e7
(PDOC-206) support for Puppet Tasks
Currently, puppet-strings does not know how to generate documentation
for Puppet Tasks. This does all the work to add support for Tasks
including a new JSON parser, a task handler, task statement, and task code
object. Basically, Strings reads the JSON using the native ruby json
parser and sends values through in a way it understands. It is only
passing json key/value pairs through, nothing is happening with tags at
this time. You can now document Tasks and generate HTML, Markdown, or
JSON output.
2018-03-19 11:37:00 -07:00
Hunter Haugen 7900b73a35
Merge pull request #163 from eputnam/master
release 1.2.1
2018-03-01 10:17:48 -08:00
Eric Putnam bc42c78341
release 1.2.1 2018-03-01 10:15:03 -08:00
Eric Putnam e18217b0ca
Merge pull request #162 from ekohl/fix-emit-output
(PDOC-224) Handle --emit-json(-stdout) again
2018-03-01 10:09:22 -08:00
Ewoud Kohl van Wijngaarden 9728d1004a
(PDOC-224) Handle --emit-json(-stdout) again 2018-03-01 18:28:48 +01:00
David Schmitt 47e57418e5
Merge pull request #160 from eputnam/master
(PDOC-222) Release 1.2.0 prep and sundries
2018-02-28 18:52:55 +00:00
Eric Putnam dde16375d0
(maint) actually update rake task 2018-02-27 16:32:33 -08:00
Eric Putnam 567ee8aac9
hold off on gcg
The version of github changelog generator we want to use requires a
version of Ruby we can't yet guarantee. This reverts all the plumbing
for gcg while still committing the changelog
2018-02-27 10:31:00 -08:00
Eric Putnam 6ffefc472b
release prep and gcg config 2018-02-26 16:36:41 -08:00
Eric Putnam 784c32c979
(maint) update rake tasks 2018-02-26 15:36:28 -08:00