Melky Cabrera gets ring from Giants, then helps beat them