bin/mongo_console in mongo-1.7.1 vs bin/mongo_console in mongo-1.8.0
- old
+ new
@@ -8,14 +8,14 @@
require 'mongo'
include Mongo
host = org_argv[0] || ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
-port = org_argv[1] || ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT
+port = org_argv[1] || ENV['MONGO_RUBY_DRIVER_PORT'] || MongoClient::DEFAULT_PORT
dbnm = org_argv[2] || ENV['MONGO_RUBY_DRIVER_DB'] || 'ruby-mongo-console'
-puts "Connecting to #{host}:#{port} (CONN) on with database #{dbnm} (DB)"
-CONN = Connection.new(host, port)
-DB = CONN.db(dbnm)
+puts "Connecting to #{host}:#{port} (CLIENT) on with database #{dbnm} (DB)"
+CLIENT = MongoClient.new(host, port)
+DB = CLIENT.db(dbnm)
puts "Starting IRB session..."
IRB.start(__FILE__)