[COOK-3694] Fix offences found by rubocop on travis