opscode/test-kitchen — pull request #198 by eherot (2013-09-11 22:55:29+00:00)
Title: Use recursive delete instead of massive file list to filter cookbook directories (also, include dotfiles)

Currently the code builds an array of all files in each cookbook directory, subtracts all "legitimate" files, and uploads the difference. In cases where bundle install is being used (such as is often the case with artifact cookbooks), this array can be quite large as it will include the entire vender gems directory. Also, hidden files and directories are not included, resulting in fatal upload errors if there are symlinks pointing to any files inside hidden directories.

Instead of all this chicanery, this pull request switches to using only auditing the top level directory (including hidden "dot" files), and then doing an rm_r on anything that isn't on the list.