markevans/dragonfly — pull request #179 by fcheung (2012-03-19 17:28:43+00:00)
Title: Allow mongodatastore to connect to mongo replica

This also allows passing arbitrary connection options to the mongo driver.

the mongo driver changed how the replica set seeds are passed between 1.5.2 and 1.6.1. With 1.5 you'd do

Mongo::ReplSetConnection.new(['host1', 27017], ['host2', 27017], {:some_option => true})

(ie a variable number of arguments)

with 1.6 you do

Mongo::ReplSetConnection.new(['host1:27017', 'host2:27017'], {:some_option => true})

This patch only handles the setup 1.6 uses. I could look at extending it to support 1.5 too if that is of interest