lib/activeldap/configuration.rb in ruby-activeldap-debug-0.7.1 vs lib/activeldap/configuration.rb in ruby-activeldap-debug-0.7.2
- old
+ new
@@ -20,13 +20,31 @@
DEFAULT_CONFIG[:sasl_quiet] = false
DEFAULT_CONFIG[:try_sasl] = false
DEFAULT_CONFIG[:retries] = 3
DEFAULT_CONFIG[:retry_wait] = 3
+ DEFAULT_CONFIG[:timeout] = 0 # in seconds; 0 <= Never timeout
+ # Whether or not to retry on timeouts
+ DEFAULT_CONFIG[:retry_on_timeout] = true
+ # Whether to return objects by default from find/find_all
+ DEFAULT_CONFIG[:return_objects] = false
+
DEFAULT_CONFIG[:logger] = nil
- DEFAULT_CONFIG[:ldap_scope] = LDAP::LDAP_SCOPE_ONELEVEL
+ # On connect, this is overriden by the :base argument
+ #
+ # Set this to LDAP_SCOPE_SUBTREE if you have a LDAP tree where all
+ # objects of the same class living in different parts of the same subtree, but
+ # not. LDAP_SCOPE_ONELEVEL is for use when all the objects in your classes live
+ # under one shared level (e.g. ou=People,dc=localdomain)
+ #
+ # This can be overriden on a per class basis in ldap_mapping :scope
+ def Base.ldap_scope
+ LDAP::LDAP_SCOPE_ONELEVEL
+ end
+
+ # On connect, this is overriden by the :base argument
# Make the return value the string that is your LDAP base
def Base.base
'dc=localdomain'
end