def get_opts(db_uri)
      uri = URI.parse(db_uri)

      {
        :host => uri.host,
        :port => uri.port,
        :user => uri.user,
        :password => uri.password,
        :db => uri.path.gsub('/', '')
      }
    end
def get_opts(db_uri)
      uri = URI.parse(db_uri)

      {
        :host => uri.host,
        :port => uri.port,
        :user => uri.user,
        :password => uri.password,
        :db => uri.path.gsub('/', '')
      }
    end
Initialize a ne DB object.

 @return [DB]
 Parse the MongoDB URI.

 @param [String] db_uri the DB URI.

 @return [Hash]