From: Will Drewry Date: 2004-10-23T00:47:11+09:00 Subject: [ANN] Ruby/ActiveLDAP 0.5.1 Hi! I'm proud to announce the Ruby/ActiveLDAP 0.5.1 Details and downloads can be found at - http://www.rubyforge.org/projects/ruby-activeldap and http://dataspill.org/posts/show/4 === What is Ruby/ActiveLDAP? Ruby/ActiveLDAP is a library, inspired by ActiveRecord, with the purpose of providing an object oriented mapping of LDAP objects to Ruby objects. Often, interfacing with LDAP is a tedious and interrupting process. It rarely follows the normal flow of your application, and almost always requires referencing the Ruby/LDAP examples, or playing in irb, to get the desired output. Ruby/ActiveLDAP aims to make interaction with LDAP as intuitive as possible. === Features Coming features: * Better duck typing with ActiveRecord * More code refactoring for optimization * More complete validations * Better unit testing * and more! Latest changes: * All values returned by attribute methods are no longer .dup's. This means that you can change an objectClass with - foo.objectClass.push('someAdditionalObjectClass') * All values returned are by default Arrays (this is opposite of how it was before) * All attribute methods are now included in #methods. (irb tab completion works!) * Data validation and "type" enforcement now occur in #validate (and some #enforce_types) instead of being sprinkled throughout the library. * Additional schema data caching provided with Schema2#class_attributes * Binary data subtypes work (jpegPhoto, userCertificate;binary, etc) * Language subtypes work (cn;lang-en-us, cn;lang-jp-JP, etc) * Ruby/ActiveLDAP can be installed using RubyGems. * Lots of bug fixes === Status Ruby/ActiveLDAP is slowly getting more and more robust, but expect more API changes as efforts towards duck-typing with ActiveRecord continue. I would really like feedback from live testing. Patches, suggestions, and criticism are desired. === An Example require 'activeldap' # ==>true class User < ActiveLDAP::Base ldap_mapping :dnattr => 'uid', :prefix => 'ou=People', :classes => ['posixAccount'] end # ==>User me = User.new('wad');nil # ==>nil me.cn # ==>["Will"] me.objectClass #==>["account", "posixAccount", "top", "shadowAccount"] me.methods # ==>["must", "send", "method", "object_id", "singleton_methods", "__send__", "equal?", "taint", "frozen?", "instance_variable_get", "kind_of?", "to_a", "may", "instance_eval", "validate", "type", "protected_methods", "extend", "eql?", "display", "instance_variable_set", "hash", "is_a?", "__methods", "to_s", "logger", "dn", "class", "tainted?", "private_methods", "logger=", "write", "untaint", "exists?", "id", "inspect", "delete", "==", "===", "clone", "public_methods", "respond_to?", "attributes", "freeze", "__id__", "=~", "methods", "method_missing", "nil?", "dup", "instance_variables", "instance_of?", "shadowInactive", "gidNumber", "cn", "l", "shadowExpire", "gecos", "organizationalUnitName", "homeDirectory", "shadowMax", "commonName", "o", "shadowFlag", "uid", "shadowWarning", "shadowLastChange", "userPassword", "ou", "description", "userid", "shadowMin", "loginShell", "uidNumber", "objectClass", "localityName", "host", "organizationName", "seeAlso"] me.objectClass.delete('shadowAccount') #==>"shadowAccount" me.methods # ==>["must", "send", "method", "object_id", "singleton_methods", "__send__", "equal?", "taint", "frozen?", "instance_variable_get", "kind_of?", "to_a", "may", "instance_eval", "validate", "type", "protected_methods", "extend", "eql?", "display", "instance_variable_set", "hash", "is_a?", "__methods", "to_s", "logger", "dn", "class", "tainted?", "private_methods", "logger=", "write", "untaint", "exists?", "id", "inspect", "delete", "==", "===", "clone", "public_methods", "respond_to?", "attributes", "freeze", "__id__", "=~", "methods", "method_missing", "nil?", "dup", "instance_variables", "instance_of?", "gidNumber", "cn", "l", "gecos", "organizationalUnitName", "homeDirectory", "commonName", "o", "uid", "userPassword", "ou", "description", "userid", "loginShell", "uidNumber", "objectClass", "localityName", "host", "organizationName", "seeAlso"] If anyone has any questions, criticisms (bugs!), or suggestions, please send them! Thanks! wad -- will@(alum|cs).bu.edu