Migrating map/reduce to ruby driver