Class: RuboCop::Cop::Chef::ChefDeprecations::CookbookDependsOnPoise
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Chef::ChefDeprecations::CookbookDependsOnPoise
- Defined in:
- lib/rubocop/cop/chef/deprecation/depends_poise.rb
Overview
Cookbooks should not depend on the deprecated Poise framework cookbooks. They should instead be refactored to use standard Chef Infra custom resources.
Constant Summary collapse
- MSG =
'Cookbooks should not depend on the deprecated Poise framework'.freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
36 37 38 39 40 |
# File 'lib/rubocop/cop/chef/deprecation/depends_poise.rb', line 36 def on_send(node) depends_method?(node) do |arg| add_offense(node, location: :expression, message: MSG, severity: :refactor) if %w(poise poise-service).include?(arg.value) end end |