Skip to content

Commit a256607

Browse files
committed
(CONT-812) Fix spec failures
1 parent 1ee7abd commit a256607

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

Diff for: lib/puppet-strings.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# rubocop:disable Naming/FileName
2-
31
# frozen_string_literal: true
42

53
# The root module for Puppet Strings.

Diff for: lib/puppet-strings/markdown/resource_type.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def parameters
5050

5151
def regex_in_data_type?(data_type)
5252
m = data_type.match(%r{\w+\[/.*/\]})
53-
m unless m.nil? || m.empty?
53+
m unless m.nil? || m.to_a.empty?
5454
end
5555
end
5656
end

Diff for: lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
# rubocop:disable Naming/MethodName
4-
53
require 'puppet-strings/yard/handlers/helpers'
64
require 'puppet-strings/yard/handlers/ruby/base'
75
require 'puppet-strings/yard/code_objects'

Diff for: lib/puppet-strings/yard/handlers/ruby/type_base.rb

+2
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ def set_values(node, object)
116116
next unless node_as_string(kvp[0]) == 'parent'
117117

118118
if kvp[1].source == 'Puppet::Parameter::Boolean'
119+
# rubocop:disable Performance/InefficientHashSearch
119120
object.add('true') unless object.values.include? 'true'
120121
object.add('false') unless object.values.include? 'false'
121122
object.add('yes') unless object.values.include? 'yes'
122123
object.add('no') unless object.values.include? 'no'
124+
# rubocop:enable Performance/InefficientHashSearch
123125
end
124126
break
125127
end

Diff for: lib/puppet-strings/yard/parsers/puppet/parser.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
# rubocop:disable Naming/MethodName
4-
53
require 'puppet'
64
require 'puppet/pops'
75
require 'puppet-strings/yard/parsers/puppet/statement'

0 commit comments

Comments
 (0)