class RuboCop::Cop::Chef::Modernize::ResourceForcingCompileTime
The hostname, build_essential, chef_gem, and ohai_hint resources include ‘compile_time’ properties, which should be used to force the resources to run at compile time by setting ‘compile_time true`.
@example
### incorrect build_essential 'install build tools' do action :nothing end.run_action(:install) ### correct build_essential 'install build tools' do compile_time true end
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
Source
# File lib/rubocop/cop/chef/modernize/compile_time_resources.rb, line 44 def on_send(node) compile_time_resource?(node) do add_offense(node, severity: :refactor) end end