(PDOC-184) generate markdown#156
Merged
hunner merged 12 commits intopuppetlabs:masterfrom Feb 20, 2018
Merged
Conversation
This change does a few things: 1. Fixes up new api handler to return the stuff we want 2. Adds all the logic to parse YARD registries into markdown 3. Adds templates for markdown 4. Changes Face cli to use a --format option that can be used for either markdown or json
jbondpdx
approved these changes
Feb 7, 2018
Contributor
jbondpdx
left a comment
There was a problem hiding this comment.
It's so beautiful it makes me want to weep.
eputnam
commented
Feb 7, 2018
| generate_options[:path] = options[:out] if options[:out] | ||
| generate_options[:stdout] = options[:stdout] | ||
| format = options[:format] || "" | ||
| if format.casecmp 'markdown' |
Contributor
Author
There was a problem hiding this comment.
casecmp doesn't do what i thought it did
Contributor
Author
|
need to add --emit-json stuff back in and deprecate done. |
This makes sure the markdown doesn't include section headers that have no content. e.g. '## Classes' does not get put in if there are no classes. Also, we should deprecate --emit-json and --emit-json-stdout instead of just killing them.
This implements the author tag. We also claim to support the 'raise' and 'option' tags, but I don't know that we need to. This also consolidates some code in base.rb and adds docs
Contributor
Author
|
need to implement option and raise tags, remove author tag |
This implements the two remaining tags and removes the author tag. Had to do some deeper plumbing because options per function signature were not being passed along from YARD
pegasd
reviewed
Feb 16, 2018
| describe 'rendering markdown to a file' do | ||
| it 'should output the expected markdown content' do | ||
| Tempfile.open('md') do |file| | ||
| File.open('/Users/eric.putnam/src/puppet-strings/md.md', 'w') do |file| |
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
- Coverage 68.12% 65.57% -2.56%
==========================================
Files 46 57 +11
Lines 1481 1717 +236
==========================================
+ Hits 1009 1126 +117
- Misses 472 591 +119
Continue to review full report at Codecov.
|
464793c to
361d207
Compare
`puppet generate` behavior remains unchanged `puppet generate --format markdown` now defaults to writing to REFERENCE.md and will accept an override from --out `puppet generate --format json` defaults to printing to stdout but will accept the --out param
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change does a few things:
markdown or json