Instead of trying to find a cookbook based on the directory name, look at which directory contains a `metadata.json` or `metadata.rb` file and use that one. I wrote an extension to Pathname that does this [here](https://github.com/berkshelf/berkshelf/blob/master/lib/berkshelf/core_ext/pathname.rb).