puppet-strings 4.1.1 → 4.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/CONTRIBUTING.md +0 -1
- data/lib/puppet/face/strings.rb +0 -1
- data/lib/puppet-strings/describe.rb +1 -1
- data/lib/puppet-strings/markdown/helpers.rb +1 -1
- data/lib/puppet-strings/markdown.rb +0 -3
- data/lib/puppet-strings/tasks/validate.rb +1 -1
- data/lib/puppet-strings/version.rb +1 -1
- data/lib/puppet-strings/yard/code_objects/function.rb +1 -1
- data/lib/puppet-strings/yard/code_objects/provider.rb +1 -1
- data/lib/puppet-strings/yard/code_objects/task.rb +5 -7
- data/lib/puppet-strings/yard/code_objects/type.rb +1 -1
- data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +2 -3
- data/lib/puppet-strings/yard/parsers/puppet/statement.rb +6 -6
- data/lib/puppet-strings/yard/tags/overload_tag.rb +3 -3
- data/lib/puppet-strings/yard/util.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f5cc43b3dfbc54e6a559b97f6b7bce4e5a8d6a94ff46f118095c7bcde517bbb
|
4
|
+
data.tar.gz: 2dd5bac66f509884479026f24b154f81e13e78edef723b1f482036447f0d942c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7203752a05e060ab1b92f9f2b952ab7cea1cb681ae7f1bd45368427f6202555bec2efb884f78f9ff27385fe6b931e037fd02234f9326073e26fbd72701e325c
|
7
|
+
data.tar.gz: 6d0afed23ef6b0a60600d85f359375887303759b59fba5661644f26aa0cd3ca3dfc2f154dca94397531cd1d1a562560c78f46f4262d604a92ead1f68f2168e9b
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,25 @@ 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.3](https://github.com/puppetlabs/puppet-strings/tree/v4.1.3) - 2024-09-05
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.1.2...v4.1.3)
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- (bug) - Pin yard to < 0.9.37 [#401](https://github.com/puppetlabs/puppet-strings/pull/401) ([jordanbreen28](https://github.com/jordanbreen28))
|
15
|
+
- validate: give hint on how to regenerate outdated REFERENCE.md [#388](https://github.com/puppetlabs/puppet-strings/pull/388) ([kenyon](https://github.com/kenyon))
|
16
|
+
- (CAT-1688) Upgrade rubocop to `~> 1.50.0` [#383](https://github.com/puppetlabs/puppet-strings/pull/383) ([LukasAud](https://github.com/LukasAud))
|
17
|
+
- Allow numerics for templates using code_maybe_block [#382](https://github.com/puppetlabs/puppet-strings/pull/382) ([seanmil](https://github.com/seanmil))
|
18
|
+
|
19
|
+
## [v4.1.2](https://github.com/puppetlabs/puppet-strings/tree/v4.1.2) - 2023-12-05
|
20
|
+
|
21
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.1.1...v4.1.2)
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
- 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))
|
26
|
+
|
8
27
|
## [v4.1.1](https://github.com/puppetlabs/puppet-strings/tree/v4.1.1) - 2023-11-22
|
9
28
|
|
10
29
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.1.0...v4.1.1)
|
@@ -30,6 +49,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
30
49
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.1...v4.0.0.rc.1)
|
31
50
|
|
32
51
|
### Changed
|
52
|
+
|
33
53
|
- (CONT-812) Puppet 8 / Ruby 3 support [#348](https://github.com/puppetlabs/puppet-strings/pull/348) ([chelnak](https://github.com/chelnak))
|
34
54
|
|
35
55
|
### Added
|
@@ -49,6 +69,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
49
69
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.9.0...v3.0.0)
|
50
70
|
|
51
71
|
### Changed
|
72
|
+
|
52
73
|
- (CONT-228) Remove deprecated emit flags [#329](https://github.com/puppetlabs/puppet-strings/pull/329) ([chelnak](https://github.com/chelnak))
|
53
74
|
- (CONT-228) Bump ruby version [#326](https://github.com/puppetlabs/puppet-strings/pull/326) ([chelnak](https://github.com/chelnak))
|
54
75
|
- (#301) Update minimum Ruby version to 2.5.0 [#313](https://github.com/puppetlabs/puppet-strings/pull/313) ([danielparks](https://github.com/danielparks))
|
@@ -105,6 +126,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
105
126
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.5.0...v2.6.0)
|
106
127
|
|
107
128
|
### Changed
|
129
|
+
|
108
130
|
- (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))
|
109
131
|
|
110
132
|
### Added
|
@@ -198,6 +220,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
198
220
|
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.2.1...2.0.0)
|
199
221
|
|
200
222
|
### Changed
|
223
|
+
|
201
224
|
- bump required ruby and puppet versions [#178](https://github.com/puppetlabs/puppet-strings/pull/178) ([eputnam](https://github.com/eputnam))
|
202
225
|
|
203
226
|
### Added
|
data/CONTRIBUTING.md
CHANGED
@@ -124,7 +124,6 @@ To cut a new release, from a current `main` checkout:
|
|
124
124
|
* Run `rake release[upstream]` to release from your checkout
|
125
125
|
* make sure to use the name of your git remote pointing to the puppetlabs GitHub repo
|
126
126
|
* Remove the release-prep branch
|
127
|
-
* Send the release announcements using the template in [misc/ANNOUNCEMENT_TEMPLATE.md](misc/ANNOUNCEMENT_TEMPLATE.md)
|
128
127
|
|
129
128
|
# Additional Resources
|
130
129
|
|
data/lib/puppet/face/strings.rb
CHANGED
@@ -144,7 +144,6 @@ Puppet::Face.define(:strings, '0.0.1') do # rubocop:disable Metrics/BlockLength
|
|
144
144
|
def check_required_features
|
145
145
|
raise "The 'yard' gem must be installed in order to use this face." unless Puppet.features.yard?
|
146
146
|
raise "The 'rgen' gem must be installed in order to use this face." unless Puppet.features.rgen?
|
147
|
-
raise 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION.match?(/^1\.8/)
|
148
147
|
end
|
149
148
|
|
150
149
|
# Builds the options to PuppetStrings.generate.
|
@@ -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")
|
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
|
|
@@ -12,7 +12,7 @@ module PuppetStrings::Markdown::Helpers
|
|
12
12
|
# @param [String] inline_prefix String to insert before if it’s inline.
|
13
13
|
# @returns [String] Markdown
|
14
14
|
def code_maybe_block(code, type: :puppet, block_prefix: "\n\n", inline_prefix: ' ')
|
15
|
-
if code.include?("\n")
|
15
|
+
if code.to_s.include?("\n")
|
16
16
|
"#{block_prefix}```#{type}\n#{code}\n```"
|
17
17
|
else
|
18
18
|
"#{inline_prefix}`#{code}`"
|
@@ -76,9 +76,6 @@ module PuppetStrings::Markdown
|
|
76
76
|
# @param [String] path The full path to the template file.
|
77
77
|
# @return [ERB] Template
|
78
78
|
def self.erb(path)
|
79
|
-
unless Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
|
80
|
-
# This outputs warnings in Ruby 2.6+.
|
81
|
-
end
|
82
79
|
ERB.new(File.read(path), trim_mode: '-')
|
83
80
|
end
|
84
81
|
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}"
|
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}"
|
11
|
+
super(:"puppet_providers_#{type}")
|
12
12
|
end
|
13
13
|
|
14
14
|
# Gets the display name of the group.
|
@@ -44,14 +44,12 @@ class PuppetStrings::Yard::CodeObjects::Task < PuppetStrings::Yard::CodeObjects:
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def parameters
|
47
|
-
parameters
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
types: [props['type']] || '' })
|
47
|
+
statement.parameters.map do |name, props|
|
48
|
+
{ name: name.to_s,
|
49
|
+
tag_name: 'param',
|
50
|
+
text: props['description'] || '',
|
51
|
+
types: [props['type']] || '' }
|
53
52
|
end
|
54
|
-
parameters
|
55
53
|
end
|
56
54
|
|
57
55
|
# Converts the code object to a hash representation.
|
@@ -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}"
|
172
|
+
providers = YARD::Registry.all(:"puppet_providers_#{name}")
|
173
173
|
return providers if providers.empty?
|
174
174
|
|
175
175
|
providers.first.children
|
@@ -107,9 +107,8 @@ class PuppetStrings::Yard::Handlers::Ruby::ProviderHandler < PuppetStrings::Yard
|
|
107
107
|
parameters.each do |kvps|
|
108
108
|
next unless kvps.count >= 1
|
109
109
|
|
110
|
-
defaultfor =
|
111
|
-
|
112
|
-
defaultfor << [node_as_string(kvp[0]) || kvp[0].source, node_as_string(kvp[1]) || kvp[1].source]
|
110
|
+
defaultfor = kvps.map do |kvp|
|
111
|
+
[node_as_string(kvp[0]) || kvp[0].source, node_as_string(kvp[1]) || kvp[1].source]
|
113
112
|
end
|
114
113
|
object.add_default(defaultfor)
|
115
114
|
end
|
@@ -92,7 +92,7 @@ module PuppetStrings::Yard::Parsers::Puppet
|
|
92
92
|
# @param object The Puppet parser model object that has parameters.
|
93
93
|
# @param [String] file The file containing the statement.
|
94
94
|
def initialize(object, file)
|
95
|
-
super
|
95
|
+
super
|
96
96
|
@parameters = object.parameters.map { |parameter| Parameter.new(parameter) }
|
97
97
|
end
|
98
98
|
end
|
@@ -105,7 +105,7 @@ module PuppetStrings::Yard::Parsers::Puppet
|
|
105
105
|
# @param [Puppet::Pops::Model::HostClassDefinition] object The model object for the class statement.
|
106
106
|
# @param [String] file The file containing the statement.
|
107
107
|
def initialize(object, file)
|
108
|
-
super
|
108
|
+
super
|
109
109
|
@name = object.name
|
110
110
|
@parent_class = object.parent_class
|
111
111
|
end
|
@@ -119,7 +119,7 @@ module PuppetStrings::Yard::Parsers::Puppet
|
|
119
119
|
# @param [Puppet::Pops::Model::ResourceTypeDefinition] object The model object for the defined type statement.
|
120
120
|
# @param [String] file The file containing the statement.
|
121
121
|
def initialize(object, file)
|
122
|
-
super
|
122
|
+
super
|
123
123
|
@name = object.name
|
124
124
|
end
|
125
125
|
end
|
@@ -132,7 +132,7 @@ module PuppetStrings::Yard::Parsers::Puppet
|
|
132
132
|
# @param [Puppet::Pops::Model::FunctionDefinition] object The model object for the function statement.
|
133
133
|
# @param [String] file The file containing the statement.
|
134
134
|
def initialize(object, file)
|
135
|
-
super
|
135
|
+
super
|
136
136
|
@name = object.name
|
137
137
|
return unless object.respond_to? :return_type
|
138
138
|
|
@@ -151,7 +151,7 @@ module PuppetStrings::Yard::Parsers::Puppet
|
|
151
151
|
# @param [Puppet::Pops::Model::PlanDefinition] object The model object for the plan statement.
|
152
152
|
# @param [String] file The file containing the statement.
|
153
153
|
def initialize(object, file)
|
154
|
-
super
|
154
|
+
super
|
155
155
|
@name = object.name
|
156
156
|
end
|
157
157
|
end
|
@@ -164,7 +164,7 @@ module PuppetStrings::Yard::Parsers::Puppet
|
|
164
164
|
# @param [Puppet::Pops::Model::TypeAlias] object The model object for the type statement.
|
165
165
|
# @param [String] file The file containing the statement.
|
166
166
|
def initialize(object, file)
|
167
|
-
super
|
167
|
+
super
|
168
168
|
|
169
169
|
type_expr = object.type_expr
|
170
170
|
case type_expr
|
@@ -65,7 +65,7 @@ class PuppetStrings::Yard::Tags::OverloadTag < YARD::Tags::Tag
|
|
65
65
|
# @param [Object] value The object to associate with this tag.
|
66
66
|
# @return [void]
|
67
67
|
def object=(value)
|
68
|
-
super
|
68
|
+
super
|
69
69
|
@docstring.object = value
|
70
70
|
@docstring.tags.each { |tag| tag.object = value }
|
71
71
|
end
|
@@ -75,8 +75,8 @@ class PuppetStrings::Yard::Tags::OverloadTag < YARD::Tags::Tag
|
|
75
75
|
# @param [Array] args The args passed to the method.
|
76
76
|
# @param block The block passed to the method.
|
77
77
|
# @return Returns what the method call on the object would return.
|
78
|
-
def method_missing(method_name,
|
79
|
-
return object.send(method_name,
|
78
|
+
def method_missing(method_name, *args, &block)
|
79
|
+
return object.send(method_name, *args, &block) if object.respond_to? method_name
|
80
80
|
|
81
81
|
super
|
82
82
|
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|
|
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.
|
4
|
+
version: 4.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rgen
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.9'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.9.37
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '0.9'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.9.37
|
41
47
|
description:
|
42
48
|
email: info@puppet.com
|
43
49
|
executables: []
|