module Chef::Deprecation::Provider::Template
Deprecation::Provider::Template¶ ↑
This module contains the deprecated functions of Chef::Provider::Template. These functions are refactored to different components. They are frozen and will be removed in Chef 12.
Public Instance Methods
content_matches?()
click to toggle source
# File lib/chef/deprecation/provider/template.rb, line 56 def content_matches? @current_resource.checksum == @new_resource.checksum end
rendered(rendered_template)
click to toggle source
# File lib/chef/deprecation/provider/template.rb, line 50 def rendered(rendered_template) @new_resource.checksum(checksum(rendered_template.path)) Chef::Log.debug("Current content's checksum: #{@current_resource.checksum}") Chef::Log.debug("Rendered content's checksum: #{@new_resource.checksum}") end
resource_cookbook()
click to toggle source
# File lib/chef/deprecation/provider/template.rb, line 46 def resource_cookbook @new_resource.cookbook || @new_resource.cookbook_name end
template_finder()
click to toggle source
# File lib/chef/deprecation/provider/template.rb, line 34 def template_finder @template_finder ||= begin Chef::Provider::TemplateFinder.new(run_context, cookbook_name, node) end end
template_location()
click to toggle source
# File lib/chef/deprecation/provider/template.rb, line 40 def template_location @template_file_cache_location ||= begin template_finder.find(@new_resource.source, :local => @new_resource.local, :cookbook => @new_resource.cookbook) end end