RUBY-313 minor: deprecation warning should include removal version.
This commit is contained in:
parent
046038e18d
commit
5d83ab2460
|
@ -47,7 +47,8 @@ module Mongo
|
||||||
def initialize(name, db, opts={})
|
def initialize(name, db, opts={})
|
||||||
if db.is_a?(String) && name.is_a?(Mongo::DB)
|
if db.is_a?(String) && name.is_a?(Mongo::DB)
|
||||||
warn "Warning: the order of parameters to initialize a collection have changed. " +
|
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
|
db, name = name, db
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -638,7 +639,7 @@ module Mongo
|
||||||
if opts.is_a?(Hash)
|
if opts.is_a?(Hash)
|
||||||
return new_group(opts)
|
return new_group(opts)
|
||||||
else
|
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"
|
"Check out the new API at http://api.mongodb.org/ruby/current/Mongo/Collection.html#group-instance_method"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ module Mongo
|
||||||
#
|
#
|
||||||
# @deprecated
|
# @deprecated
|
||||||
def self.multi(nodes, opts={})
|
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
|
nodes << opts
|
||||||
ReplSetConnection.new(*nodes)
|
ReplSetConnection.new(*nodes)
|
||||||
|
@ -603,7 +603,7 @@ module Mongo
|
||||||
# Checkin a socket used for reading.
|
# Checkin a socket used for reading.
|
||||||
# Note: this is overridden in ReplSetConnection.
|
# Note: this is overridden in ReplSetConnection.
|
||||||
def checkin_reader(socket)
|
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."
|
"in driver v2.0. Use Connection#checkin instead."
|
||||||
checkin(socket)
|
checkin(socket)
|
||||||
end
|
end
|
||||||
|
@ -611,7 +611,7 @@ module Mongo
|
||||||
# Checkin a socket used for writing.
|
# Checkin a socket used for writing.
|
||||||
# Note: this is overridden in ReplSetConnection.
|
# Note: this is overridden in ReplSetConnection.
|
||||||
def checkin_writer(socket)
|
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."
|
"in driver v2.0. Use Connection#checkin instead."
|
||||||
checkin(socket)
|
checkin(socket)
|
||||||
end
|
end
|
||||||
|
|
|
@ -138,7 +138,7 @@ module Mongo
|
||||||
|
|
||||||
# Replica set name
|
# Replica set name
|
||||||
if opts[:rs_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."
|
"Please use :name instead."
|
||||||
@replica_set_name = opts[:rs_name]
|
@replica_set_name = opts[:rs_name]
|
||||||
else
|
else
|
||||||
|
@ -294,7 +294,7 @@ module Mongo
|
||||||
# @deprecated
|
# @deprecated
|
||||||
def reset_connection
|
def reset_connection
|
||||||
close
|
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."
|
"Use ReplSetConnection#close instead."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -383,14 +383,14 @@ module Mongo
|
||||||
|
|
||||||
# Checkin a socket used for reading.
|
# Checkin a socket used for reading.
|
||||||
def checkin_reader(socket)
|
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."
|
"in driver v2.0. Use ReplSetConnection#checkin instead."
|
||||||
checkin(socket)
|
checkin(socket)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Checkin a socket used for writing.
|
# Checkin a socket used for writing.
|
||||||
def checkin_writer(socket)
|
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."
|
"in driver v2.0. Use ReplSetConnection#checkin instead."
|
||||||
checkin(socket)
|
checkin(socket)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue