examples/cursor.rb in mongodb-mongo-0.12 vs examples/cursor.rb in mongodb-mongo-0.13
- old
+ new
@@ -1,15 +1,15 @@
$LOAD_PATH[0,0] = File.join(File.dirname(__FILE__), '..', 'lib')
require 'mongo'
require 'pp'
-include XGen::Mongo::Driver
+include Mongo
host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
-port = ENV['MONGO_RUBY_DRIVER_PORT'] || XGen::Mongo::Driver::Mongo::DEFAULT_PORT
+port = ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT
puts "Connecting to #{host}:#{port}"
-db = Mongo.new(host, port).db('ruby-mongo-examples')
+db = Connection.new(host, port).db('ruby-mongo-examples')
coll = db.collection('test')
# Erase all records from collection, if any
coll.clear