File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
app/services/foreman_puppet Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11# This configuration was generated by
22# `rubocop --auto-gen-config`
3- # on 2024-12-17 15:04:46 UTC using RuboCop version 1.23.0.
3+ # on 2024-12-17 15:06:35 UTC using RuboCop version 1.23.0.
44# The point is for the user to remove these configuration records
55# one by one as the offenses are removed from the code base.
66# Note that changes in the inspected code, or installation of new
@@ -25,7 +25,7 @@ Metrics/BlockLength:
2525# Offense count: 2
2626# Configuration parameters: CountComments, CountAsOne.
2727Metrics/ClassLength :
28- Max : 246
28+ Max : 254
2929
3030# Offense count: 19
3131# Configuration parameters: IgnoredMethods.
Original file line number Diff line number Diff line change @@ -229,7 +229,17 @@ def ignored_file_path
229229 end
230230
231231 def load_ignored_file
232- File . exist? ( ignored_file_path ) ? YAML . load_file ( ignored_file_path ) : { }
232+ if File . exist? ( ignored_file_path )
233+ # Ruby 3+
234+ if YAML . respond_to ( :safe_load_file )
235+ YAML . safe_load_file ( ignored_file_path , permitted_classes : [ Symbol , Regexp ] )
236+ else
237+ # NOTE: Once we drop Ruby 2.7 support, you can drop the load_file call.
238+ YAML . load_file ( ignored_file_path )
239+ end
240+ else
241+ { }
242+ end
233243 end
234244
235245 def ignored_file
You can’t perform that action at this time.
0 commit comments