The function `rest` should already return a properly configured Chef::REST object so you shouldn't need to create another one here.