lib/mongo/client.rb
# Generate default client options based on the URI and options
# passed into the Client constructor.
Generate default client options based on the URI and options
passed into the Client constructor.
Generate default client options based on the URI and options passed into the Client constructor .
def default_options(options)
      Database::DEFAULT_OPTIONS.dup.tap do |default_options|
        if options[:auth_mech] || options[:user]
          default_options[:auth_source] = Auth::User.default_auth_source(options)
        end
        if options[:auth_mech] == :gssapi
          default_options[:auth_mech_properties] = { service_name: 'mongodb' }
        end
        default_options[:retry_reads] = true
        default_options[:retry_writes] = true
      end
    end
def default_options ( options ) Database :: DEFAULT_OPTIONS . dup . tap do | default_options | if options [ :auth_mech ] || options [ :user ] default_options [ :auth_source ] = Auth :: User . default_auth_source ( options ) end if options [ :auth_mech ] == :gssapi default_options [ :auth_mech_properties ] = { service_name : 'mongodb' } end default_options [ :retry_reads ] = true default_options [ :retry_writes ] = true end end
Generate default client options based on the URI and options
passed into the Client constructor.
Generate default client options based on the URI and options passed into the Client constructor .
options