lib/rubocop/cop/chef/modernize/execute_sleep.rb in cookstyle-7.7.2 vs lib/rubocop/cop/chef/modernize/execute_sleep.rb in cookstyle-7.8.0
- old
+ new
@@ -19,11 +19,13 @@
module Cop
module Chef
module Modernize
# Chef Infra Client 15.5 and later include a chef_sleep resource that should be used to sleep between executing resources if necessary instead of using the bash or execute resources to run the sleep command.
#
- # # bad
+ # @example
+ #
+ # #### incorrect
# execute "sleep 60" do
# command "sleep 60"
# action :run
# end
#
@@ -31,10 +33,10 @@
# user 'root'
# cwd '/tmp'
# code 'sleep 60'
# end
#
- # # good
+ # #### correct
# chef_sleep '60'
#
class ExecuteSleep < Cop
include RuboCop::Chef::CookbookHelpers
extend TargetChefVersion