Moved cookbook uploading logic outside

The logic to upload all cookbooks needs to be shared globally so
I move them from Chef's cookbook to an Ruby file.