Class: RuboCop::Cop::Chef::Deprecations::PolicyfileCommunitySource
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/chef/deprecation/policyfile_community_source.rb
Overview
The Policyfile source of ‘:community` has been replaced with `:supermarket`
Constant Summary collapse
- MSG =
'The Policyfile source of `:community` has been replaced with `:supermarket`.'
- RESTRICT_ON_SEND =
[:default_source].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/rubocop/cop/chef/deprecation/policyfile_community_source.rb', line 42 def on_send(node) community_source?(node) do add_offense(node, severity: :warning) do |corrector| corrector.replace(node, 'default_source :supermarket') end end end |