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