lib/mongoid.rb in mongoid-5.4.1 vs lib/mongoid.rb in mongoid-6.0.0.beta
- old
+ new
@@ -10,15 +10,15 @@
require "active_support/json"
require "active_support/inflector"
require "active_support/time_with_zone"
require "active_model"
-require "origin"
require "mongo"
require "mongoid/version"
require "mongoid/config"
+require "mongoid/persistence_context"
require "mongoid/loggable"
require "mongoid/clients"
require "mongoid/document"
require "mongoid/tasks/database"
require "mongoid/query_cache"
@@ -34,15 +34,10 @@
module Mongoid
extend Loggable
extend self
- # A string added to the platform details of Ruby driver client handshake documents.
- #
- # @since 6.1.0
- PLATFORM_DETAILS = "mongoid-#{VERSION}".freeze
-
# The minimum MongoDB version supported.
MONGODB_VERSION = "2.4.0"
# Sets the Mongoid configuration options. Best used by passing a block.
#
@@ -63,11 +58,11 @@
# @example Get the default client.
# Mongoid.default_client
#
# @return [ Mongo::Client ] The default client.
#
- # @since 3.0.0
+ # @since 5.0.0
def default_client
Clients.default
end
# Disconnect all active clients.
@@ -75,11 +70,11 @@
# @example Disconnect all active clients.
# Mongoid.disconnect_clients
#
# @return [ true ] True.
#
- # @since 3.1.0
+ # @since 5.0.0
def disconnect_clients
Clients.disconnect
end
# Convenience method for getting a named client.
@@ -87,10 +82,10 @@
# @example Get a named client.
# Mongoid.client(:default)
#
# @return [ Mongo::Client ] The named client.
#
- # @since 3.0.0
+ # @since 5.0.0
def client(name)
Clients.with_name(name)
end
# Take all the public instance methods from the Config singleton and allow