lib/ridley/chef_objects/cookbook_object.rb in ridley-0.12.0 vs lib/ridley/chef_objects/cookbook_object.rb in ridley-0.12.1

- old
+ new

@@ -116,11 +116,11 @@ # @param [String] destination # where to download the file to # # @return [nil] def download_file(filetype, path, destination) - files = case filetype.to_sym + file_list = case filetype.to_sym when :attribute, :attributes; attributes when :definition, :definitions; definitions when :file, :files; files when :library, :libraries; libraries when :provider, :providers; providers @@ -130,10 +130,10 @@ when :template, :templates; templates else raise Errors::UnknownCookbookFileType.new(filetype) end - file = files.find { |f| f[:path] == path } + file = file_list.find { |f| f[:path] == path } return nil if file.nil? destination = File.expand_path(destination) log.debug { "downloading '#{filetype}' file: #{file} to: '#{destination}'" }