moped v1.3.0 Release Notes
-
๐ New Features
#114 Moped now accepts connecting with a URI. (Christopher Winslett)
Moped::Session.connect("mongodb://localhost:27017/my_db")
๐ #79 Tailable cursors are now supported. These are just Ruby
Enumerators
that keep the cursor open until the next document appears. The cursor will be closed when it becomes "dead".enumerator = session[:users].find.tailable.each enumerator.next # Will stay open until next doc.
๐ง mongoid/mongoid#2460 Moped now makes the connection timeout configurable by passing a
:timeout
option to the session. This defaults to 5 seconds.Moped::Session.new([ "node1:27017", "node2:27017" ], timeout: 5)
๐ #49 Support for the 2.2 aggregation framework is included. (Rodrigo Saito)
session[:users].aggregate({ "$group" => { "_id" => "$city", "totalpop" => { "$sum" => "$pop" } } })
๐ #42 Moped now supports SSL connections to MongoDB. Provide the
ssl: true
option when creating a newSession
. This is currently experimental.Moped::Session.new([ "ssl.mongohq.com:10004" ], ssl: true)
Resolved Issues
โฑ #110 Handle timeout errors with SSL connections gracefully and mark nodes as down without failing any other queries.
#109 Moped reauthorizes on "db assertion failures" with commands that have an unauthorized assertion code in the reply.