Skip to content

Commit cbd8983

Browse files
committed
(MAINT) Addressing wrong Rubocop TargetRubyVersion
Prior to this commit, during the Puppet 8 support work, TargetRubyVersion was set to 2.7 and a cop rule was addressed according to it. However, the correct ruby version is 2.6. This commit aims to address the previously wrongly set version along with an unnecesary change that breaks some compatibility with 2.6 systems.
1 parent 7d9fd72 commit cbd8983

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require:
77
AllCops:
88
DisplayCopNames: true
99
NewCops: enable
10-
TargetRubyVersion: '2.7'
10+
TargetRubyVersion: '2.6'
1111
ExtraDetails: true
1212
DisplayStyleGuide: true
1313
Include:

lib/puppet/type/concat_file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ def exists?
190190

191191
def fragments
192192
# Collect fragments that target this resource by path, title or tag.
193-
@fragments ||= catalog.resources.filter_map do |resource|
193+
@fragments ||= catalog.resources.map { |resource|
194194
next unless resource.is_a?(Puppet::Type.type(:concat_fragment))
195195

196196
if resource[:target] == self[:path] || resource[:target] == title ||
197197
(resource[:tag] && resource[:tag] == self[:tag])
198198
resource
199199
end
200-
end
200+
}.compact
201201
end
202202

203203
def decompound(d)

0 commit comments

Comments
 (0)