puppet-strings 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -2
- data/lib/puppet-strings.rb +2 -2
- data/lib/puppet-strings/markdown.rb +1 -1
- data/lib/puppet-strings/markdown/base.rb +6 -0
- data/lib/puppet-strings/markdown/data_type.rb +16 -0
- data/lib/puppet-strings/markdown/resource_type.rb +19 -2
- data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +4 -4
- data/lib/puppet-strings/markdown/templates/data_type.erb +11 -4
- data/lib/puppet-strings/markdown/templates/data_type_function.erb +67 -0
- data/lib/puppet-strings/markdown/templates/function.erb +2 -1
- data/lib/puppet-strings/markdown/templates/puppet_task.erb +1 -1
- data/lib/puppet-strings/markdown/templates/resource_type.erb +12 -12
- data/lib/puppet-strings/markdown/templates/table_of_contents.erb +6 -6
- data/lib/puppet-strings/version.rb +1 -1
- data/lib/puppet-strings/yard/code_objects/data_type.rb +26 -6
- data/lib/puppet-strings/yard/code_objects/type.rb +46 -5
- data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +190 -43
- data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +6 -0
- data/lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb +1 -1
- data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +9 -1
- data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +3 -1
- metadata +4 -46
- data/CODEOWNERS +0 -1
- data/Gemfile +0 -53
- data/HISTORY.md +0 -218
- data/JSON.md +0 -832
- data/Rakefile +0 -160
- data/codecov.yml +0 -3
- data/misc/ANNOUNCEMENT_TEMPLATE.md +0 -40
- data/spec/acceptance/emit_json_options_spec.rb +0 -69
- data/spec/acceptance/generate_markdown_spec.rb +0 -47
- data/spec/acceptance/running_strings_generate_spec.rb +0 -88
- data/spec/fixtures/acceptance/modules/test/functions/add.pp +0 -9
- data/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb +0 -5
- data/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb +0 -2
- data/spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb +0 -9
- data/spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb +0 -15
- data/spec/fixtures/acceptance/modules/test/manifests/init.pp +0 -31
- data/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp +0 -27
- data/spec/fixtures/acceptance/modules/test/metadata.json +0 -10
- data/spec/fixtures/acceptance/modules/test/types/elephant.pp +0 -2
- data/spec/fixtures/unit/markdown/output.md +0 -561
- data/spec/fixtures/unit/markdown/output_with_data_types.md +0 -606
- data/spec/fixtures/unit/markdown/output_with_plan.md +0 -595
- data/spec/spec_helper.rb +0 -49
- data/spec/spec_helper_acceptance.rb +0 -58
- data/spec/spec_helper_acceptance_local.rb +0 -10
- data/spec/unit/puppet-strings/describe_spec.rb +0 -141
- data/spec/unit/puppet-strings/json_spec.rb +0 -302
- data/spec/unit/puppet-strings/markdown/base_spec.rb +0 -146
- data/spec/unit/puppet-strings/markdown_spec.rb +0 -374
- data/spec/unit/puppet-strings/yard/code_objects/task_spec.rb +0 -92
- data/spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb +0 -116
- data/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +0 -217
- data/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb +0 -65
- data/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +0 -231
- data/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +0 -315
- data/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb +0 -309
- data/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +0 -746
- data/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +0 -158
- data/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +0 -235
- data/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +0 -311
- data/spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb +0 -72
- data/spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb +0 -56
- data/spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb +0 -251
- data/spec/unit/puppet-strings/yard/util_spec.rb +0 -48
@@ -1,5 +1,13 @@
|
|
1
1
|
# Initializes the template.
|
2
2
|
# @return [void]
|
3
3
|
def init
|
4
|
-
sections :header, :box_info, :summary, :overview, :note, :todo, T('tags'), :source
|
4
|
+
sections :header, :box_info, :summary, :overview, :note, :todo, T('tags'), :method_details_list, [T('method_details')], :source
|
5
|
+
end
|
6
|
+
|
7
|
+
def method_listing
|
8
|
+
sort_listing(object.functions)
|
9
|
+
end
|
10
|
+
|
11
|
+
def sort_listing(list)
|
12
|
+
list.sort_by {|o| [o.scope.to_s, o.name.to_s.downcase] }
|
5
13
|
end
|
@@ -16,7 +16,9 @@ end
|
|
16
16
|
def properties
|
17
17
|
# Properties are the same thing as parameters (from the documentation standpoint),
|
18
18
|
# so reuse the same template but with a different title and data source.
|
19
|
-
|
19
|
+
#
|
20
|
+
# "checks" such as "creates" and "onlyif" are another type of property
|
21
|
+
@parameters = (object.properties || []) + (object.checks || [])
|
20
22
|
@parameters.sort_by! { |p| p.name }
|
21
23
|
@tag_title = 'Properties'
|
22
24
|
erb(:parameters)
|
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.5.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: 2020-
|
11
|
+
date: 2020-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -50,16 +50,10 @@ extra_rdoc_files:
|
|
50
50
|
- README.md
|
51
51
|
files:
|
52
52
|
- CHANGELOG.md
|
53
|
-
- CODEOWNERS
|
54
53
|
- COMMITTERS.md
|
55
54
|
- CONTRIBUTING.md
|
56
|
-
- Gemfile
|
57
|
-
- HISTORY.md
|
58
|
-
- JSON.md
|
59
55
|
- LICENSE
|
60
56
|
- README.md
|
61
|
-
- Rakefile
|
62
|
-
- codecov.yml
|
63
57
|
- lib/puppet-strings.rb
|
64
58
|
- lib/puppet-strings/describe.rb
|
65
59
|
- lib/puppet-strings/json.rb
|
@@ -82,6 +76,7 @@ files:
|
|
82
76
|
- lib/puppet-strings/markdown/table_of_contents.rb
|
83
77
|
- lib/puppet-strings/markdown/templates/classes_and_defines.erb
|
84
78
|
- lib/puppet-strings/markdown/templates/data_type.erb
|
79
|
+
- lib/puppet-strings/markdown/templates/data_type_function.erb
|
85
80
|
- lib/puppet-strings/markdown/templates/function.erb
|
86
81
|
- lib/puppet-strings/markdown/templates/puppet_task.erb
|
87
82
|
- lib/puppet-strings/markdown/templates/resource_type.erb
|
@@ -157,6 +152,7 @@ files:
|
|
157
152
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/todo.erb
|
158
153
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/box_info.erb
|
159
154
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/header.erb
|
155
|
+
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb
|
160
156
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/note.erb
|
161
157
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/overview.erb
|
162
158
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb
|
@@ -227,44 +223,6 @@ files:
|
|
227
223
|
- lib/puppet/face/strings.rb
|
228
224
|
- lib/puppet/feature/rgen.rb
|
229
225
|
- lib/puppet/feature/yard.rb
|
230
|
-
- misc/ANNOUNCEMENT_TEMPLATE.md
|
231
|
-
- spec/acceptance/emit_json_options_spec.rb
|
232
|
-
- spec/acceptance/generate_markdown_spec.rb
|
233
|
-
- spec/acceptance/running_strings_generate_spec.rb
|
234
|
-
- spec/fixtures/acceptance/modules/test/functions/add.pp
|
235
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb
|
236
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb
|
237
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb
|
238
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb
|
239
|
-
- spec/fixtures/acceptance/modules/test/manifests/init.pp
|
240
|
-
- spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp
|
241
|
-
- spec/fixtures/acceptance/modules/test/metadata.json
|
242
|
-
- spec/fixtures/acceptance/modules/test/types/elephant.pp
|
243
|
-
- spec/fixtures/unit/markdown/output.md
|
244
|
-
- spec/fixtures/unit/markdown/output_with_data_types.md
|
245
|
-
- spec/fixtures/unit/markdown/output_with_plan.md
|
246
|
-
- spec/spec_helper.rb
|
247
|
-
- spec/spec_helper_acceptance.rb
|
248
|
-
- spec/spec_helper_acceptance_local.rb
|
249
|
-
- spec/unit/puppet-strings/describe_spec.rb
|
250
|
-
- spec/unit/puppet-strings/json_spec.rb
|
251
|
-
- spec/unit/puppet-strings/markdown/base_spec.rb
|
252
|
-
- spec/unit/puppet-strings/markdown_spec.rb
|
253
|
-
- spec/unit/puppet-strings/yard/code_objects/task_spec.rb
|
254
|
-
- spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb
|
255
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb
|
256
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb
|
257
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb
|
258
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb
|
259
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb
|
260
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb
|
261
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb
|
262
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb
|
263
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb
|
264
|
-
- spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb
|
265
|
-
- spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb
|
266
|
-
- spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb
|
267
|
-
- spec/unit/puppet-strings/yard/util_spec.rb
|
268
226
|
homepage: https://github.com/puppetlabs/puppet-strings
|
269
227
|
licenses:
|
270
228
|
- Apache-2.0
|
data/CODEOWNERS
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
* @puppet-strings-maintainers
|
data/Gemfile
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem 'rgen'
|
6
|
-
gem 'redcarpet'
|
7
|
-
gem 'yard', '~> 0.9.11'
|
8
|
-
|
9
|
-
if ENV['PUPPET_GEM_VERSION']
|
10
|
-
gem 'puppet', ENV['PUPPET_GEM_VERSION'], :require => false
|
11
|
-
else
|
12
|
-
gem 'puppet', :require => false
|
13
|
-
end
|
14
|
-
|
15
|
-
group :test do
|
16
|
-
gem 'codecov'
|
17
|
-
gem 'mocha'
|
18
|
-
gem 'puppetlabs_spec_helper'
|
19
|
-
gem 'serverspec'
|
20
|
-
gem 'simplecov-console'
|
21
|
-
gem 'rspec', '~> 3.1'
|
22
|
-
gem 'json_spec', '~> 1.1', '>= 1.1.5'
|
23
|
-
end
|
24
|
-
|
25
|
-
group :acceptance do
|
26
|
-
# Litmus has dependencies which require Ruby 2.5 (Puppet 6) or above.
|
27
|
-
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.5.0')
|
28
|
-
# Until https://github.com/puppetlabs/puppet_litmus/pull/248 is merged we need to use the source of the
|
29
|
-
# of the PR. Not the greatest and prone to error, but without it, all litmus based testing is broken.
|
30
|
-
# This can be reverted once this PR is merged and Litmus is released with this fix.
|
31
|
-
gem 'puppet_litmus', git: 'https://github.com/michaeltlombardi/puppet_litmus', ref: 'maint/master/fix-upload-file'
|
32
|
-
gem 'net-ssh', '~> 5.2'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
group :development do
|
37
|
-
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')
|
38
|
-
gem 'pry'
|
39
|
-
gem 'pry-byebug'
|
40
|
-
end
|
41
|
-
|
42
|
-
gem 'rubocop-rspec'
|
43
|
-
gem 'rubocop', '~> 0.57.2'
|
44
|
-
|
45
|
-
# Evaluate Gemfile.local if it exists
|
46
|
-
if File.exists? "#{__FILE__}.local"
|
47
|
-
eval(File.read("#{__FILE__}.local"), binding)
|
48
|
-
end
|
49
|
-
|
50
|
-
# Evaluate ~/.gemfile if it exists
|
51
|
-
if File.exists?(File.join(Dir.home, '.gemfile'))
|
52
|
-
eval(File.read(File.join(Dir.home, '.gemfile')), binding)
|
53
|
-
end
|
data/HISTORY.md
DELETED
@@ -1,218 +0,0 @@
|
|
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/JSON.md
DELETED
@@ -1,832 +0,0 @@
|
|
1
|
-
Puppet Strings JSON Data
|
2
|
-
========================
|
3
|
-
|
4
|
-
Puppet Strings can generate JSON to STDOUT with the `--format` option:
|
5
|
-
```shell
|
6
|
-
puppet strings generate --format json
|
7
|
-
```
|
8
|
-
|
9
|
-
Document Schema
|
10
|
-
===============
|
11
|
-
|
12
|
-
At the top level, there are nine arrays in the JSON document:
|
13
|
-
|
14
|
-
| Document Key | Description |
|
15
|
-
| ----------------- | ----------------------------------------------------------------------------- |
|
16
|
-
| puppet_classes | The list of Puppet classes that were parsed. |
|
17
|
-
| data_types | The list of data types that were parsed. |
|
18
|
-
| data_type_aliases | | The list of data types that were parsed. |
|
19
|
-
| defined_types | The list of defined types that were parsed. |
|
20
|
-
| resource_types | The list of resource types that were parsed. |
|
21
|
-
| providers | The list of resource providers that were parsed. |
|
22
|
-
| puppet_functions | The list of Puppet functions (4.x, 4.x and Puppet language) that were parsed. |
|
23
|
-
| puppet_tasks | The list of Puppet tasks that were parsed. |
|
24
|
-
| puppet_plans | The list of Puppet plans that were parsed. |
|
25
|
-
|
26
|
-
Puppet Classes
|
27
|
-
--------------
|
28
|
-
|
29
|
-
Each entry in the `puppet_classes` list is an object with the following attributes:
|
30
|
-
|
31
|
-
| Attribute Key | Description |
|
32
|
-
| ------------- | ----------------------------------------------------- |
|
33
|
-
| name | The name of the Puppet class. |
|
34
|
-
| file | The file defining the Puppet class. |
|
35
|
-
| line | The line where the Puppet class is defined. |
|
36
|
-
| inherits | The name of the Puppet class the class inherits from. |
|
37
|
-
| docstring | The *DocString* object for the class (see below). |
|
38
|
-
| defaults | The map of parameter names to default values. |
|
39
|
-
| source | The Puppet source code for the class. |
|
40
|
-
|
41
|
-
Data Types
|
42
|
-
----------
|
43
|
-
|
44
|
-
Each entry in the `data_types` list is an object with the following attributes:
|
45
|
-
|
46
|
-
| Attribute Key | Description |
|
47
|
-
| ------------- | ----------------------------------------------------------- |
|
48
|
-
| name | The name of the data type. |
|
49
|
-
| file | The file defining the data type. |
|
50
|
-
| line | The line where the data type is data. |
|
51
|
-
| docstring | The *DocString* object for the data type (see below). |
|
52
|
-
| defaults | The map of parameter names to default values. |
|
53
|
-
| source | The ruby source code for the data type. (Not Implemented) |
|
54
|
-
|
55
|
-
Data Type Aliases
|
56
|
-
-----------------
|
57
|
-
|
58
|
-
Each entry in the `data_type_aliases` list is an object with the following attributes:
|
59
|
-
|
60
|
-
| Attribute Key | Description |
|
61
|
-
| ------------- | ----------------------------------------------------------------- |
|
62
|
-
| name | The name of the data type. |
|
63
|
-
| file | The file defining the data type. |
|
64
|
-
| line | The line where the data type is defined. |
|
65
|
-
| docstring | The *DocString* object for the data type (see below). |
|
66
|
-
| alias_of | The actual type this is an alias of. |
|
67
|
-
| source | The Puppet source code for the data type alias. (Not Implemented) |
|
68
|
-
|
69
|
-
Defined Types
|
70
|
-
-------------
|
71
|
-
|
72
|
-
Each entry in the `defined_types` list is an object with the following attributes:
|
73
|
-
|
74
|
-
| Attribute Key | Description |
|
75
|
-
| ------------- | -------------------------------------------------------- |
|
76
|
-
| name | The name of the defined type. |
|
77
|
-
| file | The file defining the defined type. |
|
78
|
-
| line | The line where the defined type is defined. |
|
79
|
-
| docstring | The *DocString* object for the defined type (see below). |
|
80
|
-
| defaults | The map of parameter names to default values. |
|
81
|
-
| source | The Puppet source code for the defined type. |
|
82
|
-
|
83
|
-
Resource Types
|
84
|
-
--------------
|
85
|
-
|
86
|
-
Each entry in the `resource_types` list is an object with the following attributes:
|
87
|
-
|
88
|
-
| Attribute Key | Description |
|
89
|
-
| ------------- | --------------------------------------------------------- |
|
90
|
-
| name | The name of the resource type. |
|
91
|
-
| file | The file defining the resource type. |
|
92
|
-
| line | The line where the resource type is defined. |
|
93
|
-
| docstring | The *DocString* object for the resource type (see below). |
|
94
|
-
| properties | The list of properties for the resource type (see below). |
|
95
|
-
| parameters | The list of parameters for the resource type (see below). |
|
96
|
-
| features | The list of features for the resource type (see below). |
|
97
|
-
|
98
|
-
Each entry in the `properties` list is an object with the following attributes:
|
99
|
-
|
100
|
-
| Attribute Key | Description |
|
101
|
-
| ------------- | ------------------------------------------------------- |
|
102
|
-
| name | The name of the property. |
|
103
|
-
| description | The description of the property. |
|
104
|
-
| values | The array of acceptable string values for the property. |
|
105
|
-
| aliases | The map of new values aliased to existing values. |
|
106
|
-
| isnamevar | True if the property is a namevar or false if not. |
|
107
|
-
| default | The default value for the property. |
|
108
|
-
|
109
|
-
Each entry in the `parameters` list is an object with the following attributes:
|
110
|
-
|
111
|
-
| Attribute Key | Description |
|
112
|
-
| ------------- | -------------------------------------------------------- |
|
113
|
-
| name | The name of the parameter. |
|
114
|
-
| description | The description of the parameter. |
|
115
|
-
| values | The array of acceptable string values for the parameter. |
|
116
|
-
| aliases | The map of new values aliased to existing values. |
|
117
|
-
| isnamevar | True if the parameter is a namevar or false if not. |
|
118
|
-
| default | The default value for the parameter. |
|
119
|
-
|
120
|
-
Each entry in the `features` list is an object with the following attributes:
|
121
|
-
|
122
|
-
| Attribute Key | Description |
|
123
|
-
| ------------- | ------------------------------- |
|
124
|
-
| name | The name of the feature. |
|
125
|
-
| description | The description of the feature. |
|
126
|
-
|
127
|
-
Providers
|
128
|
-
---------
|
129
|
-
|
130
|
-
Each entry in the `providers` list is an object with the following attributes:
|
131
|
-
|
132
|
-
| Attribute Key | Description |
|
133
|
-
| ------------- | ---------------------------------------------------- |
|
134
|
-
| name | The name of the provider. |
|
135
|
-
| type_name | The name of the resource type of the provider. |
|
136
|
-
| file | The file defining the provider. |
|
137
|
-
| line | The line where the provider is defined. |
|
138
|
-
| docstring | The *DocString* object for the provider (see below). |
|
139
|
-
| confines | The string map of confines for the provider. |
|
140
|
-
| features | The list of features implemented by the provider. |
|
141
|
-
| defaults | The list of lists of "default for" for the provider. |
|
142
|
-
| commands | The string map of commands for the provider. |
|
143
|
-
|
144
|
-
Puppet Functions
|
145
|
-
----------------
|
146
|
-
|
147
|
-
Each entry in the `puppet_functions` list is an object with the following attributes:
|
148
|
-
|
149
|
-
| Attribute Key | Description |
|
150
|
-
| ------------- | ----------------------------------------------------------------------------- |
|
151
|
-
| name | The name of the function. |
|
152
|
-
| file | The file defining the function. |
|
153
|
-
| line | The line where the function is defined. |
|
154
|
-
| type | The function type (e.g. ruby3x, ruby4x, puppet). |
|
155
|
-
| signatures | A list of Puppet signatures of the function, including overloads if present. |
|
156
|
-
| docstring | The *DocString* object for the function (see below). |
|
157
|
-
| defaults | The map of parameter names to default values. |
|
158
|
-
| source | The source code for the function. |
|
159
|
-
|
160
|
-
Puppet Tasks
|
161
|
-
------------
|
162
|
-
|
163
|
-
Each entry in the `puppet_tasks` list is an object with the following attributes:
|
164
|
-
|
165
|
-
| Attribute Key | Description |
|
166
|
-
| ------------- | ----------------------------------------------------------------------------- |
|
167
|
-
| name | The name of the task. |
|
168
|
-
| file | The file defining the task. |
|
169
|
-
| line | The line where the task is defined. |
|
170
|
-
| docstring | The *DocString* object for the task (see below). |
|
171
|
-
| source | The source code for the task. |
|
172
|
-
| supports_noop | Whether the task supports noop mode |
|
173
|
-
| input_method | Maps to the `input_method` key in the task json |
|
174
|
-
|
175
|
-
Puppet Plans
|
176
|
-
------------
|
177
|
-
|
178
|
-
Each entry in the `puppet_plans` list is an object with the following attributes:
|
179
|
-
|
180
|
-
| Attribute Key | Description |
|
181
|
-
| ------------- | ----------------------------------------------------------------------------- |
|
182
|
-
| name | The name of the plan. |
|
183
|
-
| file | The file defining the plan. |
|
184
|
-
| line | The line where the plan is defined. |
|
185
|
-
| docstring | The *DocString* object for the plan (see below). |
|
186
|
-
| defaults | The map of parameter names to default values. |
|
187
|
-
| source | The source code for the plan. |
|
188
|
-
|
189
|
-
Signature Objects
|
190
|
-
-----------------
|
191
|
-
|
192
|
-
The `signatures` key is a function-specific list containing an object for each signature of a
|
193
|
-
function. Each object includes the `signature` itself, as well as each of its `param` and `return`
|
194
|
-
tags. Puppet 4.x functions with overloads will contain multiple signatures, while other function
|
195
|
-
types will contain only one.
|
196
|
-
|
197
|
-
Each signature is represented as an object with the following attributes:
|
198
|
-
|
199
|
-
| Attribute Key | Description |
|
200
|
-
| ------------- | -------------------------------------------------------------------------------------------------- |
|
201
|
-
| signature | The signature of the function. |
|
202
|
-
| docstring | The *DocString* object describing the signature, which includes `text`, `param` and `return` tags. |
|
203
|
-
|
204
|
-
DocString Objects
|
205
|
-
-----------------
|
206
|
-
|
207
|
-
For the above types, their docstrings are represented as an object with the following attributes:
|
208
|
-
|
209
|
-
| Attribute Key | Description |
|
210
|
-
| ------------- | --------------------------------------------------- |
|
211
|
-
| text | The textual part of the DocString. |
|
212
|
-
| tags | The array of tag objects, if any are present. |
|
213
|
-
|
214
|
-
Each entry in the `tags` list is an object with the following properties:
|
215
|
-
|
216
|
-
| Attribute Key | Description |
|
217
|
-
| ------------- | ------------------------------------------------------- |
|
218
|
-
| tag_name | The name of the tag (e.g. param, return, etc.). |
|
219
|
-
| text | The descriptive text of the tag. |
|
220
|
-
| types | The array of types associated with the tag. |
|
221
|
-
| name | The name associated with the tag (e.g. parameter name). |
|
222
|
-
|
223
|
-
For Puppet 4.x functions with overloads, `overload` tags will contain three additional attributes:
|
224
|
-
|
225
|
-
| Attribute Key | Description |
|
226
|
-
| ------------- | ----------------------------------------------- |
|
227
|
-
| signature | The Puppet signature of the overload. |
|
228
|
-
| docstring | The *DocString* object describing the overload. |
|
229
|
-
| defaults | The map of parameter names to default values. |
|
230
|
-
|
231
|
-
|
232
|
-
Example JSON Document
|
233
|
-
---------------------
|
234
|
-
|
235
|
-
An example JSON document describing a Puppet class, defined type, resource type, provider, and Puppet functions:
|
236
|
-
|
237
|
-
```json
|
238
|
-
{
|
239
|
-
"puppet_classes": [
|
240
|
-
{
|
241
|
-
"name": "foo",
|
242
|
-
"file": "site.pp",
|
243
|
-
"line": 5,
|
244
|
-
"inherits": "foo::bar",
|
245
|
-
"docstring": {
|
246
|
-
"text": "A simple class.",
|
247
|
-
"tags": [
|
248
|
-
{
|
249
|
-
"tag_name": "param",
|
250
|
-
"text": "First param.",
|
251
|
-
"types": [
|
252
|
-
"Integer"
|
253
|
-
],
|
254
|
-
"name": "param1"
|
255
|
-
},
|
256
|
-
{
|
257
|
-
"tag_name": "param",
|
258
|
-
"text": "Second param.",
|
259
|
-
"types": [
|
260
|
-
"Any"
|
261
|
-
],
|
262
|
-
"name": "param2"
|
263
|
-
},
|
264
|
-
{
|
265
|
-
"tag_name": "param",
|
266
|
-
"text": "Third param.",
|
267
|
-
"types": [
|
268
|
-
"String"
|
269
|
-
],
|
270
|
-
"name": "param3"
|
271
|
-
}
|
272
|
-
]
|
273
|
-
},
|
274
|
-
"defaults": {
|
275
|
-
"param3": "hi"
|
276
|
-
},
|
277
|
-
"source": "class foo(Integer $param1, $param2, String $param3 = hi) inherits foo::bar {\n}"
|
278
|
-
}
|
279
|
-
],
|
280
|
-
"defined_types": [
|
281
|
-
{
|
282
|
-
"name": "dt",
|
283
|
-
"file": "site.pp",
|
284
|
-
"line": 12,
|
285
|
-
"docstring": {
|
286
|
-
"text": "A simple defined type.",
|
287
|
-
"tags": [
|
288
|
-
{
|
289
|
-
"tag_name": "param",
|
290
|
-
"text": "First param.",
|
291
|
-
"types": [
|
292
|
-
"Integer"
|
293
|
-
],
|
294
|
-
"name": "param1"
|
295
|
-
},
|
296
|
-
{
|
297
|
-
"tag_name": "param",
|
298
|
-
"text": "Second param.",
|
299
|
-
"types": [
|
300
|
-
"Any"
|
301
|
-
],
|
302
|
-
"name": "param2"
|
303
|
-
},
|
304
|
-
{
|
305
|
-
"tag_name": "param",
|
306
|
-
"text": "Third param.",
|
307
|
-
"types": [
|
308
|
-
"String"
|
309
|
-
],
|
310
|
-
"name": "param3"
|
311
|
-
}
|
312
|
-
]
|
313
|
-
},
|
314
|
-
"defaults": {
|
315
|
-
"param3": "hi"
|
316
|
-
},
|
317
|
-
"source": "define dt(Integer $param1, $param2, String $param3 = hi) {\n}"
|
318
|
-
}
|
319
|
-
],
|
320
|
-
"resource_types": [
|
321
|
-
{
|
322
|
-
"name": "database",
|
323
|
-
"file": "database.rb",
|
324
|
-
"line": 43,
|
325
|
-
"docstring": {
|
326
|
-
"text": "An example database server resource type."
|
327
|
-
},
|
328
|
-
"properties": [
|
329
|
-
{
|
330
|
-
"name": "ensure",
|
331
|
-
"description": "What state the database should be in.",
|
332
|
-
"values": [
|
333
|
-
"present",
|
334
|
-
"absent",
|
335
|
-
"up",
|
336
|
-
"down"
|
337
|
-
],
|
338
|
-
"aliases": {
|
339
|
-
"up": "present",
|
340
|
-
"down": "absent"
|
341
|
-
},
|
342
|
-
"default": "up"
|
343
|
-
},
|
344
|
-
{
|
345
|
-
"name": "file",
|
346
|
-
"description": "The database file to use."
|
347
|
-
},
|
348
|
-
{
|
349
|
-
"name": "log_level",
|
350
|
-
"description": "The log level to use.",
|
351
|
-
"values": [
|
352
|
-
"debug",
|
353
|
-
"warn",
|
354
|
-
"error"
|
355
|
-
],
|
356
|
-
"default": "warn"
|
357
|
-
}
|
358
|
-
],
|
359
|
-
"parameters": [
|
360
|
-
{
|
361
|
-
"name": "address",
|
362
|
-
"description": "The database server name.",
|
363
|
-
"isnamevar": true
|
364
|
-
},
|
365
|
-
{
|
366
|
-
"name": "encryption_key",
|
367
|
-
"description": "The encryption key to use."
|
368
|
-
},
|
369
|
-
{
|
370
|
-
"name": "encrypt",
|
371
|
-
"description": "Whether or not to encrypt the database.",
|
372
|
-
"values": [
|
373
|
-
"true",
|
374
|
-
"false",
|
375
|
-
"yes",
|
376
|
-
"no"
|
377
|
-
],
|
378
|
-
"default": "false"
|
379
|
-
}
|
380
|
-
],
|
381
|
-
"features": [
|
382
|
-
{
|
383
|
-
"name": "encryption",
|
384
|
-
"description": "The provider supports encryption."
|
385
|
-
}
|
386
|
-
]
|
387
|
-
}
|
388
|
-
],
|
389
|
-
"providers": [
|
390
|
-
{
|
391
|
-
"name": "linux",
|
392
|
-
"type_name": "database",
|
393
|
-
"file": "linux.rb",
|
394
|
-
"line": 33,
|
395
|
-
"docstring": {
|
396
|
-
"text": "An example provider on Linux."
|
397
|
-
},
|
398
|
-
"confines": {
|
399
|
-
"kernel": "Linux",
|
400
|
-
"osfamily": "RedHat"
|
401
|
-
},
|
402
|
-
"features": [
|
403
|
-
"implements_some_feature",
|
404
|
-
"some_other_feature"
|
405
|
-
],
|
406
|
-
"defaults": [
|
407
|
-
[
|
408
|
-
[
|
409
|
-
"kernel",
|
410
|
-
"Linux"
|
411
|
-
]
|
412
|
-
],
|
413
|
-
[
|
414
|
-
[
|
415
|
-
"osfamily",
|
416
|
-
"RedHat",
|
417
|
-
],
|
418
|
-
[
|
419
|
-
"operatingsystemmajrelease",
|
420
|
-
"7"
|
421
|
-
]
|
422
|
-
]
|
423
|
-
],
|
424
|
-
"commands": {
|
425
|
-
"foo": "/usr/bin/foo"
|
426
|
-
}
|
427
|
-
}
|
428
|
-
],
|
429
|
-
"puppet_functions": [
|
430
|
-
{
|
431
|
-
"name": "func",
|
432
|
-
"file": "site.pp",
|
433
|
-
"line": 20,
|
434
|
-
"type": "puppet",
|
435
|
-
"signatures": [
|
436
|
-
{
|
437
|
-
"signature": "func(Integer $param1, Any $param2, String $param3 = hi)",
|
438
|
-
"docstring": {
|
439
|
-
"text": "A simple function.",
|
440
|
-
"tags": [
|
441
|
-
{
|
442
|
-
"tag_name": "param",
|
443
|
-
"text": "First param.",
|
444
|
-
"types": [
|
445
|
-
"Integer"
|
446
|
-
],
|
447
|
-
"name": "param1"
|
448
|
-
},
|
449
|
-
{
|
450
|
-
"tag_name": "param",
|
451
|
-
"text": "Second param.",
|
452
|
-
"types": [
|
453
|
-
"Any"
|
454
|
-
],
|
455
|
-
"name": "param2"
|
456
|
-
},
|
457
|
-
{
|
458
|
-
"tag_name": "param",
|
459
|
-
"text": "Third param.",
|
460
|
-
"types": [
|
461
|
-
"String"
|
462
|
-
],
|
463
|
-
"name": "param3"
|
464
|
-
},
|
465
|
-
{
|
466
|
-
"tag_name": "return",
|
467
|
-
"text": "Returns nothing.",
|
468
|
-
"types": [
|
469
|
-
"Undef"
|
470
|
-
]
|
471
|
-
}
|
472
|
-
]
|
473
|
-
}
|
474
|
-
}
|
475
|
-
],
|
476
|
-
"docstring": {
|
477
|
-
"text": "A simple function.",
|
478
|
-
"tags": [
|
479
|
-
{
|
480
|
-
"tag_name": "param",
|
481
|
-
"text": "First param.",
|
482
|
-
"types": [
|
483
|
-
"Integer"
|
484
|
-
],
|
485
|
-
"name": "param1"
|
486
|
-
},
|
487
|
-
{
|
488
|
-
"tag_name": "param",
|
489
|
-
"text": "Second param.",
|
490
|
-
"types": [
|
491
|
-
"Any"
|
492
|
-
],
|
493
|
-
"name": "param2"
|
494
|
-
},
|
495
|
-
{
|
496
|
-
"tag_name": "param",
|
497
|
-
"text": "Third param.",
|
498
|
-
"types": [
|
499
|
-
"String"
|
500
|
-
],
|
501
|
-
"name": "param3"
|
502
|
-
},
|
503
|
-
{
|
504
|
-
"tag_name": "return",
|
505
|
-
"text": "Returns nothing.",
|
506
|
-
"types": [
|
507
|
-
"Undef"
|
508
|
-
]
|
509
|
-
}
|
510
|
-
]
|
511
|
-
},
|
512
|
-
"defaults": {
|
513
|
-
"param3": "hi"
|
514
|
-
},
|
515
|
-
"source": "function func(Integer $param1, $param2, String $param3 = hi) {\n}"
|
516
|
-
},
|
517
|
-
{
|
518
|
-
"name": "func3x",
|
519
|
-
"file": "func3x.rb",
|
520
|
-
"line": 1,
|
521
|
-
"type": "ruby3x",
|
522
|
-
"signatures": [
|
523
|
-
{
|
524
|
-
"signature": "func3x(String $first, Any $second)",
|
525
|
-
"docstring": {
|
526
|
-
"text": "An example 3.x function.",
|
527
|
-
"tags": [
|
528
|
-
{
|
529
|
-
"tag_name": "param",
|
530
|
-
"text": "The first parameter.",
|
531
|
-
"types": [
|
532
|
-
"String"
|
533
|
-
],
|
534
|
-
"name": "first"
|
535
|
-
},
|
536
|
-
{
|
537
|
-
"tag_name": "param",
|
538
|
-
"text": "The second parameter.",
|
539
|
-
"types": [
|
540
|
-
"Any"
|
541
|
-
],
|
542
|
-
"name": "second"
|
543
|
-
},
|
544
|
-
{
|
545
|
-
"tag_name": "return",
|
546
|
-
"text": "Returns nothing.",
|
547
|
-
"types": [
|
548
|
-
"Undef"
|
549
|
-
]
|
550
|
-
}
|
551
|
-
]
|
552
|
-
}
|
553
|
-
}
|
554
|
-
],
|
555
|
-
"docstring": {
|
556
|
-
"text": "An example 3.x function.",
|
557
|
-
"tags": [
|
558
|
-
{
|
559
|
-
"tag_name": "param",
|
560
|
-
"text": "The first parameter.",
|
561
|
-
"types": [
|
562
|
-
"String"
|
563
|
-
],
|
564
|
-
"name": "first"
|
565
|
-
},
|
566
|
-
{
|
567
|
-
"tag_name": "param",
|
568
|
-
"text": "The second parameter.",
|
569
|
-
"types": [
|
570
|
-
"Any"
|
571
|
-
],
|
572
|
-
"name": "second"
|
573
|
-
},
|
574
|
-
{
|
575
|
-
"tag_name": "return",
|
576
|
-
"text": "Returns nothing.",
|
577
|
-
"types": [
|
578
|
-
"Undef"
|
579
|
-
]
|
580
|
-
}
|
581
|
-
]
|
582
|
-
},
|
583
|
-
"source": "Puppet::Parser::Functions.newfunction(:func3x, doc: <<-DOC\nAn example 3.x function.\n@param [String] first The first parameter.\n@param second The second parameter.\n@return [Undef] Returns nothing.\nDOC\n) do |*args|\nend"
|
584
|
-
},
|
585
|
-
{
|
586
|
-
"name": "func4x",
|
587
|
-
"file": "func4x.rb",
|
588
|
-
"line": 11,
|
589
|
-
"type": "ruby4x",
|
590
|
-
"signatures": [
|
591
|
-
{
|
592
|
-
"signature": "func4x(Integer $param1, Any $param2, Optional[Array[String]] $param3)",
|
593
|
-
"docstring": {
|
594
|
-
"text": "The first overload.",
|
595
|
-
"tags": [
|
596
|
-
{
|
597
|
-
"tag_name": "param",
|
598
|
-
"text": "The first parameter.",
|
599
|
-
"types": [
|
600
|
-
"Integer"
|
601
|
-
],
|
602
|
-
"name": "param1"
|
603
|
-
},
|
604
|
-
{
|
605
|
-
"tag_name": "param",
|
606
|
-
"text": "The second parameter.",
|
607
|
-
"types": [
|
608
|
-
"Any"
|
609
|
-
],
|
610
|
-
"name": "param2"
|
611
|
-
},
|
612
|
-
{
|
613
|
-
"tag_name": "param",
|
614
|
-
"text": "The third parameter.",
|
615
|
-
"types": [
|
616
|
-
"Optional[Array[String]]"
|
617
|
-
],
|
618
|
-
"name": "param3"
|
619
|
-
},
|
620
|
-
{
|
621
|
-
"tag_name": "return",
|
622
|
-
"text": "Returns nothing.",
|
623
|
-
"types": [
|
624
|
-
"Undef"
|
625
|
-
]
|
626
|
-
}
|
627
|
-
]
|
628
|
-
}
|
629
|
-
},
|
630
|
-
{
|
631
|
-
"signature": "func4x(Boolean $param, Callable &$block)",
|
632
|
-
"docstring": {
|
633
|
-
"text": "The second overload.",
|
634
|
-
"tags": [
|
635
|
-
{
|
636
|
-
"tag_name": "param",
|
637
|
-
"text": "The first parameter.",
|
638
|
-
"types": [
|
639
|
-
"Boolean"
|
640
|
-
],
|
641
|
-
"name": "param"
|
642
|
-
},
|
643
|
-
{
|
644
|
-
"tag_name": "param",
|
645
|
-
"text": "The block parameter.",
|
646
|
-
"types": [
|
647
|
-
"Callable"
|
648
|
-
],
|
649
|
-
"name": "&block"
|
650
|
-
},
|
651
|
-
{
|
652
|
-
"tag_name": "return",
|
653
|
-
"text": "Returns a string.",
|
654
|
-
"types": [
|
655
|
-
"String"
|
656
|
-
]
|
657
|
-
}
|
658
|
-
]
|
659
|
-
}
|
660
|
-
}
|
661
|
-
],
|
662
|
-
"docstring": {
|
663
|
-
"text": "An example 4.x function.",
|
664
|
-
"tags": [
|
665
|
-
{
|
666
|
-
"tag_name": "overload",
|
667
|
-
"signature": "func4x(Integer $param1, Any $param2, Optional[Array[String]] $param3)",
|
668
|
-
"docstring": {
|
669
|
-
"text": "The first overload.",
|
670
|
-
"tags": [
|
671
|
-
{
|
672
|
-
"tag_name": "param",
|
673
|
-
"text": "The first parameter.",
|
674
|
-
"types": [
|
675
|
-
"Integer"
|
676
|
-
],
|
677
|
-
"name": "param1"
|
678
|
-
},
|
679
|
-
{
|
680
|
-
"tag_name": "param",
|
681
|
-
"text": "The second parameter.",
|
682
|
-
"types": [
|
683
|
-
"Any"
|
684
|
-
],
|
685
|
-
"name": "param2"
|
686
|
-
},
|
687
|
-
{
|
688
|
-
"tag_name": "param",
|
689
|
-
"text": "The third parameter.",
|
690
|
-
"types": [
|
691
|
-
"Optional[Array[String]]"
|
692
|
-
],
|
693
|
-
"name": "param3"
|
694
|
-
},
|
695
|
-
{
|
696
|
-
"tag_name": "return",
|
697
|
-
"text": "Returns nothing.",
|
698
|
-
"types": [
|
699
|
-
"Undef"
|
700
|
-
]
|
701
|
-
}
|
702
|
-
]
|
703
|
-
},
|
704
|
-
"name": "func4x"
|
705
|
-
},
|
706
|
-
{
|
707
|
-
"tag_name": "overload",
|
708
|
-
"signature": "func4x(Boolean $param, Callable &$block)",
|
709
|
-
"docstring": {
|
710
|
-
"text": "The second overload.",
|
711
|
-
"tags": [
|
712
|
-
{
|
713
|
-
"tag_name": "param",
|
714
|
-
"text": "The first parameter.",
|
715
|
-
"types": [
|
716
|
-
"Boolean"
|
717
|
-
],
|
718
|
-
"name": "param"
|
719
|
-
},
|
720
|
-
{
|
721
|
-
"tag_name": "param",
|
722
|
-
"text": "The block parameter.",
|
723
|
-
"types": [
|
724
|
-
"Callable"
|
725
|
-
],
|
726
|
-
"name": "&block"
|
727
|
-
},
|
728
|
-
{
|
729
|
-
"tag_name": "return",
|
730
|
-
"text": "Returns a string.",
|
731
|
-
"types": [
|
732
|
-
"String"
|
733
|
-
]
|
734
|
-
}
|
735
|
-
]
|
736
|
-
},
|
737
|
-
"name": "func4x"
|
738
|
-
}
|
739
|
-
]
|
740
|
-
},
|
741
|
-
"source": "Puppet::Functions.create_function(:func4x) do\n # The first overload.\n # @param param1 The first parameter.\n # @param param2 The second parameter.\n # @param param3 The third parameter.\n # @return [Undef] Returns nothing.\n dispatch :foo do\n param 'Integer', :param1\n param 'Any', :param2\n optional_param 'Array[String]', :param3\n end\n\n # The second overload.\n # @param param The first parameter.\n # @param block The block parameter.\n # @return [String] Returns a string.\n dispatch :other do\n param 'Boolean', :param\n block_param\n end\nend"
|
742
|
-
}
|
743
|
-
],
|
744
|
-
"puppet_tasks": [
|
745
|
-
{
|
746
|
-
"name": "(stdin)",
|
747
|
-
"file": "(stdin)",
|
748
|
-
"line": 0,
|
749
|
-
"docstring": {
|
750
|
-
"text": "Allows you to backup your database to local file.",
|
751
|
-
"tags": [
|
752
|
-
{
|
753
|
-
"name": "database",
|
754
|
-
"tag_name": "param",
|
755
|
-
"text": "Database to connect to",
|
756
|
-
"types": [
|
757
|
-
"Optional[String[1]]"
|
758
|
-
]
|
759
|
-
},
|
760
|
-
{
|
761
|
-
"name": "user",
|
762
|
-
"tag_name": "param",
|
763
|
-
"text": "The user",
|
764
|
-
"types": [
|
765
|
-
"Optional[String[1]]"
|
766
|
-
]
|
767
|
-
},
|
768
|
-
{
|
769
|
-
"name": "password",
|
770
|
-
"tag_name": "param",
|
771
|
-
"text": "The password",
|
772
|
-
"types": [
|
773
|
-
"Optional[String[1]]"
|
774
|
-
]
|
775
|
-
},
|
776
|
-
{
|
777
|
-
"name": "sql",
|
778
|
-
"tag_name": "param",
|
779
|
-
"text": "Path to file you want backup to",
|
780
|
-
"types": [
|
781
|
-
"String[1]"
|
782
|
-
]
|
783
|
-
}
|
784
|
-
]
|
785
|
-
},
|
786
|
-
"source": "{\n \"description\": \"Allows you to backup your database to local file.\",\n \"input_method\": \"stdin\",\n \"parameters\": {\n \"database\": {\n \"description\": \"Database to connect to\",\n \"type\": \"Optional[String[1]]\"\n },\n \"user\": {\n \"description\": \"The user\",\n \"type\": \"Optional[String[1]]\"\n },\n \"password\": {\n \"description\": \"The password\",\n \"type\": \"Optional[String[1]]\"\n },\n \"sql\": {\n \"description\": \"Path to file you want backup to\",\n \"type\": \"String[1]\"\n }\n }\n}\n",
|
787
|
-
"supports_noop": false,
|
788
|
-
"input_method": "stdin"
|
789
|
-
}
|
790
|
-
],
|
791
|
-
"puppet_plans": [
|
792
|
-
{
|
793
|
-
"name": "plann",
|
794
|
-
"file": "(stdin)",
|
795
|
-
"line": 5,
|
796
|
-
"docstring": {
|
797
|
-
"text": "A simple plan.",
|
798
|
-
"tags": [
|
799
|
-
{
|
800
|
-
"tag_name": "param",
|
801
|
-
"text": "First param.",
|
802
|
-
"types": [
|
803
|
-
"String"
|
804
|
-
],
|
805
|
-
"name": "param1"
|
806
|
-
},
|
807
|
-
{
|
808
|
-
"tag_name": "param",
|
809
|
-
"text": "Second param.",
|
810
|
-
"types": [
|
811
|
-
"Any"
|
812
|
-
],
|
813
|
-
"name": "param2"
|
814
|
-
},
|
815
|
-
{
|
816
|
-
"tag_name": "param",
|
817
|
-
"text": "Third param.",
|
818
|
-
"types": [
|
819
|
-
"Integer"
|
820
|
-
],
|
821
|
-
"name": "param3"
|
822
|
-
}
|
823
|
-
]
|
824
|
-
},
|
825
|
-
"defaults": {
|
826
|
-
"param3": "1"
|
827
|
-
},
|
828
|
-
"source": "plan plann(String $param1, $param2, Integer $param3 = 1) {\n}"
|
829
|
-
}
|
830
|
-
]
|
831
|
-
}
|
832
|
-
```
|