tobami/littlechef — pull request #81 by drhevans (2012-01-13 15:57:45+00:00)
Title: Littlechef shouldn't rely on metadata as the definitive list of available recipes

Currently, littlechef only sees recipes that are listed in a cookbook's `metadata.json`, but according to the [OpsCode documentation](http://wiki.opscode.com/display/chef/Metadata#Metadata-recipe) this list is just used for supplying friendly descriptions for recipes and is not meant to be the definitive list of available recipes.

If you clone the official `cookbooks` repo you'll see that quite a few of the official cookbooks don't list all their recipes in the metadata. The below commands will print a list of cookbooks together with the number of recipes listed in their metadata and the number they actually contain:

git clone https://github.com/opscode/cookbooks.git
cd cookbooks
for cookbook in `find * -maxdepth 0 -type d`; \
do echo -n "$cookbook: "; \
grep -c ^recipe $cookbook/metadata.rb | tr '\n' ' \0'; \
ls $cookbook/recipes/*.rb | wc -l; \
done