Derelict Ripon pub to be converted into home