lwf/puppet-remote_file — pull request #8 by reidmv (2014-11-21 01:33:00+00:00)
Title: New feature: ensure => latest

This pull request adds a new capability to the remote_file type and ruby provider, ensure=latest.

When ensure=latest is specified, the provider will check the HTTP Last-Modified header from the remote source to determine whether or not the resource is in sync. If the Last-Modified header is found not to match the mtime of the deployed file, the resource will be considered out of sync and a new copy will be downloaded.

ensure=latest will only work when the source is served by a server that provides the Last-Modified header. If the source server does not provide the Last-Modified header and ensure=latest is specified, the provider will raise an exception.

By necessity there is a large amount of refactoring in the provider to enable the ensure=latest functionality.