jnunemaker/mongomapper — pull request #478 by archSeer (2012-12-01 22:46:27+00:00)
Title: Update for recent changes in mongo 1.8.0.

MongoDB has recently put trough a series of commits that deprecate certain class names as well as deprecate the `:safe` option in favor of `:w` (write concern). This changeset updates mongomapper to use Mongo::MongoClient and Mongo::MongoReplicaSetClient instead of Mongo::Connection and Mongo::ReplSetConnection.

However, there is a bit more work to be done, the 1.8.0 ruby driver deprecates safe and uses :w, where:
```ruby
@mongo_client.save({:doc => 'foo'}, {:w => 0}) # writes are not acknowledged
@mongo_client.save({:doc => 'foo'}, {:w => 1}) # writes are acknowledged (mongo client DEFAULT as of 1.8)
@mongo_client.save({:doc => 'foo'}, {:w => 2}) # replica set acknowledged
```
As the writes are now acknowledged by default, the Safe plugin may be removed. (I was unsure whether to remove it or not, so I did not yet include that changeset.)

The gem dependency should also be bumped to version 1.8.0 for mongo.