The right-handed hitting Ruf, 36, is hitting .216 with 11 home runs and 38 RBIs this season. He has an .886 OPS against lefties, giving the Mets a player to platoon at designated hitter with left-handed-hitting Daniel Vogelbach, who will start against right-handers. The Mets acquired Vogelbach last month in a trade with the Pittsburgh Pirates.
Davis, 29, struggled this season when called upon to fill the DH spot and is hitting .238 with four home runs and 21 RBIs this season.
Givens, 32, is 6-2 with two saves and a 2.66 ERA over 40⅔ innings pitched this season. Givens pitched for Mets manager Buck Showalter with the Baltimore Orioles from 2015-18 when Showalter was Baltimore's manager.
The Giants also received left-hander Nick Zwack, right-hander Carson Seymour and Thomas Szapucki.
Zwack, 24, is 6-2 with 2.36 ERA in 18 appearances (15 starts) in two Class A stops in the Mets' system, while Seymour, 23, is 5-5 with a 2.76 ERA in 18 appearances (13 stops) in two Class A stops.
Szapucki, 26 and currently at Triple-A Syracuse, made one major league start this season, allowing four home runs and nine earned runs in 1⅓ innings in a start against the Giants. He is 2-6 with a 3.38 ERA in 18 appearances (16 starts) for Syracuse.
In exchange for Givens, the Cubs received right-hander Saul Gonzalez, a 22-year-old right-hander who is 2-1 with a 2.81 ERA in 25⅔ innings pitched for Class A St. Lucie this season.