summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface/documentation.rb
Commit message (Collapse)AuthorAgeFilesLines
* (#7828) Fix whitespace in synopsis generator.Daniel Pittman2011-06-071-0/+31
| | | | | | | | | | | | | | | | We accidentally omitted whitespace between multiple options while building the synopsis. This fixes that, by introducing a breakable space in the right location. Additionally, we extract the code that was 99 percent identical from the face and action synopsis generators, push it down into the documentation module, and then invoke it from both places. This eliminates the duplicate code, allowing me to fix that bug once and have it apply to both parts of the code; this is pretty much assured to be true any time we change the synopsis generation. Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
* Maint: Fix ellipses for short descriptionsnfagerlund2011-05-261-1/+3
| | | | | | | | | | | Previously, we were adding ellipsis to any short_description, which was misleading; they were only necessary when we were truncating in the _middle_ of a paragraph. This commit changes the behavior, and updates the tests to show when we expect ellipsis. Paired-with: Matt Robinson <matt@puppetlabs.com>
* (#7326) Fix faces on Ruby 1.8.5Daniel Pittman2011-05-031-1/+4
| | | | | | Turns out that String#each_line on Ruby 1.8.5 only takes a block, and will not return an enumerable. Rewrite to use split(/\n/) which has the same effect but works on all our platforms.
* (#7221) Strip bad whitespace from face and action docs.Daniel Pittman2011-04-291-41/+63
| | | | | | | | | | | | We now strip whitespace in face (and related) documentation in two places: We strip any trailing whitespace on each line, just because. We strip any leading indent, but not all leading whitespace, from the text. That is, we strip the *minimum* amount of whitespace that we can take from every line in the documentation without changing the overall content. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* (#6962) Finish documentation API on Face options.Daniel Pittman2011-04-271-1/+5
| | | | | | | This extends the last of the documentation support, down into options, so they can be described as expected. In the process we split out the modular docs API into a full and short version options only want short docs, but the behaviours are identical to the full version.
* (#6962) Move documentation support into a module.Daniel Pittman2011-04-261-0/+168
Given that we have identical documentation behaviour in the face and action code, it should properly be written once. So, move it into a module, extend the other classes with it, and have done.