openvox-strings 5.0.0 → 6.1.0

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: 7f8faeecab951abd8059486388fbddcc093314713c17c1a87f30764be80e4af3
4
- data.tar.gz: c24f48e95451329e8367e5ffbf3835d901ef90678eb9af06e0b9d263ab6c1936
3
+ metadata.gz: e110d114b1600a477064071570a4999be41d69c8a9dc239686507dafe2cb8087
4
+ data.tar.gz: 0a3c79360b241f4693d5cd3850a83b4363efb0f30c1b14fc2b0ed0bb8519ae3e
5
5
  SHA512:
6
- metadata.gz: e63adf1b7018dfeeccab03b660cdd9b97ead8f0a2184c7be8b1db88aece067885725a812fc72f436a510593b5f203c9e37f50fcd2d7b27e08e736db6fc2bb06e
7
- data.tar.gz: e124ea8d92900e5000dd00e126ddc13fed4d9b098e6771305e21cb3806988920a712d83557216e0a3013018fc9bea0f269edc16a8df001c2d0bde55fe82b41de
6
+ metadata.gz: 2fb4c34bb55826086049bf9ec865d5f31bcbe832135598f3fcdc843a12527e0697d5e51cda0d95a1ea7e53312babc92cea788d070e44d61597c41763ccd3cd09
7
+ data.tar.gz: 73c68a76542d8ef8b0362f1ac868a563656eef01ce0cc7d012a3f8bae6648c05672577ce03f21fa7a2a9b026bde0480ba739ffd73deeb96201962f544dcf1dcd
data/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [v6.1.0](https://github.com/voxpupuli/openvox-strings/tree/v6.1.0) (2026-02-19)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/openvox-strings/compare/v6.0.0...v6.1.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - Add Ruby 4.0 support [\#26](https://github.com/voxpupuli/openvox-strings/pull/26) ([dependabot[bot]](https://github.com/apps/dependabot))
12
+
13
+ ## [v6.0.0](https://github.com/voxpupuli/openvox-strings/tree/v6.0.0) (2025-08-13)
14
+
15
+ [Full Changelog](https://github.com/voxpupuli/openvox-strings/compare/v5.0.0...v6.0.0)
16
+
17
+ **Breaking changes:**
18
+
19
+ - Require Ruby 3.2 or newer [\#13](https://github.com/voxpupuli/openvox-strings/pull/13) ([bastelfreak](https://github.com/bastelfreak))
20
+
21
+ **Implemented enhancements:**
22
+
23
+ - Allow rgen 0.10.x [\#10](https://github.com/voxpupuli/openvox-strings/pull/10) ([smortex](https://github.com/smortex))
24
+
5
25
  ## [v5.0.0](https://github.com/voxpupuli/openvox-strings/tree/v5.0.0) (2025-06-10)
6
26
 
7
27
  [Full Changelog](https://github.com/voxpupuli/openvox-strings/compare/v4.1.3...v5.0.0)
@@ -15,7 +15,7 @@ module OpenvoxStrings::Describe
15
15
  document = {
16
16
  defined_types: YARD::Registry.all(:puppet_defined_type).sort_by!(&:name).map!(&:to_hash),
17
17
  resource_types: YARD::Registry.all(:puppet_type).sort_by!(&:name).map!(&:to_hash),
18
- providers: YARD::Registry.all(:puppet_provider).sort_by!(&:name).map!(&:to_hash)
18
+ providers: YARD::Registry.all(:puppet_provider).sort_by!(&:name).map!(&:to_hash),
19
19
  }
20
20
  # if --list flag passed, produce a summarized list of types
21
21
  if list_types
@@ -17,7 +17,7 @@ module OpenvoxStrings::Json
17
17
  providers: YARD::Registry.all(:puppet_provider).sort_by!(&:name).map!(&:to_hash),
18
18
  puppet_functions: YARD::Registry.all(:puppet_function).sort_by!(&:name).map!(&:to_hash),
19
19
  puppet_tasks: YARD::Registry.all(:puppet_task).sort_by!(&:name).map!(&:to_hash),
20
- puppet_plans: YARD::Registry.all(:puppet_plan).sort_by!(&:name).map!(&:to_hash)
20
+ puppet_plans: YARD::Registry.all(:puppet_plan).sort_by!(&:name).map!(&:to_hash),
21
21
  # TODO: Need Ruby documentation?
22
22
  }
23
23
 
@@ -23,7 +23,7 @@ module OpenvoxStrings::Markdown
23
23
  OpenvoxStrings::Markdown::Function,
24
24
  OpenvoxStrings::Markdown::DataType,
25
25
  OpenvoxStrings::Markdown::PuppetTask,
26
- OpenvoxStrings::Markdown::PuppetPlan
26
+ OpenvoxStrings::Markdown::PuppetPlan,
27
27
  ]
28
28
  end
29
29
 
@@ -33,7 +33,7 @@ module OpenvoxStrings::Markdown
33
33
  output = [
34
34
  "# Reference\n\n",
35
35
  "<!-- DO NOT EDIT: This document was generated by Puppet Strings -->\n\n",
36
- "## Table of Contents\n\n"
36
+ "## Table of Contents\n\n",
37
37
  ]
38
38
 
39
39
  # Create table of contents
@@ -13,7 +13,7 @@ namespace :strings do
13
13
  options = {
14
14
  debug: args[:debug] == 'true',
15
15
  backtrace: args[:backtrace] == 'true',
16
- markup: args[:markup] || 'markdown'
16
+ markup: args[:markup] || 'markdown',
17
17
  }
18
18
 
19
19
  raise('Error: Both JSON and Markdown output have been selected. Please select one.') if args[:json] == 'true' && args[:markdown] == 'true'
@@ -33,7 +33,7 @@ namespace :strings do
33
33
  options[format] = !(args[format] == 'false' || args[format].empty?)
34
34
  return unless options[format]
35
35
 
36
- options[:path] = args[format] == 'true' ? nil : args[format]
36
+ options[:path] = (args[format] == 'true') ? nil : args[format]
37
37
  end
38
38
  # rubocop:enable Style/PreferredHashMethods
39
39
 
@@ -24,7 +24,7 @@ namespace :strings do
24
24
  backtrace: args[:backtrace] == 'true',
25
25
  json: false,
26
26
  markdown: true,
27
- path: file
27
+ path: file,
28
28
  }
29
29
  OpenvoxStrings.generate(patterns, options)
30
30
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenvoxStrings
4
- VERSION = '5.0.0'
4
+ VERSION = '6.1.0'
5
5
  end
@@ -5,9 +5,9 @@ class OpenvoxStrings::Yard::CodeObjects::Base < YARD::CodeObjects::NamespaceObje
5
5
  # Allocates a new code object.
6
6
  # @param [Array] args The arguments to initialize the code object with.
7
7
  # @return Returns the code object.
8
- def self.new(*args)
8
+ def self.new(*)
9
9
  # Skip the super class' implementation because it detects :: in names and this will cause namespaces in the output we don't want
10
- object = Object.class.instance_method(:new).bind_call(self, *args)
10
+ object = Object.class.instance_method(:new).bind_call(self, *)
11
11
  existing = YARD::Registry.at(object.path)
12
12
  object = existing if existing.instance_of?(self)
13
13
  yield(object) if block_given?
@@ -94,7 +94,7 @@ class OpenvoxStrings::Yard::CodeObjects::DataType < OpenvoxStrings::Yard::CodeOb
94
94
  {
95
95
  name: func.name,
96
96
  signature: func.signature,
97
- docstring: OpenvoxStrings::Yard::Util.docstring_to_hash(func.docstring, %i[param option enum return example])
97
+ docstring: OpenvoxStrings::Yard::Util.docstring_to_hash(func.docstring, %i[param option enum return example]),
98
98
  }
99
99
  end
100
100
  hash
@@ -48,7 +48,7 @@ class OpenvoxStrings::Yard::CodeObjects::Task < OpenvoxStrings::Yard::CodeObject
48
48
  { name: name.to_s,
49
49
  tag_name: 'param',
50
50
  text: props['description'] || '',
51
- types: [props['type']] || '' }
51
+ types: [props['type']] || '', }
52
52
  end
53
53
  end
54
54
 
@@ -60,10 +60,10 @@ class OpenvoxStrings::Yard::CodeObjects::Task < OpenvoxStrings::Yard::CodeObject
60
60
  line: statement.line,
61
61
  docstring: {
62
62
  text: statement.docstring,
63
- tags: parameters
63
+ tags: parameters,
64
64
  },
65
65
  source: statement.source,
66
66
  supports_noop: statement.json['supports_noop'] || false,
67
- input_method: statement.json['input_method'] }
67
+ input_method: statement.json['input_method'], }
68
68
  end
69
69
  end
@@ -158,7 +158,7 @@ class OpenvoxStrings::Yard::CodeObjects::Type < OpenvoxStrings::Yard::CodeObject
158
158
  provider_param = Parameter.new(
159
159
  'provider',
160
160
  "The specific backend to use for this `#{name}` resource. You will seldom need " \
161
- 'to specify this --- Puppet will usually discover the appropriate provider for your platform.'
161
+ 'to specify this --- Puppet will usually discover the appropriate provider for your platform.',
162
162
  )
163
163
 
164
164
  @parameters ||= []
@@ -40,9 +40,7 @@ class OpenvoxStrings::Yard::Handlers::Puppet::FunctionHandler < OpenvoxStrings::
40
40
  def add_return_tag(object, type = nil)
41
41
  tag = object.tag(:return)
42
42
  if tag
43
- if (type && tag.types && tag.types.first) && (type != tag.types.first)
44
- log.warn "Documented return type does not match return type in function definition near #{statement.file}:#{statement.line}."
45
- end
43
+ log.warn "Documented return type does not match return type in function definition near #{statement.file}:#{statement.line}." if type && tag.types && tag.types.first && (type != tag.types.first)
46
44
 
47
45
  tag.types = type ? [type] : tag.types || ['Any']
48
46
  return
@@ -39,7 +39,7 @@ class OpenvoxStrings::Yard::Handlers::Ruby::FunctionHandler < OpenvoxStrings::Ya
39
39
  is_3x = ['Puppet::Parser::Functions', 'newfunction'].include?(module_name)
40
40
  object = OpenvoxStrings::Yard::CodeObjects::Function.new(
41
41
  get_name(statement, 'Puppet::Functions.create_function'),
42
- is_3x ? OpenvoxStrings::Yard::CodeObjects::Function::RUBY_3X : OpenvoxStrings::Yard::CodeObjects::Function::RUBY_4X
42
+ is_3x ? OpenvoxStrings::Yard::CodeObjects::Function::RUBY_3X : OpenvoxStrings::Yard::CodeObjects::Function::RUBY_4X,
43
43
  )
44
44
  object.source = statement
45
45
  register object
@@ -185,7 +185,7 @@ class OpenvoxStrings::Yard::Handlers::Ruby::FunctionHandler < OpenvoxStrings::Ya
185
185
  node_as_string(parameters[0]),
186
186
  nil, # TODO: determine default from corresponding Ruby method signature?
187
187
  method_name.include?('optional'),
188
- method_name.include?('repeated')
188
+ method_name.include?('repeated'),
189
189
  )
190
190
  end
191
191
 
@@ -216,7 +216,7 @@ class OpenvoxStrings::Yard::Handlers::Ruby::FunctionHandler < OpenvoxStrings::Ya
216
216
  nil, # TODO: determine default from corresponding Ruby method signature?
217
217
  block.method_name.source.include?('optional'),
218
218
  false, # Not repeated
219
- true # Is block
219
+ true, # Is block
220
220
  )
221
221
  end
222
222
  end
@@ -244,7 +244,7 @@ class OpenvoxStrings::Yard::Handlers::Ruby::FunctionHandler < OpenvoxStrings::Ya
244
244
  param_tags,
245
245
  parameter.source,
246
246
  parameter.file,
247
- parameter.line
247
+ parameter.line,
248
248
  )
249
249
  end
250
250
 
@@ -259,7 +259,7 @@ class OpenvoxStrings::Yard::Handlers::Ruby::FunctionHandler < OpenvoxStrings::Ya
259
259
  parameter.line,
260
260
  nil,
261
261
  parameter[1].source,
262
- true
262
+ true,
263
263
  )
264
264
  end
265
265
 
@@ -275,7 +275,7 @@ class OpenvoxStrings::Yard::Handlers::Ruby::FunctionHandler < OpenvoxStrings::Ya
275
275
  nil,
276
276
  nil,
277
277
  false,
278
- true
278
+ true,
279
279
  )
280
280
  end
281
281
 
@@ -292,7 +292,7 @@ class OpenvoxStrings::Yard::Handlers::Ruby::FunctionHandler < OpenvoxStrings::Ya
292
292
  nil,
293
293
  false,
294
294
  false,
295
- true
295
+ true,
296
296
  )
297
297
  end
298
298
 
@@ -170,7 +170,7 @@ module OpenvoxStrings::Yard::Parsers::Puppet
170
170
  case type_expr
171
171
  when Puppet::Pops::Model::AccessExpression
172
172
  # TODO: I don't like rebuilding the source from the AST, but AccessExpressions don't expose the original source
173
- @alias_of = +"#{OpenvoxStrings::Yard::Util.ast_to_text(type_expr.left_expr)}[" # alias_of should be mutable so we add a + to the string.
173
+ @alias_of = "#{OpenvoxStrings::Yard::Util.ast_to_text(type_expr.left_expr)}[" # alias_of should be mutable so we add a + to the string.
174
174
  @alias_of << type_expr.keys.map { |key| OpenvoxStrings::Yard::Util.ast_to_text(key) }.join(', ')
175
175
  @alias_of << ']'
176
176
  else
@@ -25,7 +25,7 @@ class OpenvoxStrings::Yard::Tags::OverloadTag < YARD::Tags::Tag
25
25
  name, default = parameter
26
26
  tag = tags.find { |t| t.name == name } if tags
27
27
  type = tag&.types ? "#{tag.type} " : 'Any '
28
- prefix = (name[0]).to_s if name.start_with?('*', '&')
28
+ prefix = name[0].to_s if name.start_with?('*', '&')
29
29
  name = name[1..] if prefix
30
30
  default = " = #{default}" if default
31
31
  "#{type}#{prefix}$#{name}#{default}"
@@ -15,7 +15,7 @@ end
15
15
  # Renders the layout section.
16
16
  # @return [String] Returns the rendered section.
17
17
  def layout
18
- @nav_url = url_for_list(!@file || options.index ? menu_lists.first[:type] : 'file')
18
+ @nav_url = url_for_list((!@file || options.index) ? menu_lists.first[:type] : 'file')
19
19
 
20
20
  case object
21
21
  when nil, String
@@ -78,53 +78,53 @@ def create_menu_lists
78
78
  {
79
79
  type: 'puppet_class',
80
80
  title: 'Puppet Classes',
81
- search_title: 'Puppet Classes'
81
+ search_title: 'Puppet Classes',
82
82
  },
83
83
  {
84
84
  type: 'puppet_data_type',
85
85
  title: 'Data Types',
86
- search_title: 'Data Types'
86
+ search_title: 'Data Types',
87
87
  },
88
88
  {
89
89
  type: 'puppet_defined_type',
90
90
  title: 'Defined Types',
91
- search_title: 'Defined Types'
91
+ search_title: 'Defined Types',
92
92
  },
93
93
  {
94
94
  type: 'puppet_type',
95
95
  title: 'Resource Types',
96
- search_title: 'Resource Types'
96
+ search_title: 'Resource Types',
97
97
  },
98
98
  {
99
99
  type: 'puppet_provider',
100
100
  title: 'Providers',
101
- search_title: 'Providers'
101
+ search_title: 'Providers',
102
102
  },
103
103
  {
104
104
  type: 'puppet_function',
105
105
  title: 'Puppet Functions',
106
- search_title: 'Puppet Functions'
106
+ search_title: 'Puppet Functions',
107
107
  },
108
108
  {
109
109
  type: 'puppet_task',
110
110
  title: 'Puppet Tasks',
111
- search_totle: 'Puppet Tasks'
111
+ search_totle: 'Puppet Tasks',
112
112
  },
113
113
  {
114
114
  type: 'puppet_plan',
115
115
  title: 'Puppet Plans',
116
- search_totle: 'Puppet Plans'
116
+ search_totle: 'Puppet Plans',
117
117
  },
118
118
  {
119
119
  type: 'class',
120
120
  title: 'Ruby Classes',
121
- search_title: 'Class List'
121
+ search_title: 'Class List',
122
122
  },
123
123
  {
124
124
  type: 'method',
125
125
  title: 'Ruby Methods',
126
- search_title: 'Method List'
127
- }
126
+ search_title: 'Method List',
127
+ },
128
128
  ]
129
129
 
130
130
  menu_lists.delete_if { |e| YARD::Registry.all(e[:type].intern).empty? }
@@ -134,7 +134,7 @@ def create_menu_lists
134
134
  menu_lists << {
135
135
  type: 'file',
136
136
  title: 'Files',
137
- search_title: 'File List'
137
+ search_title: 'File List',
138
138
  }
139
139
  end
140
140
 
@@ -10,7 +10,7 @@ end
10
10
  # Renders the overload section.
11
11
  # @return [String] Returns the rendered section.
12
12
  def overload
13
- erb(object.type == :puppet_function ? :puppet_overload : :overload)
13
+ erb((object.type == :puppet_function) ? :puppet_overload : :overload)
14
14
  end
15
15
 
16
16
  # Renders the enum section.
@@ -61,7 +61,7 @@ class YARD::CLI::Yardoc
61
61
  :puppet_provider,
62
62
  :puppet_function,
63
63
  :puppet_task,
64
- :puppet_plan
64
+ :puppet_plan,
65
65
  )
66
66
  end
67
67
  end
@@ -79,10 +79,10 @@ module OpenvoxStrings
79
79
 
80
80
  # Runs the YARD documentation server.
81
81
  # @param [Array<String>] args The arguments to YARD.
82
- def self.run_server(*args)
82
+ def self.run_server(*)
83
83
  require 'openvox-strings/yard'
84
84
  OpenvoxStrings::Yard.setup!
85
85
 
86
- YARD::CLI::Server.run(*args)
86
+ YARD::CLI::Server.run(*)
87
87
  end
88
88
  end
@@ -27,8 +27,8 @@ Puppet::Face.define(:strings, '0.0.1') do # rubocop:disable Metrics/BlockLength
27
27
  require 'openvox-strings'
28
28
 
29
29
  OpenvoxStrings.generate(
30
- args.count > 1 ? args[0..-2] : OpenvoxStrings::DEFAULT_SEARCH_PATTERNS,
31
- build_generate_options(args.last)
30
+ (args.count > 1) ? args[0..-2] : OpenvoxStrings::DEFAULT_SEARCH_PATTERNS,
31
+ build_generate_options(args.last),
32
32
  )
33
33
  nil
34
34
  end
@@ -46,7 +46,7 @@ Puppet::Face.define(:strings, '0.0.1') do # rubocop:disable Metrics/BlockLength
46
46
  check_required_features
47
47
  require 'openvox-strings'
48
48
 
49
- modules = args.count > 1 ? args[0..-2] : []
49
+ modules = (args.count > 1) ? args[0..-2] : []
50
50
 
51
51
  # Generate documentation for all (or the given) modules
52
52
  module_docs = []
@@ -133,7 +133,7 @@ Puppet::Face.define(:strings, '0.0.1') do # rubocop:disable Metrics/BlockLength
133
133
  search_patterns = ['types/**/*.pp', 'lib/**/*.rb']
134
134
  OpenvoxStrings.generate(
135
135
  search_patterns,
136
- build_generate_options(options)
136
+ build_generate_options(options),
137
137
  )
138
138
  nil
139
139
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvox-strings
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Inc.
@@ -10,13 +10,27 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: irb
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "<"
18
+ - !ruby/object:Gem::Version
19
+ version: '2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "<"
25
+ - !ruby/object:Gem::Version
26
+ version: '2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: openvox
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: '7'
33
+ version: '8.24'
20
34
  - - "<"
21
35
  - !ruby/object:Gem::Version
22
36
  version: '9'
@@ -26,7 +40,7 @@ dependencies:
26
40
  requirements:
27
41
  - - ">="
28
42
  - !ruby/object:Gem::Version
29
- version: '7'
43
+ version: '8.24'
30
44
  - - "<"
31
45
  - !ruby/object:Gem::Version
32
46
  version: '9'
@@ -34,16 +48,22 @@ dependencies:
34
48
  name: rgen
35
49
  requirement: !ruby/object:Gem::Requirement
36
50
  requirements:
37
- - - "~>"
51
+ - - ">="
38
52
  - !ruby/object:Gem::Version
39
53
  version: '0.9'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '0.11'
40
57
  type: :runtime
41
58
  prerelease: false
42
59
  version_requirements: !ruby/object:Gem::Requirement
43
60
  requirements:
44
- - - "~>"
61
+ - - ">="
45
62
  - !ruby/object:Gem::Version
46
63
  version: '0.9'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '0.11'
47
67
  - !ruby/object:Gem::Dependency
48
68
  name: yard
49
69
  requirement: !ruby/object:Gem::Requirement
@@ -58,6 +78,20 @@ dependencies:
58
78
  - - "~>"
59
79
  - !ruby/object:Gem::Version
60
80
  version: '0.9'
81
+ - !ruby/object:Gem::Dependency
82
+ name: voxpupuli-rubocop
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: 5.1.0
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: 5.1.0
61
95
  email: voxpupuli@groups.io
62
96
  executables: []
63
97
  extensions: []
@@ -250,14 +284,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
284
  requirements:
251
285
  - - ">="
252
286
  - !ruby/object:Gem::Version
253
- version: 2.7.0
287
+ version: 3.2.0
254
288
  required_rubygems_version: !ruby/object:Gem::Requirement
255
289
  requirements:
256
290
  - - ">="
257
291
  - !ruby/object:Gem::Version
258
292
  version: '0'
259
293
  requirements: []
260
- rubygems_version: 3.6.7
294
+ rubygems_version: 4.0.3
261
295
  specification_version: 4
262
296
  summary: Puppet documentation via YARD
263
297
  test_files: []