Class: RuboCop::Cop::Chef::Modernize::IncludingOhaiDefaultRecipe
- Defined in:
- lib/rubocop/cop/chef/modernize/ohai_default_recipe.rb
Overview
The Ohai default recipe previously allowed a user to ship custom Ohai plugins to a system by including them in a directory in the Ohai cookbook. This functionality was replaced with the ohai_plugin resource, which should be used instead as it doesn’t require forking the ohai cookbook.
Constant Summary collapse
- MSG =
"Use the ohai_plugin resource to ship custom Ohai plugins instead of using the ohai::default recipe. If you're not shipping custom Ohai plugins, then you can remove this recipe entirely"
- RESTRICT_ON_SEND =
[:include_recipe].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
38 39 40 41 42 |
# File 'lib/rubocop/cop/chef/modernize/ohai_default_recipe.rb', line 38 def on_send(node) ohai_recipe_usage?(node) do add_offense(node, severity: :refactor) end end |