puppet-strings 2.3.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +102 -4
  3. data/COMMITTERS.md +17 -17
  4. data/CONTRIBUTING.md +37 -7
  5. data/README.md +17 -12
  6. data/lib/puppet-strings.rb +5 -3
  7. data/lib/puppet-strings/describe.rb +2 -0
  8. data/lib/puppet-strings/json.rb +2 -0
  9. data/lib/puppet-strings/markdown.rb +12 -10
  10. data/lib/puppet-strings/markdown/base.rb +30 -3
  11. data/lib/puppet-strings/markdown/data_type.rb +18 -0
  12. data/lib/puppet-strings/markdown/data_types.rb +3 -1
  13. data/lib/puppet-strings/markdown/defined_type.rb +2 -0
  14. data/lib/puppet-strings/markdown/defined_types.rb +3 -1
  15. data/lib/puppet-strings/markdown/function.rb +9 -7
  16. data/lib/puppet-strings/markdown/functions.rb +3 -1
  17. data/lib/puppet-strings/markdown/puppet_class.rb +2 -0
  18. data/lib/puppet-strings/markdown/puppet_classes.rb +3 -1
  19. data/lib/puppet-strings/markdown/puppet_plan.rb +2 -0
  20. data/lib/puppet-strings/markdown/puppet_plans.rb +3 -1
  21. data/lib/puppet-strings/markdown/puppet_task.rb +2 -0
  22. data/lib/puppet-strings/markdown/puppet_tasks.rb +3 -1
  23. data/lib/puppet-strings/markdown/resource_type.rb +21 -2
  24. data/lib/puppet-strings/markdown/resource_types.rb +3 -1
  25. data/lib/puppet-strings/markdown/table_of_contents.rb +3 -1
  26. data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +18 -6
  27. data/lib/puppet-strings/markdown/templates/data_type.erb +30 -7
  28. data/lib/puppet-strings/markdown/templates/data_type_function.erb +67 -0
  29. data/lib/puppet-strings/markdown/templates/function.erb +10 -1
  30. data/lib/puppet-strings/markdown/templates/puppet_task.erb +1 -1
  31. data/lib/puppet-strings/markdown/templates/resource_type.erb +35 -13
  32. data/lib/puppet-strings/markdown/templates/table_of_contents.erb +6 -6
  33. data/lib/puppet-strings/monkey_patches/display_object_command.rb +2 -0
  34. data/lib/puppet-strings/tasks.rb +2 -0
  35. data/lib/puppet-strings/tasks/generate.rb +2 -0
  36. data/lib/puppet-strings/tasks/gh_pages.rb +3 -0
  37. data/lib/puppet-strings/version.rb +3 -1
  38. data/lib/puppet-strings/yard.rb +9 -0
  39. data/lib/puppet-strings/yard/code_objects.rb +2 -0
  40. data/lib/puppet-strings/yard/code_objects/base.rb +2 -0
  41. data/lib/puppet-strings/yard/code_objects/class.rb +4 -2
  42. data/lib/puppet-strings/yard/code_objects/data_type.rb +30 -8
  43. data/lib/puppet-strings/yard/code_objects/data_type_alias.rb +2 -0
  44. data/lib/puppet-strings/yard/code_objects/defined_type.rb +4 -2
  45. data/lib/puppet-strings/yard/code_objects/function.rb +8 -5
  46. data/lib/puppet-strings/yard/code_objects/group.rb +3 -0
  47. data/lib/puppet-strings/yard/code_objects/plan.rb +4 -2
  48. data/lib/puppet-strings/yard/code_objects/provider.rb +6 -0
  49. data/lib/puppet-strings/yard/code_objects/task.rb +3 -1
  50. data/lib/puppet-strings/yard/code_objects/type.rb +49 -5
  51. data/lib/puppet-strings/yard/handlers.rb +2 -0
  52. data/lib/puppet-strings/yard/handlers/helpers.rb +2 -0
  53. data/lib/puppet-strings/yard/handlers/json/base.rb +2 -0
  54. data/lib/puppet-strings/yard/handlers/json/task_handler.rb +2 -0
  55. data/lib/puppet-strings/yard/handlers/puppet/base.rb +3 -0
  56. data/lib/puppet-strings/yard/handlers/puppet/class_handler.rb +2 -0
  57. data/lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb +2 -0
  58. data/lib/puppet-strings/yard/handlers/puppet/defined_type_handler.rb +2 -0
  59. data/lib/puppet-strings/yard/handlers/puppet/function_handler.rb +3 -1
  60. data/lib/puppet-strings/yard/handlers/puppet/plan_handler.rb +2 -0
  61. data/lib/puppet-strings/yard/handlers/ruby/base.rb +5 -0
  62. data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +225 -52
  63. data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +9 -7
  64. data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +13 -0
  65. data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +4 -1
  66. data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +20 -6
  67. data/lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb +6 -3
  68. data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +18 -1
  69. data/lib/puppet-strings/yard/parsers.rb +2 -0
  70. data/lib/puppet-strings/yard/parsers/json/parser.rb +2 -0
  71. data/lib/puppet-strings/yard/parsers/json/task_statement.rb +2 -0
  72. data/lib/puppet-strings/yard/parsers/puppet/parser.rb +18 -14
  73. data/lib/puppet-strings/yard/parsers/puppet/statement.rb +4 -0
  74. data/lib/puppet-strings/yard/tags.rb +4 -0
  75. data/lib/puppet-strings/yard/tags/enum_tag.rb +14 -0
  76. data/lib/puppet-strings/yard/tags/factory.rb +18 -0
  77. data/lib/puppet-strings/yard/tags/overload_tag.rb +4 -1
  78. data/lib/puppet-strings/yard/tags/parameter_directive.rb +5 -4
  79. data/lib/puppet-strings/yard/tags/property_directive.rb +5 -4
  80. data/lib/puppet-strings/yard/tags/summary_tag.rb +2 -0
  81. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb +6 -0
  82. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +9 -1
  83. data/lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb +1 -1
  84. data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +3 -1
  85. data/lib/puppet-strings/yard/templates/default/tags/html/enum.erb +17 -0
  86. data/lib/puppet-strings/yard/templates/default/tags/setup.rb +6 -0
  87. data/lib/puppet-strings/yard/util.rb +7 -4
  88. data/lib/puppet/application/strings.rb +2 -0
  89. data/lib/puppet/face/strings.rb +4 -1
  90. data/lib/puppet/feature/rgen.rb +2 -0
  91. data/lib/puppet/feature/yard.rb +2 -0
  92. metadata +14 -51
  93. data/Gemfile +0 -47
  94. data/HISTORY.md +0 -218
  95. data/JSON.md +0 -832
  96. data/Rakefile +0 -168
  97. data/codecov.yml +0 -3
  98. data/misc/ANNOUNCEMENT_TEMPLATE.md +0 -40
  99. data/spec/acceptance/emit_json_options_spec.rb +0 -69
  100. data/spec/acceptance/generate_markdown_spec.rb +0 -47
  101. data/spec/acceptance/running_strings_generate_spec.rb +0 -78
  102. data/spec/fixtures/acceptance/modules/test/functions/add.pp +0 -9
  103. data/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb +0 -5
  104. data/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb +0 -2
  105. data/spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb +0 -9
  106. data/spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb +0 -15
  107. data/spec/fixtures/acceptance/modules/test/manifests/init.pp +0 -27
  108. data/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp +0 -27
  109. data/spec/fixtures/acceptance/modules/test/metadata.json +0 -10
  110. data/spec/fixtures/acceptance/modules/test/types/elephant.pp +0 -2
  111. data/spec/fixtures/unit/markdown/output.md +0 -508
  112. data/spec/fixtures/unit/markdown/output_with_data_types.md +0 -553
  113. data/spec/fixtures/unit/markdown/output_with_plan.md +0 -542
  114. data/spec/spec_helper.rb +0 -49
  115. data/spec/spec_helper_acceptance.rb +0 -58
  116. data/spec/spec_helper_acceptance_local.rb +0 -10
  117. data/spec/unit/puppet-strings/describe_spec.rb +0 -141
  118. data/spec/unit/puppet-strings/json_spec.rb +0 -302
  119. data/spec/unit/puppet-strings/markdown/base_spec.rb +0 -146
  120. data/spec/unit/puppet-strings/markdown_spec.rb +0 -357
  121. data/spec/unit/puppet-strings/yard/code_objects/task_spec.rb +0 -92
  122. data/spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb +0 -116
  123. data/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +0 -217
  124. data/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb +0 -65
  125. data/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +0 -231
  126. data/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +0 -315
  127. data/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb +0 -232
  128. data/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +0 -746
  129. data/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +0 -158
  130. data/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +0 -235
  131. data/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +0 -311
  132. data/spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb +0 -72
  133. data/spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb +0 -56
  134. data/spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb +0 -251
  135. data/spec/unit/puppet-strings/yard/util_spec.rb +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a70d1194ec3d0f50cc7924ce43b3d996b08db414a31639d38135c90863b3163
4
- data.tar.gz: 821fef3a3e096caa7a3a51024db23e18658baba2b25bf4f503a750952e8e3657
3
+ metadata.gz: decf380cb5cb58228eead7c8cc9c59d9ce144b608d939c258d56ebb268086c09
4
+ data.tar.gz: 62254e20387c9172de91b8bd6e2623ac000a6f11c568805da7805ca1526d6def
5
5
  SHA512:
6
- metadata.gz: 457119ac6a325f6c4f62923a6180b05d346b0e2d2b7e560b4cddfeda51f345284e98421abb46a68a2a3c0bd62933300394866d91247d69ef2b154667ffd91df3
7
- data.tar.gz: db555eb951d97aa8ac62396693c9c9d317f4e361b4b9dd405d9b7d21d6ccda9f89beb70f292053e6f0440e02b6cf9fb2b8e5f9defb209a6920a7597337128834
6
+ metadata.gz: 05c877672e2f7c4d803db4e3d4c24371655336647fd9862319c5b0ba89d36710758cd03677792a91c843fd6150b70d1bb3c3a01d4343be46ceec76549c32426f
7
+ data.tar.gz: 3d3a7dae2b4e4eaac710b403a291d3a5623c22250f328619cabf68f205c2ff68110cd9e9d345d1db7b0301b9a4c07349674f8f59fac9bc244baf538e2f5531a3
data/CHANGELOG.md CHANGED
@@ -3,6 +3,104 @@
3
3
  All significant changes to this repo will be summarized in this file.
4
4
 
5
5
 
6
+ ## [v2.7.0](https://github.com/puppetlabs/puppet-strings/tree/v2.7.0) (2021-05-17)
7
+
8
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.6.0...v2.7.0)
9
+
10
+ Added
11
+
12
+ - Add supported\_features to puppet strings input/output for types [\#228](https://github.com/puppetlabs/puppet-strings/issues/228)
13
+
14
+ Fixed
15
+
16
+ - `file` type is missing `ensure` in generated reference docs [\#230](https://github.com/puppetlabs/puppet-strings/issues/230)
17
+
18
+ **Closed issues:**
19
+
20
+ - class with "apply" attribute causes parser error [\#251](https://github.com/puppetlabs/puppet-strings/issues/251)
21
+
22
+ **Merged pull requests:**
23
+
24
+ - Update CODEOWNERS [\#272](https://github.com/puppetlabs/puppet-strings/pull/272) ([binford2k](https://github.com/binford2k))
25
+ - Only set tasks = true when parsing plans. [\#266](https://github.com/puppetlabs/puppet-strings/pull/266) ([binford2k](https://github.com/binford2k))
26
+
27
+ ## [v2.6.0](https://github.com/puppetlabs/puppet-strings/tree/v2.6.0) (2021-01-18)
28
+
29
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.5.0...v2.6.0)
30
+
31
+ Added
32
+
33
+ - Improved markdown templates [\#252](https://github.com/puppetlabs/puppet-strings/pull/252) ([kozl](https://github.com/kozl))
34
+
35
+ Fixed
36
+
37
+ - Do not fail in case return tag has no type specified [\#268](https://github.com/puppetlabs/puppet-strings/pull/268) ([tiandrey](https://github.com/tiandrey))
38
+ - Handle a missing description gracefully [\#260](https://github.com/puppetlabs/puppet-strings/pull/260) ([scotje](https://github.com/scotje))
39
+ - Fix ERB failure - parameters without descriptions [\#255](https://github.com/puppetlabs/puppet-strings/pull/255) ([trevor-vaughan](https://github.com/trevor-vaughan))
40
+ - puppet\_function template: fix tags, source [\#249](https://github.com/puppetlabs/puppet-strings/pull/249) ([raemer](https://github.com/raemer))
41
+ - Handle a missing description gracefully [\#246](https://github.com/puppetlabs/puppet-strings/pull/246) ([ekohl](https://github.com/ekohl))
42
+
43
+ Changed
44
+
45
+ - \(MAINT\) Drop Ruby 2.1.x and Puppet 4.x compatibility [\#253](https://github.com/puppetlabs/puppet-strings/pull/253) ([scotje](https://github.com/scotje))
46
+
47
+ **Closed issues:**
48
+
49
+ - Tags \(Parameter, Returns\) not generated in HTML output [\#248](https://github.com/puppetlabs/puppet-strings/issues/248)
50
+ - Can we get 2.5.0 released please [\#244](https://github.com/puppetlabs/puppet-strings/issues/244)
51
+ - Provider attribute is missing in generated types documentation [\#227](https://github.com/puppetlabs/puppet-strings/issues/227)
52
+
53
+ ## [v2.5.0](https://github.com/puppetlabs/puppet-strings/tree/v2.5.0) (2020-07-16)
54
+
55
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.4.0...v2.5.0)
56
+
57
+ Added
58
+
59
+ - \(GH-225\) Document functions in Puppet Datatypes [\#235](https://github.com/puppetlabs/puppet-strings/pull/235) ([glennsarti](https://github.com/glennsarti))
60
+ - Add checks to resource\_type handler and code objects [\#232](https://github.com/puppetlabs/puppet-strings/pull/232) ([scotje](https://github.com/scotje))
61
+ - \(\#227\) Inject `provider` into params list for types with providers [\#231](https://github.com/puppetlabs/puppet-strings/pull/231) ([scotje](https://github.com/scotje))
62
+
63
+ Fixed
64
+
65
+ - \(\#242\) Wrap names in backticks when rendering to markdown [\#243](https://github.com/puppetlabs/puppet-strings/pull/243) ([scotje](https://github.com/scotje))
66
+ - Eliminate trailing spaces w/o descriptions [\#224](https://github.com/puppetlabs/puppet-strings/pull/224) ([binford2k](https://github.com/binford2k))
67
+
68
+ **Closed issues:**
69
+
70
+ - text rendering as emojis in strings generated docs [\#242](https://github.com/puppetlabs/puppet-strings/issues/242)
71
+ - Puppet Classes not Listed in Left Frame Contents [\#241](https://github.com/puppetlabs/puppet-strings/issues/241)
72
+ - exec type in generated docs missing attributes `creates`, `onlyif` [\#229](https://github.com/puppetlabs/puppet-strings/issues/229)
73
+ - \[Feature\] Document functions in Puppet Datatypes [\#225](https://github.com/puppetlabs/puppet-strings/issues/225)
74
+ - Document usage [\#8](https://github.com/puppetlabs/puppet-strings/issues/8)
75
+ - Need a search box on the main page [\#1](https://github.com/puppetlabs/puppet-strings/issues/1)
76
+
77
+ **Merged pull requests:**
78
+
79
+ - Release prep for v2.5.0 [\#245](https://github.com/puppetlabs/puppet-strings/pull/245) ([scotje](https://github.com/scotje))
80
+
81
+ ## [v2.4.0](https://github.com/puppetlabs/puppet-strings/tree/v2.4.0) (2020-02-20)
82
+
83
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.3.1...v2.4.0)
84
+
85
+ Added
86
+
87
+ - Add missing HTML output support for enum tag [\#218](https://github.com/puppetlabs/puppet-strings/pull/218) ([seanmil](https://github.com/seanmil))
88
+ - \(PDOC-295\) Add @enum tag support for Enum data types [\#215](https://github.com/puppetlabs/puppet-strings/pull/215) ([seanmil](https://github.com/seanmil))
89
+ - Expanded default search glob for plans. [\#214](https://github.com/puppetlabs/puppet-strings/pull/214) ([Raskil](https://github.com/Raskil))
90
+
91
+ **Merged pull requests:**
92
+
93
+ - \(MAINT\) Release prep for 2.4.0 [\#221](https://github.com/puppetlabs/puppet-strings/pull/221) ([scotje](https://github.com/scotje))
94
+
95
+ ## [v2.3.1](https://github.com/puppetlabs/puppet-strings/tree/v2.3.1) (2019-09-23)
96
+
97
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.3.0...v2.3.1)
98
+
99
+ Fixed
100
+
101
+ - \(maint\) Use parameters method instead of json\['parameters'\] [\#211](https://github.com/puppetlabs/puppet-strings/pull/211) ([lucywyman](https://github.com/lucywyman))
102
+ - \(PDOC-285\) Fix data\_type\_handler for errors and numbers [\#209](https://github.com/puppetlabs/puppet-strings/pull/209) ([glennsarti](https://github.com/glennsarti))
103
+
6
104
  ## [v2.3.0](https://github.com/puppetlabs/puppet-strings/tree/v2.3.0) (2019-07-17)
7
105
 
8
106
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.2.0...v2.3.0)
@@ -159,7 +257,7 @@ All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with t
159
257
  - Note: this means Markdown text in YARD comments and tags, not a change in the output of strings
160
258
  - New commandline options: --emit-json and --emit-json-stdout to generate JSON documentation **(PDOC-84)**
161
259
  - Runtime dependency on Puppet has been removed, allowing strings to function in Puppet Enterprise 3.8 **(PDOC-80)**
162
- - 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)
260
+ - 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/main/README.md#installing-puppet-strings)
163
261
  - New gemspec requirement on Ruby version 1.9.3, the oldest supported Ruby version
164
262
 
165
263
  ### BugFixes
@@ -179,8 +277,8 @@ All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with t
179
277
  ### Features
180
278
  - Support for JSON output **(PDOC-23)**
181
279
  - Strings now has the ability to produce a JSON representation of a given puppet module
182
- - The details of the JSON schema can be found [here](https://github.com/puppetlabs/puppet-strings/blob/master/json_dom.md)
183
- - For details on how to generate JSON, see the [README](https://github.com/puppetlabs/puppet-strings/blob/master/README.md#running-puppet-strings)
280
+ - The details of the JSON schema can be found [here](https://github.com/puppetlabs/puppet-strings/blob/main/json_dom.md)
281
+ - For details on how to generate JSON, see the [README](https://github.com/puppetlabs/puppet-strings/blob/main/README.md#running-puppet-strings)
184
282
  - Migrate to ruby gems as a distribution method **(PDOC-28)**
185
283
  - This is the last release of strings that will be available as a puppet module
186
284
  - The 0.4.0 release will be released concurrently as a ruby gem
@@ -263,4 +361,4 @@ All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with t
263
361
  - Strings will no longer crash when documenting 3x functions with less than two arguments passed into newfunction **(PDOC-27)**
264
362
 
265
363
 
266
- \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
364
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/COMMITTERS.md CHANGED
@@ -4,7 +4,7 @@ Committing changes to Strings
4
4
  We would like to make it easier for community members to contribute to strings
5
5
  using pull requests, even if it makes the task of reviewing and committing
6
6
  these changes a little harder. Pull requests are only ever based on a single
7
- branch. As a result contributors should target their changes at the master branch.
7
+ branch. As a result contributors should target their changes at the main branch.
8
8
  This makes the process of contributing a little easier for the contributor since
9
9
  they don't need to concern themselves with the question, "What branch do I base my changes
10
10
  on?" This is already called out in the [CONTRIBUTING.md](http://goo.gl/XRH2J).
@@ -17,7 +17,7 @@ effort to make sure the end users must opt-in to new behavior that is
17
17
  incompatible with previous behavior. We employ the use of [feature
18
18
  flags](http://stackoverflow.com/questions/7707383/what-is-a-feature-flag) as
19
19
  the primary way to achieve this user opt-in behavior. Finally, it is the
20
- responsibility of the committer to make sure the `master` branch
20
+ responsibility of the committer to make sure the `main` branch
21
21
  is clean and working at all times. Clean means that dead code is not
22
22
  allowed, everything needs to be usable in some manner at all points in time.
23
23
 
@@ -45,9 +45,9 @@ making the decision what base branch to merge the change set into.
45
45
 
46
46
  **base branch** - A branch in Git that contains an active history of changes
47
47
  and will eventually be released using semantic version guidelines. The branch
48
- named `master` will always exist as a base branch.
48
+ named `main` will always exist as a base branch.
49
49
 
50
- **master branch** - The branch where new functionality that and bug fixes are
50
+ **main branch** - The branch where new functionality that and bug fixes are
51
51
  merged.
52
52
 
53
53
  **security** - Where critical security fixes are merged. These change sets
@@ -70,7 +70,7 @@ This section provides a guide to help a committer decide the specific base
70
70
  branch that a change set should be merged into.
71
71
 
72
72
  The latest minor release of a major release is the only base branch that should
73
- be patched. These patches will be merged into `master` if they contain new
73
+ be patched. These patches will be merged into `main` if they contain new
74
74
  functionality and if they fix a critical bug. Older minor releases in a major release
75
75
  do not get patched.
76
76
 
@@ -87,7 +87,7 @@ security branch as the base branch. Please send all security related
87
87
  information or patches to security@puppet.com as per our [Security
88
88
  Policy](https://puppet.com/security/).
89
89
 
90
- The CI systems are configured to run against `master`. Over time, this branch
90
+ The CI systems are configured to run against `main`. Over time, this branch
91
91
  will refer to different versions, but its name will remain fixed to avoid having
92
92
  to update CI jobs and tasks as new versions are released.
93
93
 
@@ -108,7 +108,7 @@ branch:
108
108
  documentation being kept up to date?
109
109
  * Does the change set include clean code? (software code that is formatted
110
110
  correctly and in an organized manner so that another coder can easily read
111
- or modify it.) HINT: `git diff master --check`
111
+ or modify it.) HINT: `git diff main --check`
112
112
  * Does the change set conform to the contributing guide?
113
113
 
114
114
  Commit citizen guidelines:
@@ -118,13 +118,13 @@ This section aims to provide guidelines for being a good commit citizen by
118
118
  paying attention to our automated build tools.
119
119
 
120
120
  * Don’t push on a broken build. (A broken build is defined as a failing job
121
- in [Puppet Strings](https://jenkins.puppetlabs.com/job/platform_puppet-strings_unit-ruby_master/)
121
+ in [Puppet Strings](https://travis-ci.com/github/puppetlabs/puppet-strings)
122
122
  page.)
123
123
  * Watch the build until your changes have gone through green
124
124
  * Update the ticket status and target version. The target version field in
125
125
  our issue tracker should be updated to be the next release of Puppet. For
126
126
  example, if the most recent release of Puppet is 3.1.1 and you merge a
127
- backwards compatible change set into master, then the target version should
127
+ backwards compatible change set into main, then the target version should
128
128
  be 3.2.0 in the issue tracker.)
129
129
  * Ensure the pull request is closed (Hint: amend your merge commit to contain
130
130
  the string `closes #123` where 123 is the pull request number and github
@@ -135,7 +135,7 @@ Example Procedure
135
135
 
136
136
  This section helps a committer rebase and merge a contribution into the base branch.
137
137
 
138
- Suppose a contributor submits a pull request based on master. The change set
138
+ Suppose a contributor submits a pull request based on main. The change set
139
139
  fixes a bug reported against strings 0.1.0 which is the most recently released
140
140
  version of strings.
141
141
 
@@ -147,20 +147,20 @@ branch to track the remote branch.
147
147
  Branch jeffmccune-pdoc-34_fix_foo_error set up to track remote branch pdoc-34-fix_foo_error from jeffmccune.
148
148
  Switched to a new branch 'jeffmccune-pdoc-34_fix_foo_error'
149
149
 
150
- It's possible that more changes have been merged into master since the pull
150
+ It's possible that more changes have been merged into main since the pull
151
151
  request was submitted. In this case it may be necessary to rebase the branch
152
152
  that contains the changes:
153
153
 
154
- $ git rebase upstream/master
154
+ $ git rebase upstream/main
155
155
 
156
156
  After the branch has been checked out and rebased, the committer should ensure that
157
157
  the code review check list has been completed.
158
158
 
159
159
  Now that we have a topic branch containing the change set based on the most recent
160
- `master` branch, the committer merges in:
160
+ `main` branch, the committer merges in:
161
161
 
162
- $ git checkout master
163
- Switched to branch 'master'
162
+ $ git checkout main
163
+ Switched to branch 'main'
164
164
  $ git merge --no-ff --log jeffmccune-pdoc-34_fix_foo_error
165
165
  Merge made by the 'recursive' strategy.
166
166
  foo | 0
@@ -173,12 +173,12 @@ preserve the usefulness of `git branch --contains`. If there are any merge
173
173
  conflicts, they are to be resolved in the merge commit itself and not by
174
174
  re-writing (rebasing) the patches for one base branch, but not another.
175
175
 
176
- Once the change set has been merged into `master`, the committer pushes.
176
+ Once the change set has been merged into `main`, the committer pushes.
177
177
  Please note, the checklist should be complete at this point. It's helpful to make
178
178
  sure your local branches are up to date to avoid one of the branches failing to fast
179
179
  forward while the other succeeds.
180
180
 
181
- $ git push origin master:master
181
+ $ git push origin main:main
182
182
 
183
183
  That's it! The committer then updates the pull request, updates the issue in
184
184
  our issue tracker, and keeps an eye on the [build
data/CONTRIBUTING.md CHANGED
@@ -7,22 +7,53 @@ that we can have a chance of keeping on top of things.
7
7
 
8
8
  ## Getting Started
9
9
 
10
- * Make sure you have a [Jira account](http://tickets.puppetlabs.com)
11
10
  * Make sure you have a [GitHub account](https://github.com/signup/free)
12
11
  * Submit a ticket for your issue, assuming one does not already exist.
13
12
  * Clearly describe the issue including steps to reproduce when it is a bug.
14
13
  * Make sure you fill in the earliest version that you know has the issue.
15
14
  * Fork the repository on GitHub
16
15
 
16
+ ## Submit an issue
17
+
18
+ We use GitHub Issues for issue tracking on puppet-strings.
19
+
20
+ Before you submit your issue, take a minute to...
21
+
22
+ 1. **Use the GitHub issue search** — check if the issue has already been
23
+ reported.
24
+
25
+ 2. **Check if the issue has been fixed** — try to reproduce it using the
26
+ latest `main` or release tag.
27
+
28
+ A good bug report shouldn't leave others needing to chase you up for more
29
+ information. Please try to be as **detailed as possible** in your issue. What is
30
+ your environment? What steps will reproduce the issue?
31
+
32
+ Example:
33
+
34
+ > Short and descriptive example issue title
35
+ >
36
+ > A summary of the issue with details about the environment it occurs in (Ruby version, Puppet version, Strings version, etc). If
37
+ > suitable, include the steps required to reproduce the bug.
38
+ >
39
+ > 1. This is the first step
40
+ > 2. This is the second step
41
+ > 3. Further steps, etc.
42
+ >
43
+ > Any other information you want to share that is relevant to the issue being
44
+ > reported. This might include the lines of code that you have identified as
45
+ > causing the bug, and potential solutions (and your opinions on their
46
+ > merits).
47
+
17
48
  ## Making Changes
18
49
 
19
50
  * Create a topic branch from where you want to base your work.
20
- * This is usually the master branch.
51
+ * This is usually the main branch.
21
52
  * Only target release branches if you are certain your fix must be on that
22
53
  branch.
23
- * To quickly create a topic branch based on master; `git checkout -b
24
- fix/master/my_contribution master`. Please avoid working directly on the
25
- `master` branch.
54
+ * To quickly create a topic branch based on main; `git checkout -b
55
+ fix/main/my_contribution main`. Please avoid working directly on the
56
+ `main` branch.
26
57
  * Make commits of logical units.
27
58
  * Check for unnecessary whitespace with `git diff --check` before committing.
28
59
  * Make sure your commit messages are in the proper format.
@@ -78,7 +109,7 @@ a ticket number.
78
109
 
79
110
  ## Cutting a release
80
111
 
81
- To cut a new release, from a current `master` checkout:
112
+ To cut a new release, from a current `main` checkout:
82
113
 
83
114
  * Start the release branch with `git checkout -b release-prep`
84
115
  * Update `lib/puppet-strings/version.rb` to the new version
@@ -98,7 +129,6 @@ To cut a new release, from a current `master` checkout:
98
129
  # Additional Resources
99
130
 
100
131
  * [More information on contributing](http://links.puppet.com/contribute-to-puppet)
101
- * [Bug tracker (Jira)](http://tickets.puppet.com)
102
132
  * [Contributor License Agreement](http://links.puppet.com/cla)
103
133
  * [General GitHub documentation](http://help.github.com/)
104
134
  * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Puppet Strings
2
2
  ==============
3
- [![Build Status](https://travis-ci.org/puppetlabs/puppet-strings.png?branch=master)](https://travis-ci.org/puppetlabs/puppet-strings) [![Gem Version](https://badge.fury.io/rb/puppet-strings.svg)](https://badge.fury.io/rb/puppet-strings)
3
+ [![Build Status](https://travis-ci.org/puppetlabs/puppet-strings.png?branch=main)](https://travis-ci.org/puppetlabs/puppet-strings) [![Gem Version](https://badge.fury.io/rb/puppet-strings.svg)](https://badge.fury.io/rb/puppet-strings)
4
4
 
5
5
  Puppet Strings generates documentation for Puppet code and extensions written in Puppet and Ruby. Strings processes code and YARD-style code comments to create documentation in HTML, Markdown, or JSON formats.
6
6
 
@@ -8,18 +8,11 @@ Puppet Strings generates documentation for Puppet code and extensions written in
8
8
  | | |
9
9
  | -------------- |---------------------------------------------------------------- |
10
10
  | *Code* | [GitHub][repo] |
11
- | *Issues* | [Puppet JIRA Tracker][JIRA] |
11
+ | *Issues* | [GitHub issues][issues] |
12
12
  | *License* | [Apache 2.0][LICENSE] |
13
13
  | *Change log* | [CHANGELOG.md][changelog] |
14
14
  | *Contributing* | [CONTRIBUTING.md][contributing] and [COMMITTERS.md][committers] |
15
15
 
16
- [repo]: https://github.com/puppetlabs/puppet-strings
17
- [JIRA]: https://tickets.puppetlabs.com/browse/PDOC
18
- [LICENSE]: https://github.com/puppetlabs/puppet-strings/blob/master/LICENSE
19
- [changelog]: https://github.com/puppetlabs/puppet-strings/blob/master/CHANGELOG.md
20
- [contributing]: https://github.com/puppetlabs/puppet-strings/blob/master/CONTRIBUTING.md
21
- [committers]: https://github.com/puppetlabs/puppet-strings/blob/master/COMMITTERS.md
22
-
23
16
  ## Installing Puppet Strings
24
17
 
25
18
  ### Requirements
@@ -77,7 +70,7 @@ Here are a few other good resources for getting started with documentation:
77
70
 
78
71
  We love contributions from the community!
79
72
 
80
- If you'd like to contribute to `puppet-strings`, check out [CONTRIBUTING.md](https://github.com/puppetlabs/puppet-strings/blob/master/CONTRIBUTING.md) to get information on the contribution process.
73
+ If you'd like to contribute to `puppet-strings`, check out [CONTRIBUTING.md](https://github.com/puppetlabs/puppet-strings/blob/main/CONTRIBUTING.md) to get information on the contribution process.
81
74
 
82
75
  ### Running Specs
83
76
 
@@ -135,10 +128,22 @@ An example of run the acceptance tests follow the instructions [here].
135
128
 
136
129
  ## Support
137
130
 
138
- Please log tickets and issues in our [JIRA tracker][JIRA]. A [mailing list](https://groups.google.com/forum/?fromgroups#!forum/puppet-users) is available for asking questions and getting help from others.
131
+ Please log issues in [GitHub issues][issues]. Check out [CONTRIBUTING.md][contributing] for tips on writing _the best_ issues.
139
132
 
140
- There is also an active #puppet channel on the Freenode IRC network.
133
+ A [mailing list](https://groups.google.com/forum/?fromgroups#!forum/puppet-users) is available for asking questions and getting help from others.
134
+
135
+ There is also an active community on the [Puppet community Slack][] in the #forge-modules channel.
141
136
 
142
137
  We use semantic version numbers for our releases and recommend that users upgrade to patch releases and minor releases as they become available.
143
138
 
144
139
  Bug fixes and ongoing development will occur in minor releases for the current major version. Security fixes will be ported to a previous major version on a best-effort basis, until the previous major version is no longer maintained.
140
+
141
+
142
+ [repo]: https://github.com/puppetlabs/puppet-strings
143
+ [issues]: https://github.com/puppetlabs/puppet-strings/issues
144
+ [LICENSE]: https://github.com/puppetlabs/puppet-strings/blob/main/LICENSE
145
+ [changelog]: https://github.com/puppetlabs/puppet-strings/blob/main/CHANGELOG.md
146
+ [contributing]: https://github.com/puppetlabs/puppet-strings/blob/main/CONTRIBUTING.md
147
+ [committers]: https://github.com/puppetlabs/puppet-strings/blob/main/COMMITTERS.md
148
+ [Puppet community Slack]: https://slack.puppet.com
149
+
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # The root module for Puppet Strings.
2
4
  module PuppetStrings
3
5
  # The glob patterns used to search for files to document.
@@ -7,7 +9,7 @@ module PuppetStrings
7
9
  types/**/*.pp
8
10
  lib/**/*.rb
9
11
  tasks/*.json
10
- plans/*.pp
12
+ plans/**/*.pp
11
13
  ).freeze
12
14
 
13
15
  # Generates documentation.
@@ -27,8 +29,9 @@ module PuppetStrings
27
29
 
28
30
  # Format the arguments to YARD
29
31
  args = ['doc']
32
+ args << '--no-progress'
30
33
  args << '--debug' if options[:debug]
31
- args << '--backtrace' if options[:backtrace]
34
+ args << '--backtrace' if options[:debug]
32
35
  args << "-m#{options[:markup] || 'markdown'}"
33
36
 
34
37
  file = nil
@@ -42,7 +45,6 @@ module PuppetStrings
42
45
  args << '-n'
43
46
  args << '-q' unless file
44
47
  args << '--no-stats' unless file
45
- args << '--no-progress' unless file
46
48
  end
47
49
 
48
50
  yard_args = options[:yard_args]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'puppet-strings/json'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
 
3
5
  # The module for JSON related functionality.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'puppet-strings/json'
2
4
 
3
5
  # module for parsing Yard Registries and generating markdown
@@ -14,16 +16,16 @@ module PuppetStrings::Markdown
14
16
  # generates markdown documentation
15
17
  # @return [String] markdown doc
16
18
  def self.generate
17
- final = "# Reference\n"
18
- final << "<!-- DO NOT EDIT: This document was generated by Puppet Strings -->\n\n"
19
- final << PuppetStrings::Markdown::TableOfContents.render
20
- final << PuppetStrings::Markdown::PuppetClasses.render
21
- final << PuppetStrings::Markdown::DefinedTypes.render
22
- final << PuppetStrings::Markdown::ResourceTypes.render
23
- final << PuppetStrings::Markdown::Functions.render
24
- final << PuppetStrings::Markdown::DataTypes.render
25
- final << PuppetStrings::Markdown::PuppetTasks.render
26
- final << PuppetStrings::Markdown::PuppetPlans.render
19
+ final = "# Reference\n\n"
20
+ final += "<!-- DO NOT EDIT: This document was generated by Puppet Strings -->\n\n"
21
+ final += PuppetStrings::Markdown::TableOfContents.render
22
+ final += PuppetStrings::Markdown::PuppetClasses.render
23
+ final += PuppetStrings::Markdown::DefinedTypes.render
24
+ final += PuppetStrings::Markdown::ResourceTypes.render
25
+ final += PuppetStrings::Markdown::Functions.render
26
+ final += PuppetStrings::Markdown::DataTypes.render
27
+ final += PuppetStrings::Markdown::PuppetTasks.render
28
+ final += PuppetStrings::Markdown::PuppetPlans.render
27
29
 
28
30
  final
29
31
  end