chefspec/berkshelf does all of this stuff for you