class RuboCop::Cop::Chef::Modernize::IncludingOhaiDefaultRecipe

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.

@example

#### incorrect
include_recipe 'ohai::default'
include_recipe 'ohai'

Constants

MSG
RESTRICT_ON_SEND

Public Instance Methods

on_send(node) click to toggle source
# 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