Sha256: 136bbd9933777e8531eec588e20b0487e1b148c37cdfb8160e8af1f63d9b22ad
Contents?: true
Size: 651 Bytes
Versions: 3
Compression:
Stored size: 651 Bytes
Contents
module ClientRegistryMacros def new_local_client(address, options=nil) ClientRegistry.instance.new_local_client(address, options) end def new_local_client_nmio(address, options=nil) # Avoid type converting options. base_options = {monitoring_io: false} if BSON::Document === options || options&.keys&.any? { |key| String === key } base_options = Mongo::Options::Redacted.new(base_options) end options = if options base_options.merge(options) else base_options end new_local_client(address, options) end def close_local_clients ClientRegistry.instance.close_local_clients end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongo-2.15.0.alpha | spec/support/client_registry_macros.rb |
mongo-2.14.0 | spec/support/client_registry_macros.rb |
mongo-2.14.0.rc1 | spec/support/client_registry_macros.rb |