The connection between gamma-ray bursts and supernovae Ib/c