Skip to content

(CAT-2281) Remove puppet 7 infrastructure #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/puppet-strings/markdown/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def defaults
def toc_info
{
name: name.to_s,
link: link,
link:,
desc: summary || @registry[:docstring][:text][0..140].tr("\n", ' '),
private: private?
}
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/code_objects/function.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def to_hash
hash[:signatures] << { signature: o.signature, docstring: PuppetStrings::Yard::Util.docstring_to_hash(o.docstring, %i[param option enum return example]) }
end
else
hash[:signatures] << { signature: signature, docstring: PuppetStrings::Yard::Util.docstring_to_hash(docstring, %i[param option enum return example]) }
hash[:signatures] << { signature:, docstring: PuppetStrings::Yard::Util.docstring_to_hash(docstring, %i[param option enum return example]) }
end

hash[:docstring] = PuppetStrings::Yard::Util.docstring_to_hash(docstring)
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/handlers/ruby/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class PuppetStrings::Yard::Handlers::Ruby::Base < YARD::Handlers::Ruby::Base
# A regular expression for detecting the start of a Ruby heredoc.
# Note: the first character of the heredoc start may have been cut off by YARD.
HEREDOC_START = /^<?<[-~]?['"]?(\w+)['"]?[^\n]*\n?/.freeze
HEREDOC_START = /^<?<[-~]?['"]?(\w+)['"]?[^\n]*\n?/

protected

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def extract_params(hash)
default = value['value'] unless value['value'].nil?
end
data_type = [data_type] unless data_type.nil? || data_type.is_a?(Array)
params_hash[key] = { types: data_type, default: default }
params_hash[key] = { types: data_type, default: }
end

params_hash
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/parsers/puppet/statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module PuppetStrings::Yard::Parsers::Puppet
# Represents the base Puppet language statement.
class Statement
# The pattern for parsing docstring comments.
COMMENT_REGEX = /^\s*#+\s?/.freeze
COMMENT_REGEX = /^\s*#+\s?/

attr_reader :source, :file, :line, :docstring, :comments_range

Expand Down
4 changes: 2 additions & 2 deletions lib/puppet-strings/yard/tags/overload_tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
# @param [Array] args The args passed to the method.
# @param block The block passed to the method.
# @return Returns what the method call on the object would return.
def method_missing(method_name, *args, &block)
return object.send(method_name, *args, &block) if object.respond_to? method_name
def method_missing(method_name, ...)
return object.send(method_name, ...) if object.respond_to? method_name

Check warning on line 79 in lib/puppet-strings/yard/tags/overload_tag.rb

View check run for this annotation

Codecov / codecov/patch

lib/puppet-strings/yard/tags/overload_tag.rb#L79

Added line #L79 was not covered by tests

super
end
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/puppet-strings/json_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class klass(Integer $param1, $param2, String $param3 = hi) inherits foo::bar {
#
# @param [Proc] block The block to capture output from
# @return [Hash] A hash containing the captured output
def capture_output(&_block)
def capture_output(&)
begin
$stdout = StringIO.new
$stderr = StringIO.new
Expand Down
Loading