mongoo

Changelog

0.2.2

  • async mode works again, but now you have to manually require:

    require "mongoo/async"
    Mongoo.conn    = Mongo::Connection.new("localhost", 27017, :pool_size => 5, :timeout => 5)
    Mongoo.db_name = "mongoo-test"
    

    see test_async.rb for an example.

0.2.1

  • Identity Map now also stores results from find.to_a, find.each and find.next

0.2.0

  • Depends on mongo gem >= 1.3.1

  • Can no longer set Mongoo.config = …

    Set Mongoo.conn and Mongoo.db_name instead (more flexibility):

    Mongoo.conn    = Mongo::Connection.new("localhost", 27017, :pool_size => 5, :timeout => 5)
    Mongoo.db_name = "mongoo-test"
    

    You can set these on a model level as well:

    Person.conn    = Mongo::Connection.new("localhost", 30000, :pool_size => 5, :timeout => 5)
    Person.db_name = "mongoo-test"
    
  • You can optionally set the collection name on a model now:

    class Person < Mongoo::Base
      collection_name "spacemen"
    end
    
  • There is a new Identity Map feature available. It will only work when using find_one to find a specific id. You need to manually turn it on:

    Mongoo::IdentityMap.on!
    

    If using it in a web application like Rails be sure to flush the map after each request:

    Mongoo::IdentityMap.flush!
    

    The map is scoped to the current thread or fiber. You can also turn the map back off:

    Mongoo::IdentityMap.off!
    

    Inspired by: railstips.org/blog/archives/2010/02/21/mongomapper-07-identity-map/

Contributing to mongoo

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2010 Ben Myles. See LICENSE.txt for further details.