Skip to content

Commit

Permalink
Merge pull request #374 from puppetlabs/maint_fix_rubocop_warnings
Browse files Browse the repository at this point in the history
(maint) Fix rubocop lint warnings
  • Loading branch information
jordanbreen28 committed Dec 5, 2023
2 parents a32bb82 + e3a9bfd commit 73e92aa
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/puppet-strings/describe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def self.list_one(object)
targetlength = 48
shortento = targetlength - 4
contentstring = object[:docstring][:text]
end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
contentstring = contentstring[0..end_of_line] unless end_of_line.nil?
contentstring = "#{contentstring[0..shortento]} ..." if contentstring.length > targetlength

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 @@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Functions < PuppetStrings::Yard::CodeObj
# @param [Symbol] type The function type to get the group for.
# @return Returns the singleton instance of the group.
def self.instance(type)
super("puppet_functions_#{type}".to_sym)
super(:"puppet_functions_#{type}")
end

# Gets the display name of the group.
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/code_objects/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Providers < PuppetStrings::Yard::CodeObj
# @param [String] type The resource type name for the provider.
# @return Returns the singleton instance of the group.
def self.instance(type)
super("puppet_providers_#{type}".to_sym)
super(:"puppet_providers_#{type}")
end

# Gets the display name of the group.
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/code_objects/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def parameters
# render-time. For now, this should re-resolve on every call.
# may be able to memoize this
def providers
providers = YARD::Registry.all("puppet_providers_#{name}".to_sym)
providers = YARD::Registry.all(:"puppet_providers_#{name}")
return providers if providers.empty?

providers.first.children
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.github_to_yard_links(data)
# @return [Array] Returns an array of tag hashes.
def self.tags_to_hashes(tags)
# Skip over the API tags that are public
tags.select { |t| (t.tag_name != 'api' || t.text != 'public') }.map do |t|
tags.select { |t| t.tag_name != 'api' || t.text != 'public' }.map do |t|
next t.to_hash if t.respond_to?(:to_hash)

tag = { tag_name: t.tag_name }
Expand Down

0 comments on commit 73e92aa

Please sign in to comment.