mongodb/mongo-ruby-driver — pull request #363 by estolfo (2014-02-20 21:05:52+00:00)
Title: RUBY-723 Support the $meta projection operator and sort field

The driver should allow projection operator values to be hashes to permit the following code:

coll.find_one({ :$text => { :$search => 'spam' }},
{ :fields => [:t, { :score => { :$meta => 'textScore' } }] })

Similarly, sort values can also be hashes:

assert coll.find({ :$text => { :$search => 'spam' }}).sort(:score => { '$meta' =>'textScore' })