class RuboCop::Cop::Chef::Deprecations::ResourceUsesUpdatedMethod
Don’t call the deprecated ‘updated=` method in a resource to set the resource to updated. This method was removed from Chef
Infra Client 13 and this will now cause an error. Instead wrap code that updated the state of the node in a `converge_by` block. Documentation on using the `converge_by` block can be found at docs.chef.io/custom_resources/.
@example
### incorrect action :foo do updated = true end ### correct action :foo do converge_by('resource did something') do # code that causes the resource to converge end
Constants
- MSG
Public Instance Methods
Source
# File lib/rubocop/cop/chef/deprecation/resource_uses_updated_method.rb, line 40 def on_lvasgn(node) add_offense(node, severity: :warning) if node.node_parts.first == :updated end