mongodb/mongo-ruby-driver — pull request #246 by durran (2013-08-11 11:46:54+00:00)
Title: New Write Concern Behavior

This implements the new write concerns, following a similar modeling to the way the read preference pull request is following.

The write concerns are divided into two categories: `Mongo::WriteConcern::Acknowledged` and `Mongo::WriteConcern::Unacknowledged'. This naming is in line with the nomenclature in the Mongo docs: http://docs.mongodb.org/manual/core/write-concern/

"journaled" and "replca acknowledged" are not modeled because they have the exact same behavior as "acknowledged", just different values or keys for the options.

Each concern has a single method, `get_last_error`, which will return the appropriate gle command. This also handles the cases where users may have specified `:w => :tagset` or `:w => :majority` and the symbol names need to be converted to strings since the server cannot handle it.

Once node or connection are finished I assume the gle will be piggybacked simply by calling `client.write_concern.get_last_error` and if it's `nil` do nothing and if it's not `nil` then piggyback it.