Remove duplicating character classes from URI regexp in Mongo::URIParser

This commit is contained in:
Wojciech Piekutowski 2011-02-20 15:36:15 +01:00
parent 730118539e
commit b541972bdc
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ module Mongo
class URIParser class URIParser
DEFAULT_PORT = 27017 DEFAULT_PORT = 27017
MONGODB_URI_MATCHER = /(([-_.\w\d]+):([^@]+)@)?([-.\w\d]+)(:([\w\d]+))?(\/([-\d\w]+))?/ MONGODB_URI_MATCHER = /(([-.\w]+):([^@]+)@)?([-.\w]+)(:([\w]+))?(\/([-\w]+))?/
MONGODB_URI_SPEC = "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/database]" MONGODB_URI_SPEC = "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/database]"
SPEC_ATTRS = [:nodes, :auths] SPEC_ATTRS = [:nodes, :auths]
OPT_ATTRS = [:connect, :replicaset, :slaveok, :safe, :w, :wtimeout, :fsync] OPT_ATTRS = [:connect, :replicaset, :slaveok, :safe, :w, :wtimeout, :fsync]