puppet-strings 4.1.0 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d98415d18e6f6fcb4b755c59f2dc8c892c960531e4512b502413c99c8beba67d
4
- data.tar.gz: a4043477cf9cfd60f87c3d78d4f21aa83e5a0074302ccc8529e66196370ba1d2
3
+ metadata.gz: efe57a8ba9a1dccb2601bdbb8eb3f888ce070975e23fdfe84fe55c1703738278
4
+ data.tar.gz: 2946e685195f4978758abdc2afb701e64f48832c971785b8e36a1eaa1d032232
5
5
  SHA512:
6
- metadata.gz: 2663db3f7445b2af64a87edf6f579fd59f12b3e7fcb361333d810ded071b120245c0b1580033f3a68ea8386db58711090c12db0eb19ce6fb2295d60330f3f4af
7
- data.tar.gz: 12de86d5a04659a5bfcaf6f690ea54aab2d77f47da06789acce5d65f91530a674e256437d70da6736fef3d663b390c89ee9b26c0972e2690740db8fb54f04584
6
+ metadata.gz: 4781c1e297505eb6a19893143720116e626763eed621013576feffd0e62fc1ecc39354f1f917807b36faa583f1d98d96bd579b0462b78da262fb4b175a356b82
7
+ data.tar.gz: e6e26d0ab26a94c768cbc0003a39151861006744c682f9fdfa96e8790a890c722d53e0dba4965d62f3801bc038dc65911526c9b92f7c51dd6d0605dd1c1be865
data/CHANGELOG.md CHANGED
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
5
5
 
6
6
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
7
7
 
8
+ ## [v4.1.2](https://github.com/puppetlabs/puppet-strings/tree/v4.1.2) - 2023-12-05
9
+
10
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.1.1...v4.1.2)
11
+
12
+ ### Fixed
13
+
14
+ - Revert "(maint) - fix rubocop" Leading argument with delegation syntax not supported with ruby 2.7.0 [#376](https://github.com/puppetlabs/puppet-strings/pull/376) ([jordanbreen28](https://github.com/jordanbreen28))
15
+
16
+ ## [v4.1.1](https://github.com/puppetlabs/puppet-strings/tree/v4.1.1) - 2023-11-22
17
+
18
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.1.0...v4.1.1)
19
+
20
+ ### Fixed
21
+
22
+ - Fix option tag handling with no data types [#361](https://github.com/puppetlabs/puppet-strings/pull/361) ([seanmil](https://github.com/seanmil))
23
+
8
24
  ## [v4.1.0](https://github.com/puppetlabs/puppet-strings/tree/v4.1.0) - 2023-07-04
9
25
 
10
26
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.0.0...v4.1.0)
@@ -21,13 +37,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
21
37
 
22
38
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.1...v4.0.0.rc.1)
23
39
 
40
+ ### Changed
41
+ - (CONT-812) Puppet 8 / Ruby 3 support [#348](https://github.com/puppetlabs/puppet-strings/pull/348) ([chelnak](https://github.com/chelnak))
42
+
24
43
  ### Added
25
44
 
26
45
  - Add deprecated tag [#342](https://github.com/puppetlabs/puppet-strings/pull/342) ([b4ldr](https://github.com/b4ldr))
27
46
 
28
- ### Changed
29
- - (CONT-812) Puppet 8 / Ruby 3 support [#348](https://github.com/puppetlabs/puppet-strings/pull/348) ([chelnak](https://github.com/chelnak))
30
-
31
47
  ## [v3.0.1](https://github.com/puppetlabs/puppet-strings/tree/v3.0.1) - 2022-10-25
32
48
 
33
49
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.0...v3.0.1)
@@ -40,16 +56,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
40
56
 
41
57
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.9.0...v3.0.0)
42
58
 
43
- ### Added
44
-
45
- - (#223) Use code blocks as appropriate in Markdown [#319](https://github.com/puppetlabs/puppet-strings/pull/319) ([danielparks](https://github.com/danielparks))
46
- - Use tilde heredocs for readability [#317](https://github.com/puppetlabs/puppet-strings/pull/317) ([danielparks](https://github.com/danielparks))
47
-
48
59
  ### Changed
49
60
  - (CONT-228) Remove deprecated emit flags [#329](https://github.com/puppetlabs/puppet-strings/pull/329) ([chelnak](https://github.com/chelnak))
50
61
  - (CONT-228) Bump ruby version [#326](https://github.com/puppetlabs/puppet-strings/pull/326) ([chelnak](https://github.com/chelnak))
51
62
  - (#301) Update minimum Ruby version to 2.5.0 [#313](https://github.com/puppetlabs/puppet-strings/pull/313) ([danielparks](https://github.com/danielparks))
52
63
 
64
+ ### Added
65
+
66
+ - (#223) Use code blocks as appropriate in Markdown [#319](https://github.com/puppetlabs/puppet-strings/pull/319) ([danielparks](https://github.com/danielparks))
67
+ - Use tilde heredocs for readability [#317](https://github.com/puppetlabs/puppet-strings/pull/317) ([danielparks](https://github.com/danielparks))
68
+
53
69
  ### Fixed
54
70
 
55
71
  - (#240) Fix output of default values that are expressions [#315](https://github.com/puppetlabs/puppet-strings/pull/315) ([danielparks](https://github.com/danielparks))
@@ -96,13 +112,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
96
112
 
97
113
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.5.0...v2.6.0)
98
114
 
115
+ ### Changed
116
+ - (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))
117
+
99
118
  ### Added
100
119
 
101
120
  - Improved markdown templates [#252](https://github.com/puppetlabs/puppet-strings/pull/252) ([kozl](https://github.com/kozl))
102
121
 
103
- ### Changed
104
- - (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))
105
-
106
122
  ### Fixed
107
123
 
108
124
  - 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))
@@ -189,15 +205,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
189
205
 
190
206
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.2.1...2.0.0)
191
207
 
208
+ ### Changed
209
+ - bump required ruby and puppet versions [#178](https://github.com/puppetlabs/puppet-strings/pull/178) ([eputnam](https://github.com/eputnam))
210
+
192
211
  ### Added
193
212
 
194
213
  - (PDOC-238) add generated message to markdown [#175](https://github.com/puppetlabs/puppet-strings/pull/175) ([eputnam](https://github.com/eputnam))
195
214
  - (PDOC-228) puppet plan support [#168](https://github.com/puppetlabs/puppet-strings/pull/168) ([eputnam](https://github.com/eputnam))
196
215
  - (PDOC-206) support for tasks [#161](https://github.com/puppetlabs/puppet-strings/pull/161) ([eputnam](https://github.com/eputnam))
197
216
 
198
- ### Changed
199
- - bump required ruby and puppet versions [#178](https://github.com/puppetlabs/puppet-strings/pull/178) ([eputnam](https://github.com/eputnam))
200
-
201
217
  ### Fixed
202
218
 
203
219
  - (PDOC-36) fix hack for README urls [#176](https://github.com/puppetlabs/puppet-strings/pull/176) ([eputnam](https://github.com/eputnam))
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Puppet strings
2
2
 
3
- [![ci](https://github.com/puppetlabs/puppet-strings/actions/workflows/ci.yml/badge.svg)](https://github.com/puppetlabs/puppet-strings/actions/workflows/ci.yml) [![Gem Version](https://badge.fury.io/rb/puppet-strings.svg)](https://badge.fury.io/rb/puppet-strings)
3
+ [![ci](https://github.com/puppetlabs/puppet-strings/actions/workflows/ci.yml/badge.svg)](https://github.com/puppetlabs/puppet-strings/actions/workflows/ci.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/puppet-strings.svg)](https://badge.fury.io/rb/puppet-strings)
5
+ [![Code Owners](https://img.shields.io/badge/owners-DevX--team-blue)](https://github.com/puppetlabs/puppet-strings/blob/main/CODEOWNERS)
4
6
 
5
7
  Puppet Strings generates documentation for Puppet code and extensions written in Puppet and Ruby.
6
8
  Strings processes code and YARD-style code comments to create documentation in HTML, Markdown, or JSON formats.
@@ -124,6 +126,10 @@ An example of running the acceptance tests locally with Docker:
124
126
  bundle exec rake litmus:tear_down
125
127
  ```
126
128
 
129
+ ## License
130
+
131
+ This codebase is licensed under Apache 2.0. However, the open source dependencies included in this codebase might be subject to other software licenses such as AGPL, GPL2.0, and MIT.
132
+
127
133
  ## Support
128
134
 
129
135
  Please log issues in [GitHub issues](https://github.com/puppetlabs/puppet-strings/issues).
@@ -66,7 +66,7 @@ module PuppetStrings::Describe
66
66
  targetlength = 48
67
67
  shortento = targetlength - 4
68
68
  contentstring = object[:docstring][:text]
69
- end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
69
+ end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
70
70
  contentstring = contentstring[0..end_of_line] unless end_of_line.nil?
71
71
  contentstring = "#{contentstring[0..shortento]} ..." if contentstring.length > targetlength
72
72
 
@@ -70,7 +70,11 @@ Data type:<%= code_maybe_block(param[:types].join(', ')) %>
70
70
  Options:
71
71
 
72
72
  <% options_for_param(param[:name]).each do |o| -%>
73
+ <% if o[:opt_types] -%>
73
74
  * **<%= o[:opt_name] %>** `<%= o[:opt_types][0] %>`: <%= o[:opt_text] %>
75
+ <% else -%>
76
+ * **<%= o[:opt_name] %>**: <%= o[:opt_text] %>
77
+ <% end -%>
74
78
  <% end -%>
75
79
 
76
80
  <% end -%>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetStrings
4
- VERSION = '4.1.0'
4
+ VERSION = '4.1.2'
5
5
  end
@@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Functions < PuppetStrings::Yard::CodeObj
8
8
  # @param [Symbol] type The function type to get the group for.
9
9
  # @return Returns the singleton instance of the group.
10
10
  def self.instance(type)
11
- super("puppet_functions_#{type}".to_sym)
11
+ super(:"puppet_functions_#{type}")
12
12
  end
13
13
 
14
14
  # Gets the display name of the group.
@@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Providers < PuppetStrings::Yard::CodeObj
8
8
  # @param [String] type The resource type name for the provider.
9
9
  # @return Returns the singleton instance of the group.
10
10
  def self.instance(type)
11
- super("puppet_providers_#{type}".to_sym)
11
+ super(:"puppet_providers_#{type}")
12
12
  end
13
13
 
14
14
  # Gets the display name of the group.
@@ -169,7 +169,7 @@ class PuppetStrings::Yard::CodeObjects::Type < PuppetStrings::Yard::CodeObjects:
169
169
  # render-time. For now, this should re-resolve on every call.
170
170
  # may be able to memoize this
171
171
  def providers
172
- providers = YARD::Registry.all("puppet_providers_#{name}".to_sym)
172
+ providers = YARD::Registry.all(:"puppet_providers_#{name}")
173
173
  return providers if providers.empty?
174
174
 
175
175
  providers.first.children
@@ -143,6 +143,8 @@ class PuppetStrings::Yard::Handlers::Ruby::DataTypeHandler < PuppetStrings::Yard
143
143
  @literal_visitor.visit_this_0(self, ast)
144
144
  end
145
145
 
146
+ # TODO: Fix the rubocop violations in this file between the following rubocop:disable/enable lines
147
+ # rubocop:disable Naming/MethodName
146
148
  # ----- The following methods are different/additions from the original Literal_evaluator
147
149
  def literal_Object(o)
148
150
  # Ignore any other object types
@@ -214,6 +216,7 @@ class PuppetStrings::Yard::Handlers::Ruby::DataTypeHandler < PuppetStrings::Yard
214
216
  result[literal(entry.key)] = literal(entry.value)
215
217
  end
216
218
  end
219
+ # rubocop:enable Naming/MethodName
217
220
  end
218
221
 
219
222
  # Extracts the datatype attributes from a Puppet Data Type interface hash.
@@ -40,6 +40,8 @@ class PuppetStrings::Yard::Parsers::Puppet::Parser < YARD::Parser::Base
40
40
 
41
41
  private
42
42
 
43
+ # TODO: Fix the rubocop violations in this file between the following rubocop:disable/enable lines
44
+ # rubocop:disable Naming/MethodName
43
45
  def transform_Program(o)
44
46
  # Cache the lines of the source text; we'll use this to locate comments
45
47
  @lines = o.source_text.lines.to_a
@@ -83,4 +85,5 @@ class PuppetStrings::Yard::Parsers::Puppet::Parser < YARD::Parser::Base
83
85
  def transform_Object(o)
84
86
  # Ignore anything else (will be compacted out of the resulting array)
85
87
  end
88
+ # rubocop:enable Naming/MethodName
86
89
  end
@@ -35,7 +35,7 @@ module PuppetStrings::Yard::Util
35
35
  # @return [Array] Returns an array of tag hashes.
36
36
  def self.tags_to_hashes(tags)
37
37
  # Skip over the API tags that are public
38
- tags.select { |t| (t.tag_name != 'api' || t.text != 'public') }.map do |t|
38
+ tags.select { |t| t.tag_name != 'api' || t.text != 'public' }.map do |t|
39
39
  next t.to_hash if t.respond_to?(:to_hash)
40
40
 
41
41
  tag = { tag_name: t.tag_name }
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: 4.1.0
4
+ version: 4.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-04 00:00:00.000000000 Z
11
+ date: 2023-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rgen