sethvargo/stove — pull request #48 by bcobb (2014-07-13 15:33:00+00:00)
Title: Tarball inner directory name matches cookbook name

This ought to fix #47.

Stove used to put [a directory with the same name as the cookbook](https://github.com/sethvargo/stove/blob/9d9719da1c74f18424e776d559ae5a51e4d33dbb/lib/stove/packager.rb#L69) in the archive, but switching to an in-memory archive builder [preserved the on-disk directory name](https://github.com/sethvargo/stove/blob/4c50371883b592790196d4bbc1213904f9da4b67/lib/stove/packager.rb#L95) (the linked line would turn `/Users/bcobb/cookbooks/basic-cookbook/metadata.rb` into `basic-cookbook/metadata.rb`, not `basic/metadata.rb`).

To make sure I wasn't reading the code wrong, I wrote a [bisect script](https://gist.github.com/bcobb/aff064f1acf2f46c6eea), which confirmed my suspicion.

The implementation of the second commit is a little out there (so much `map`). _I_ think it makes the transformation from absolute file path to tarball file path clearer than if those transformations were stuffed into the `reduce` block, but ultimately it's a matter of style. Happy to change it if need be.