jschat 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jschat/storage/mongo.rb +1 -1
- metadata +2 -2
data/lib/jschat/storage/mongo.rb
CHANGED
@@ -8,7 +8,7 @@ module JsChat::Storage
|
|
8
8
|
def self.connect!
|
9
9
|
@db = Mongo::Connection.new(ServerConfig['db_host'], ServerConfig['db_port']).db(ServerConfig['db_name'])
|
10
10
|
if ServerConfig['db_username'] and ServerConfig['db_password']
|
11
|
-
unless @db.
|
11
|
+
unless @db.add_auth(ServerConfig['db_name'], ServerConfig['db_username'], ServerConfig['db_password'])
|
12
12
|
raise 'Bad Mongo username or password'
|
13
13
|
end
|
14
14
|
end
|