RUBY-313 minor: deprecation warning should include removal version.

This commit is contained in:
Kyle Banker 2011-09-06 14:30:00 -04:00
parent 046038e18d
commit 5d83ab2460
3 changed files with 10 additions and 9 deletions

View File

@ -47,7 +47,8 @@ module Mongo
def initialize(name, db, opts={})
if db.is_a?(String) && name.is_a?(Mongo::DB)
warn "Warning: the order of parameters to initialize a collection have changed. " +
"Please specify the collection name first, followed by the db."
"Please specify the collection name first, followed by the db. This will be made permanent"
"in v2.0."
db, name = name, db
end
@ -638,7 +639,7 @@ module Mongo
if opts.is_a?(Hash)
return new_group(opts)
else
warn "Collection#group no longer take a list of parameters. This usage is deprecated." +
warn "Collection#group no longer take a list of parameters. This usage is deprecated and will be remove in v2.0." +
"Check out the new API at http://api.mongodb.org/ruby/current/Mongo/Collection.html#group-instance_method"
end

View File

@ -132,7 +132,7 @@ module Mongo
#
# @deprecated
def self.multi(nodes, opts={})
warn "Connection.multi is now deprecated. Please use ReplSetConnection.new instead."
warn "Connection.multi is now deprecated and will be removed in v2.0. Please use ReplSetConnection.new instead."
nodes << opts
ReplSetConnection.new(*nodes)
@ -603,7 +603,7 @@ module Mongo
# Checkin a socket used for reading.
# Note: this is overridden in ReplSetConnection.
def checkin_reader(socket)
warn "Connection#checkin_writer is not deprecated and will be remove " +
warn "Connection#checkin_writer is not deprecated and will be removed " +
"in driver v2.0. Use Connection#checkin instead."
checkin(socket)
end
@ -611,7 +611,7 @@ module Mongo
# Checkin a socket used for writing.
# Note: this is overridden in ReplSetConnection.
def checkin_writer(socket)
warn "Connection#checkin_writer is not deprecated and will be remove " +
warn "Connection#checkin_writer is not deprecated and will be removed " +
"in driver v2.0. Use Connection#checkin instead."
checkin(socket)
end

View File

@ -138,7 +138,7 @@ module Mongo
# Replica set name
if opts[:rs_name]
warn ":rs_name option has been deprecated and will be removed in 2.0. " +
warn ":rs_name option has been deprecated and will be removed in v2.0. " +
"Please use :name instead."
@replica_set_name = opts[:rs_name]
else
@ -294,7 +294,7 @@ module Mongo
# @deprecated
def reset_connection
close
warn "ReplSetConnection#reset_connection is now deprecated. " +
warn "ReplSetConnection#reset_connection is now deprecated and will be removed in v2.0. " +
"Use ReplSetConnection#close instead."
end
@ -383,14 +383,14 @@ module Mongo
# Checkin a socket used for reading.
def checkin_reader(socket)
warn "ReplSetConnection#checkin_writer is not deprecated and will be remove " +
warn "ReplSetConnection#checkin_writer is deprecated and will be removed " +
"in driver v2.0. Use ReplSetConnection#checkin instead."
checkin(socket)
end
# Checkin a socket used for writing.
def checkin_writer(socket)
warn "ReplSetConnection#checkin_writer is not deprecated and will be remove " +
warn "ReplSetConnection#checkin_writer is deprecated and will be removed " +
"in driver v2.0. Use ReplSetConnection#checkin instead."
checkin(socket)
end