From 125e84a6e9e08a18f3e962fb8b20862a7e8fbea6 Mon Sep 17 00:00:00 2001 From: Jim Menard Date: Mon, 8 Dec 2008 16:58:16 -0500 Subject: [PATCH] db name command line arg --- bin/mongo_console | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/mongo_console b/bin/mongo_console index 21bfbfb..e7a2293 100755 --- a/bin/mongo_console +++ b/bin/mongo_console @@ -11,9 +11,10 @@ include XGen::Mongo::Driver host = org_argv[0] || 'localhost' port = org_argv[1] || XGen::Mongo::Driver::Mongo::DEFAULT_PORT +db_name = org_argv[2] || 'ruby-mongo-console' -puts "Connecting to #{host}:#{port} on DB" -DB = Mongo.new(host, port).db('ruby-mongo-examples-irb') +puts "Connecting to #{host}:#{port} on DB for #{db_name}" +DB = Mongo.new(host, port).db(db_name) puts "Starting IRB session..." -IRB.start(__FILE__) \ No newline at end of file +IRB.start(__FILE__)