berkshelf/berkshelf — pull request #1335 by triccardi-systran (2014-11-04 12:49:37+00:00)
Title: fix chefignore for files in sub directories

It was broken since berkshelf 3.0.0:
1bfc97d64d38443e3326e85bd002c48399739c34 introduced the `vendor` command with the bug, and a2fcb18f41958af2b44e0b23547aa8cd07c24d8e re-implemented the `package` command using the bugged `vendor` one.

The chefignore patterns were only applied to the direct files and directories of the root, not in sub directories. Now we list all files (and empty directories) then apply the chefignore to this list.

Also add a Scenario for the command vendor feature to specifically test this.

This fixes issue #1317.

I'm not sure about Windows support and the already existing `src = cookbook.path.to_s.gsub('\\', '/')` seems dubious: we should probably patch the ignore patterns instead. I don't have a Windows machine to test this. But it should not be worse than before this patch.