Commit Graph

245 Commits

Author SHA1 Message Date
Ian Kronquist a9a387a05a (PDOC-23) Define JSON Structure for Puppet code 2015-10-16 15:50:04 -07:00
Ian Kronquist 0b0d3c9587 (PDOC-23) Add JSON Registry back end 2015-10-16 15:49:58 -07:00
Hailee Kenney d033183002 Merge pull request #54 from danzilio/gem
(PDOC-28) Make puppet strings available as a gem
2015-10-07 11:00:43 -07:00
Hailee Kenney 5206c8c62e Merge pull request #65 from puppetlabs/metadata_updates
make metadata match pmt output
2015-09-22 16:12:40 -07:00
Morgan Haskel 1078b72119 make metadata match pmt output 2015-09-22 16:11:16 -07:00
Morgan Haskel 336d8f2b26 Merge pull request #64 from HAIL9000/maint/master/prep_for_0.3.1
(maint) Update CHANGELOG and metadata for 0.3.1
2015-09-22 16:05:37 -07:00
Hailee Kenney 7fbb64b912 (maint) Update CHANGELOG and metadata for 0.3.1 2015-09-22 16:03:12 -07:00
Hailee Kenney d965d06bca Merge pull request #61 from iankronquist/same-name-type-and-provider
Same name type and provider
2015-09-21 16:47:34 -07:00
Hailee Kenney 4e1e8cf36d Merge pull request #62 from iankronquist/type-warnings-fixes
Last PR for the Summer
2015-09-21 16:46:28 -07:00
David Schmitt a450bea5c4 Merge pull request #63 from puppetlabs/0.3.0
Release Prep 0.3.0
2015-09-21 14:53:42 +01:00
Jonathan Tripathy dcf22ee93b Release Prep 0.3.0 2015-09-21 14:29:47 +01:00
JT (Jonny) 5aac81981f Merge pull request #58 from iankronquist/0.3.0-changelog
(maint) Update changelog for 0.3.0 release
2015-09-21 14:25:00 +01:00
Ian Kronquist 97acd1b0b3 (PDOC-57) Get the content of the string
We used to extract the string from the source code. We should have extracted
the content of the string. This is the difference between `"String"` and
`String`.
2015-09-18 16:17:29 -07:00
Ian Kronquist 3151e4e1b1 (PDOC-56) Fix type warning for defined types
Puppet defined types would print the string representation of the ruby object,
and not representation you would see in puppet. This is the difference between
`Puppet::Pops::Types::PStringType` and `String`.
2015-09-18 16:17:02 -07:00
David Danzilio 4845bc2a0d (PDOC-28) Naming this gem puppet-strings instead of puppetlabs-strings. 2015-09-18 07:32:43 -04:00
Ian Kronquist 5dd65d3b5e (maint) Add newline for readability 2015-09-16 17:25:49 -07:00
Ian Kronquist c8eec8ded3 (maint) Fix typo in README 2015-09-16 16:49:25 -07:00
Ian Kronquist 7814eeaf3c (PDOC-54) Providers & Types w/same name conflict
If a provider and a type with the same name conflict strings will overwrite the
documentation of one of them with the other. That is if both a provider and a
type are named apt_key, strings will write the type to doc/apt_key.html and the
provider to doc/apt_key.html. The fix is to write the provider to
doc/apt_key_provider.html and the type to doc/apt_key_type.html.
2015-09-16 16:47:59 -07:00
Ian Kronquist 8aab1ea0a3 (maint) Remove debug statement on unusual path 2015-09-16 14:43:27 -07:00
David Danzilio 0431bc7735 (PDOC-28) Porting changes introduced in #46 2015-09-16 13:01:18 -04:00
David Danzilio 023c95ff62 (PDOC-28) Adding email to gemspec 2015-09-16 13:01:15 -04:00
David Danzilio 3974d20612 (PDOC-28) Being picky about spacing 2015-09-16 13:01:10 -04:00
David Danzilio 0dc8d95ce4 (PDOC-28) Adding syntax higlighting. Refactoring the gemspec a bit. 2015-09-16 13:00:59 -04:00
David Danzilio aac19e67b7 (PDOC-28) Make puppet strings available as a gem 2015-09-16 13:00:00 -04:00
Hailee Kenney 3c885cf550 Merge pull request #59 from iankronquist/puppet-type-list-linebreak-pdoc-35
(PDOC-35) Format generated html properly
2015-09-15 15:39:36 -07:00
Hailee Kenney 7c109b231b Merge pull request #60 from iankronquist/types-and-providers-fixes
Types and providers fixes
2015-09-15 15:38:47 -07:00
Ian Kronquist 7f4b81e77b (PDOC-53) Handle directives with no types
Parameter directives with no types will have `tag.type` set to nil. We cannot
append nil to an array, so instead, place it in the array and flatten the
array. If the property is empty the second entry in the array will be nil, as
we expect. If the `tag.type` is an array of types we will have and array with
the form:
	[tag.text, type1, type2, type3, ...]
2015-09-15 09:57:46 -07:00
Ian Kronquist 3a2f70026e (PDOC-52) Fix section on Type directives
This confusion persists from a very old attempt at implementing support for
types and providers.
2015-09-15 09:56:49 -07:00
Ian Kronquist d2c178b59c (PDOC-52) Register docstring after object
In a Puppet type if the user documents a parameter with the directive, then
Yard will read the parameter and think there is an empty docstring there. This
will overwrite the docstring we extracted.
The fix is simple -- overwrite our docstring with theirs, if our docstring
exists at all.
2015-09-15 09:55:50 -07:00
Ian Kronquist 6581da0424 (maint) Update changelog for 0.3.0 release 2015-09-15 09:53:30 -07:00
Ian Kronquist cbc39d758a (maint) Fix README formatting
It was bugging me that the subheader wasn't on its own line.
2015-09-14 12:06:26 -07:00
Ian Kronquist 1b421939d4 (PDOC-35) Format generated html properly
Shaigy Nixon on Jira:
"Just a trivial thing. Looks like one line break is missing from the type's
output html between the property and the allowed values for parameter. Rest all
looks great."
https://tickets.puppetlabs.com/browse/PDOC-35?focusedCommentId=215400&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-215400

As an aside, I would really like to rewrite this method to be a real erb
template and not this nonsense.
2015-09-14 12:03:43 -07:00
Hailee Kenney 782fee5d0b Merge pull request #57 from iankronquist/improve-warnings-pdoc-49
(PDOC-49) Improve warnings
2015-09-11 14:50:04 -07:00
Ian Kronquist e26cb69d36 (PDOC-49) Improve warnings
1. Long warning should be broken onto multiple lines.
2. Warnings should begin with `[warn]:`
2015-09-11 14:30:14 -07:00
Ian Kronquist b00a6cc587 Merge pull request #56 from ferventcoder/ticket/master/PDOC-35-documentation-fixes
(PDOC-35) Clarify types and providers example
2015-09-10 10:54:40 -07:00
Rob Reynolds 0883beadeb (PDOC-35) Clarify types and providers example
- Clarify how desc/doc strings are automatically extracted
- Clarify in the example where my_parameter comes from
- add subheadings to Writing Compatible Documentation
2015-09-10 10:47:12 -05:00
Hailee Kenney 811df7d84d Merge pull request #47 from iankronquist/types-and-providers-docs
(PDOC-35) Document documenting puppet providers
2015-09-09 15:38:07 -07:00
Hailee Kenney 623011fd4a Merge pull request #46 from iankronquist/defined-types-and-providers-pdoc-35
(PDOC-35) Support types and providers
2015-09-09 15:33:33 -07:00
Ian Kronquist 1991475b4c (PDOC-35) Fix formatting from Nick's suggestions
* Float several namevars/ensurables to top of list
* Fix minor code style issues
2015-09-09 15:27:50 -07:00
Ian Kronquist 0206c78ee0 (PDOC-35) Document types & providers separately
* Dunno, I just plowed through a bunch of features
* Expect puppet provider in stats output
* Fetch default values for Type params and props
* Detect allowed values
* Add allowed values to test
* htmlify scrubbed text
* Add features to Type html output
* Add infrastructure for types
* Add methods for generating lists, etc.
* Add provider code object
* Add provider handler
* Generate list for puppet provider dropdown
* Add puppet provider template
* Add provider details to puppet type template
* Get description properly for types
2015-09-09 14:35:45 -07:00
Ian Kronquist 798cd5b816 (PDOC-35) Add a directive for puppet parameters
* Print yard documentation statistics for providers
* Define a directive which takes a type and a name
2015-09-09 14:35:23 -07:00
Ian Kronquist 676364bd17 (PDOC-35) First pass at documenting providers
Adding a provider page and menu
* Add categories to html search bar
* Require provider handler and object classes
* Fetch provider code objects from registry
* Add function to generate the provider list
* Fetch providers from registry in monkey patches
* Add provider templates
* Add provider code object
* Add provider handler
* Add erb file to populate the provider list
* Don't emit type information for providers in html
* Add tests for provider handler

Refactor heredoc:
* Remove heredoc annotations
* Move heredoc functions into a heredoc helper
* Add heredoc helper class
2015-09-09 14:35:02 -07:00
Henrik Lindberg d6c8bc507c Merge pull request #50 from iankronquist/choke-yard-warnings
(PDOC-38) Prevent warnings from being issued twice
2015-09-07 05:28:34 -07:00
Henrik Lindberg eeeb89f565 Merge pull request #53 from iankronquist/fix-defined-function-crash
(PDOC-45) Puppet 4x functions handle unusual names
2015-09-07 05:25:16 -07:00
Ian Kronquist 11e016e81e (PDOC-38) Prevent warnings from being issued twice
Since we threw away all of Yard's warnings we are no longer checking that the
parameter names match for Ruby methods. Thus we need to override Yard's
method_details template with our own to trigger our warning function. However,
there's a catch. If this ruby method is in a Puppet 4x function, we don't want
our warning function to trigger because the user has already been warned. Look
in the registry to see if there is already a Puppet 4x function with the same
name registered.

Also, print errors to stderr instead of using log.warn.
2015-09-04 14:45:08 -07:00
Ian Kronquist c4a1a10c67 (PDOC-45) Test Puppet 4x functions don't throw
Parsing puppet 4x functions with symbols for their names like :'defined' should
not raise ParseErrorWithIssue, or anything for that matter.
2015-09-01 15:42:37 -07:00
Ian Kronquist 84a215d599 (PDOC-45) Puppet 4x functions handle unusual names
`lib/puppet/functions/defined.rb` has some unusual syntax:

	Puppet::Functions.create_function(:'defined', ....

It runs, so apparently this is legal.
2015-09-01 15:31:13 -07:00
Ian Kronquist 346832a5f8 Merge pull request #51 from roidelapluie/master
(MAINT) Add a space between a parameter name type and its description
2015-08-31 09:48:44 -07:00
Julien Pivotto 005a3112c9 (MAINT) Add a space between a parameter name type and its description
Before this commit:

    packages (Array[String])- A list of packages to be installed

With this commit:

    packages (Array[String]) - A list of packages to be installed
2015-08-31 12:27:28 +02:00
Ian Kronquist f052675088 (PDOC-38) Add parameter mismatch warnings for 4.x 2015-08-21 10:36:31 -07:00