Permalink
Browse files

Update to MongoDB to change deprecated method names

Signed-off-by: Yehuda Katz <wycats@gmail.com>
  • Loading branch information...
laktek authored and wycats committed Aug 23, 2009
1 parent abd3afc commit a7ce535d5ea01e398bd614641066828b0f263e5e
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/moneta/mongodb.rb
View
@@ -16,7 +16,7 @@ def initialize(options = {})
:db => 'cache',
:collection => 'cache'
}.update(options)
- conn = XGen::Mongo::Driver::Mongo.new(options[:host], options[:port])
+ conn = XGen::Mongo::Driver::Connection.new(options[:host], options[:port])
@cache = conn.db(options[:db]).collection(options[:collection])
end
@@ -42,7 +42,7 @@ def delete(key)
def store(key, value, options = {})
exp = options[:expires_in] ? (Time.now + options[:expires_in]) : nil
- @cache.repsert({ '_id' => key }, { '_id' => key, 'data' => value, 'expires' => exp })
+ @cache.update({ '_id' => key }, { '_id' => key, 'data' => value, 'expires' => exp })
end
def update_key(key, options = {})

0 comments on commit a7ce535

Please sign in to comment.