rtgibbons/grunt-cloudfiles — pull request #11 by kenperkins (2013-06-19 21:43:09+00:00)
Title: Adding support for syncing based on MD5 hash

### FYI * * * Not Ready For Merge * * *

I wanted to open this PR even though it's not yet ready for merge. As part of a [pending PR][0] I'm authoring for [`pkgcloud`][1] I've added robust CDN container support to the Rackspace storage provider. As part of this change, I've enabled `grunt-cloudfiles` to do the following when uploading:

1. Create and CDN enable the container, if not already created
2. Set the container to CDN enabled if it exists but is not CDN enabled
3. Upload the files based on MD5 hash, only uploading when not found in the container, or the MD5 hash is different.

As this PR depends on publishing the CDN changes to `pkgcloud` it's not yet ready to publish, but I wanted to start the dialog with you sooner.

I also took some liberty and moved to Async vs underscore deferred. I find the Async approach is more explicit and easy to follow/maintain, but I'm happy to negotiate on these points :)

Thanks!

[0]: https://github.com/nodejitsu/pkgcloud/pull/161
[1]: https://github.com/nodejitsu/pkgcloud