Class: RuboCop::Cop::Chef::Deprecations::ResourceUsesProviderBaseMethod
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Chef::Deprecations::ResourceUsesProviderBaseMethod
- Defined in:
- lib/rubocop/cop/chef/deprecation/resource_uses_provider_base_method.rb
Overview
The Resource.provider_base allows the developer to specify within a resource a module to load the resource's provider from. Instead, the provider should call provides to register itself, or the resource should call provider to specify the provider to use.
Constant Summary collapse
- MSG =
"Don't use the deprecated provider_base method in a resource to specify the provider module to use. Instead, the provider should call provides to register itself, or the resource should call provider to specify the provider to use. This will cause failures in Chef Infra Client 13 and later."- RESTRICT_ON_SEND =
[:provider_base].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
37 38 39 |
# File 'lib/rubocop/cop/chef/deprecation/resource_uses_provider_base_method.rb', line 37 def on_send(node) add_offense(node, severity: :warning) end |