puppet-strings 4.1.2 → 4.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efe57a8ba9a1dccb2601bdbb8eb3f888ce070975e23fdfe84fe55c1703738278
4
- data.tar.gz: 2946e685195f4978758abdc2afb701e64f48832c971785b8e36a1eaa1d032232
3
+ metadata.gz: 8f5cc43b3dfbc54e6a559b97f6b7bce4e5a8d6a94ff46f118095c7bcde517bbb
4
+ data.tar.gz: 2dd5bac66f509884479026f24b154f81e13e78edef723b1f482036447f0d942c
5
5
  SHA512:
6
- metadata.gz: 4781c1e297505eb6a19893143720116e626763eed621013576feffd0e62fc1ecc39354f1f917807b36faa583f1d98d96bd579b0462b78da262fb4b175a356b82
7
- data.tar.gz: e6e26d0ab26a94c768cbc0003a39151861006744c682f9fdfa96e8790a890c722d53e0dba4965d62f3801bc038dc65911526c9b92f7c51dd6d0605dd1c1be865
6
+ metadata.gz: b7203752a05e060ab1b92f9f2b952ab7cea1cb681ae7f1bd45368427f6202555bec2efb884f78f9ff27385fe6b931e037fd02234f9326073e26fbd72701e325c
7
+ data.tar.gz: 6d0afed23ef6b0a60600d85f359375887303759b59fba5661644f26aa0cd3ca3dfc2f154dca94397531cd1d1a562560c78f46f4262d604a92ead1f68f2168e9b
data/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ 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
+
8
19
  ## [v4.1.2](https://github.com/puppetlabs/puppet-strings/tree/v4.1.2) - 2023-12-05
9
20
 
10
21
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v4.1.1...v4.1.2)
@@ -38,6 +49,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
38
49
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v3.0.1...v4.0.0.rc.1)
39
50
 
40
51
  ### Changed
52
+
41
53
  - (CONT-812) Puppet 8 / Ruby 3 support [#348](https://github.com/puppetlabs/puppet-strings/pull/348) ([chelnak](https://github.com/chelnak))
42
54
 
43
55
  ### Added
@@ -57,6 +69,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
57
69
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.9.0...v3.0.0)
58
70
 
59
71
  ### Changed
72
+
60
73
  - (CONT-228) Remove deprecated emit flags [#329](https://github.com/puppetlabs/puppet-strings/pull/329) ([chelnak](https://github.com/chelnak))
61
74
  - (CONT-228) Bump ruby version [#326](https://github.com/puppetlabs/puppet-strings/pull/326) ([chelnak](https://github.com/chelnak))
62
75
  - (#301) Update minimum Ruby version to 2.5.0 [#313](https://github.com/puppetlabs/puppet-strings/pull/313) ([danielparks](https://github.com/danielparks))
@@ -113,6 +126,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
113
126
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.5.0...v2.6.0)
114
127
 
115
128
  ### Changed
129
+
116
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))
117
131
 
118
132
  ### Added
@@ -206,6 +220,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
206
220
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.2.1...2.0.0)
207
221
 
208
222
  ### Changed
223
+
209
224
  - bump required ruby and puppet versions [#178](https://github.com/puppetlabs/puppet-strings/pull/178) ([eputnam](https://github.com/eputnam))
210
225
 
211
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
 
@@ -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.
@@ -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
@@ -34,7 +34,7 @@ namespace :strings do
34
34
  existing = File.read(filename)
35
35
 
36
36
  if generated != existing
37
- warn "#{filename} is outdated"
37
+ warn "#{filename} is outdated; to regenerate: bundle exec rake strings:generate:reference"
38
38
  exit 1
39
39
  end
40
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetStrings
4
- VERSION = '4.1.2'
4
+ VERSION = '4.1.3'
5
5
  end
@@ -44,14 +44,12 @@ class PuppetStrings::Yard::CodeObjects::Task < PuppetStrings::Yard::CodeObjects:
44
44
  end
45
45
 
46
46
  def parameters
47
- parameters = []
48
- statement.parameters.each do |name, props|
49
- parameters.push({ name: name.to_s,
50
- tag_name: 'param',
51
- text: props['description'] || '',
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.
@@ -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
- kvps.each do |kvp|
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(object, file)
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(object, file)
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(object, file)
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(object, file)
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(object, file)
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(object, file)
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(value)
68
+ super
69
69
  @docstring.object = value
70
70
  @docstring.tags.each { |tag| tag.object = value }
71
71
  end
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.2
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: 2023-12-05 00:00:00.000000000 Z
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: []