Skip to content

Commit 6d21d21

Browse files
committed
Rename references to MongoDB version 2.8 to 3.0
1 parent 46a346a commit 6d21d21

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/mongo/db.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def remove_user(username)
259259
#
260260
# @return [Array]
261261
def collection_names
262-
if @client.wire_version_feature?(Mongo::MongoClient::MONGODB_2_8)
262+
if @client.wire_version_feature?(Mongo::MongoClient::MONGODB_3_0)
263263
names = collections_info.collect { |doc| doc['name'] || '' }
264264
names.delete_if do |name|
265265
name.index('$')
@@ -286,7 +286,7 @@ def collections
286286
#
287287
# @return [Array] List of collection info.
288288
def collections_info(coll_name=nil)
289-
if @client.wire_version_feature?(Mongo::MongoClient::MONGODB_2_8)
289+
if @client.wire_version_feature?(Mongo::MongoClient::MONGODB_3_0)
290290
cmd = BSON::OrderedHash[:listCollections, 1]
291291
cmd.merge!(:filter => { :name => coll_name }) if coll_name
292292
result = self.command(cmd, :cursor => {})
@@ -508,7 +508,7 @@ def drop_index(collection_name, index_name)
508508
# @return [Hash] keys are index names and the values are lists of [key, type] pairs
509509
# defining the index.
510510
def index_information(collection_name)
511-
if @client.wire_version_feature?(Mongo::MongoClient::MONGODB_2_8)
511+
if @client.wire_version_feature?(Mongo::MongoClient::MONGODB_3_0)
512512
result = self.command({ :listIndexes => collection_name }, :cursor => {})
513513
if result.key?('cursor')
514514
cursor_info = result['cursor']

lib/mongo/mongo_client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class MongoClient
2525
RELEASE_2_4_AND_BEFORE = 0 # Everything before we started tracking.
2626
AGG_RETURNS_CURSORS = 1 # The aggregation command may now be requested to return cursors.
2727
BATCH_COMMANDS = 2 # insert, update, and delete batch command
28-
MONGODB_2_8 = 3 # listCollections and listIndexes commands, SCRAM-SHA-1 auth mechanism
29-
MAX_WIRE_VERSION = MONGODB_2_8 # supported by this client implementation
28+
MONGODB_3_0 = 3 # listCollections and listIndexes commands, SCRAM-SHA-1 auth mechanism
29+
MAX_WIRE_VERSION = MONGODB_3_0 # supported by this client implementation
3030
MIN_WIRE_VERSION = RELEASE_2_4_AND_BEFORE # supported by this client implementation
3131

3232
# Server command headroom
@@ -342,7 +342,7 @@ def copy_database(
342342
password = nil,
343343
mechanism = 'SCRAM-SHA-1'
344344
)
345-
if wire_version_feature?(MONGODB_2_8) && mechanism == 'SCRAM-SHA-1'
345+
if wire_version_feature?(MONGODB_3_0) && mechanism == 'SCRAM-SHA-1'
346346
copy_db_scram(username, password, from_host, from, to)
347347
else
348348
copy_db_mongodb_cr(username, password, from_host, from, to)

test/replica_set/insert_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_insert
6868
end
6969

7070
should "handle error with deferred write concern error - spec Merging Results" do
71-
if @client.wire_version_feature?(MongoClient::MONGODB_2_8)
71+
if @client.wire_version_feature?(MongoClient::MONGODB_3_0)
7272
@coll.remove
7373
@coll.ensure_index(BSON::OrderedHash[:a, Mongo::ASCENDING], {:unique => true})
7474
bulk = @coll.initialize_ordered_bulk_op

0 commit comments

Comments
 (0)