opscode/chef-dk — pull request #87 by danielsdeleo (2014-06-30 22:16:25+00:00)
Title: Cache community coookbooks

Implements library code to fetch all cookbooks specified by a policyfile, cache them to disk, and emit a policyfile lock data structure.

Given a Policyfile like https://github.com/opscode/chef-dk/blob/c5d2f6369e3b42022f6c00b1748d8569aa08e368/test-scripts/Policyfile.rb then running a script like https://github.com/opscode/chef-dk/blob/c5d2f6369e3b42022f6c00b1748d8569aa08e368/test-scripts/doit.rb installs the cookbooks locally like:

```
ls -1 ~/.chefdk/cache/cookbooks
7-zip-1.0.2-supermarket.getchef.com
apache2-1.10.4-supermarket.getchef.com
build-essential-2.0.0-supermarket.getchef.com
chef-sugar-2.0.0-supermarket.getchef.com
chef_handler-1.1.6-supermarket.getchef.com
iptables-0.13.2-supermarket.getchef.com
logrotate-1.6.0-supermarket.getchef.com
omnibus-2cf98f9797cacce9c8688fc4e74858b858e2bc14
pacman-1.1.1-supermarket.getchef.com
windows-1.31.0-supermarket.getchef.com
wix-1.1.0-supermarket.getchef.com
```