lib/rubocop/cop/chef/modernize/macos_user_defaults.rb in cookstyle-7.30.1 vs lib/rubocop/cop/chef/modernize/macos_user_defaults.rb in cookstyle-7.30.3
- old
+ new
@@ -45,10 +45,10 @@
MSG = 'The mac_os_x_userdefaults resource was renamed to macos_userdefaults when it was added to Chef Infra Client 14.0. The new resource name should be used.'
RESTRICT_ON_SEND = [:mac_os_x_userdefaults].freeze
def on_send(node)
- add_offense(node, message: MSG, severity: :refactor) do |corrector|
+ add_offense(node, severity: :refactor) do |corrector|
corrector.replace(node, node.source.gsub(/^mac_os_x_userdefaults/, 'macos_userdefaults'))
end
end
end
end