From kou at cozmixng.org Tue Nov 7 21:59:00 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Wed, 8 Nov 2006 11:59:00 +0900 Subject: [Ruby-activeldap-discuss] ActiveLDAP -> ActiveLdap Message-ID: Hi, Can I change namespace of ActiveLDAP to ActiveLdap and rename lib/activeldap to lib/active_ldap? This changes support auto-require by ActiveSupport. ActiveLDAP on repository has many changes and no full backward compatibility of ActiveLDAP 0.7.4. This changes will help decisiving break with old ActiveLDAP and will not confuse users of old ActiveLDAP by difference of new ActiveLDAP API and old ActiveLDAP API (those APIs are similar but not same). Thanks, -- kou From kou at cozmixng.org Wed Nov 8 20:49:52 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 9 Nov 2006 10:49:52 +0900 Subject: [Ruby-activeldap-discuss] removing old API Message-ID: Hi, Now, ActiveLDAP is renamed to ActiveLdap and breaked away from old API. So, I want to remove old APIs like the following: * ActiveLdap::Base.connect * ActiveLdap::Base.find_all * ActiveLdap::Base.dnattr (is dn_attribute now) * ActiveLdap::Base#dnattr (is dn_attribute now) * ActiveLdap::Base#write Can I remove them? And I want to invert not_array argument semantic of #get_attribute. It seems that *not* is very confusable. Can I change this like the following? to: def get_attribute(name, force_array=false) from: def get_attribute(name, not_array=true) Thanks, -- kou From will at alum.bu.edu Thu Nov 9 04:54:54 2006 From: will at alum.bu.edu (=?WINDOWS-1252?Q?Will_Drewry=99?=) Date: Thu, 9 Nov 2006 09:54:54 +0000 Subject: [Ruby-activeldap-discuss] removing old API In-Reply-To: References: Message-ID: On 11/9/06, Kouhei Sutou wrote: > Hi, > > Now, ActiveLDAP is renamed to ActiveLdap and breaked away from > old API. So, I want to remove old APIs like the following: > > * ActiveLdap::Base.connect > * ActiveLdap::Base.find_all > * ActiveLdap::Base.dnattr (is dn_attribute now) > * ActiveLdap::Base#dnattr (is dn_attribute now) > * ActiveLdap::Base#write > > Can I remove them? That sounds perfect. The whole goal of the 0.8.0 release is to break away - so let's do it :-) > > And I want to invert not_array argument semantic of #get_attribute. > It seems that *not* is very confusable. Can I change this like the > following? > > to: > > def get_attribute(name, force_array=false) > > from: > > def get_attribute(name, not_array=true) > Absolutely! The original approach was due to a legacy bug. I introduced a force array style semantic but had inverted its function and led users to have code dependent on it. It's definitely fine to change this over. thanks! will From kou at cozmixng.org Thu Nov 9 08:21:30 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 09 Nov 2006 22:21:30 +0900 (JST) Subject: [Ruby-activeldap-discuss] removing old API In-Reply-To: References: Message-ID: <20061109.222130.07585575.kou@cozmixng.org> Hi, Thanks for accepting my request. I'll do tomorrow. Regards, -- kou In "Re: [Ruby-activeldap-discuss] removing old API" on Thu, 9 Nov 2006 09:54:54 +0000, "Will_Drewry" wrote: > On 11/9/06, Kouhei Sutou wrote: > > Hi, > > > > Now, ActiveLDAP is renamed to ActiveLdap and breaked away from > > old API. So, I want to remove old APIs like the following: > > > > * ActiveLdap::Base.connect > > * ActiveLdap::Base.find_all > > * ActiveLdap::Base.dnattr (is dn_attribute now) > > * ActiveLdap::Base#dnattr (is dn_attribute now) > > * ActiveLdap::Base#write > > > > Can I remove them? > > That sounds perfect. The whole goal of the 0.8.0 release is to break > away - so let's do it :-) > > > > > > And I want to invert not_array argument semantic of #get_attribute. > > It seems that *not* is very confusable. Can I change this like the > > following? > > > > to: > > > > def get_attribute(name, force_array=false) > > > > from: > > > > def get_attribute(name, not_array=true) > > > > Absolutely! The original approach was due to a legacy bug. I > introduced a force array style semantic but had inverted its function > and led users to have code dependent on it. It's definitely fine to > change this over. > > thanks! > will From kou at cozmixng.org Thu Nov 9 08:24:09 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 09 Nov 2006 22:24:09 +0900 (JST) Subject: [Ruby-activeldap-discuss] ruby-activeldap-commit ML doesn't work Message-ID: <20061109.222409.45026649.kou@cozmixng.org> Hi, I have committed some changes but I haven't receive any commit mail. Will, could you check configuration of ruby-activeldap-commit ML and/or code.google.com? Thanks, -- kou From kou at cozmixng.org Thu Nov 9 08:49:09 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 09 Nov 2006 22:49:09 +0900 (JST) Subject: [Ruby-activeldap-discuss] Release schedule Message-ID: <20061109.224909.53334837.kou@cozmixng.org> Hi, I'm writing test codes for scripts under examples/ directory. There are some ToDo tasks(*) but ActiveLdap can be released after I completed test codes for example scripts. And I will finish the work tomorrow. It's true that there are some important tasks in ToDo. (e.g. providing full documentation) So, I suggest that we version next release as 0.9.0. And we release 1.0.0 after all ToDo tasks are completed. Any opinion? (*) * provide full documentation for new API. * handle all exception raised from Ruby/LDAP and wrap as ActiveLdap exception. I think we need to develop an application using ActiveLdap. * support Reloadable::Subclasses. I think we need to develop a Rails + ActiveLdap application to improve Rails support. * support Ruby/GetText. * support Net::LDAP as LDAP backend after Net::LDAP supports START_TLS. (I made a patch and submitted to the bug tracker of Net::LDAP) Thanks, -- kou P.S. I want to release my library in next week but this is only my work. Will, you don't care about this. It seems that you are still busy. :-) From will at alum.bu.edu Thu Nov 9 09:14:50 2006 From: will at alum.bu.edu (=?WINDOWS-1252?Q?Will_Drewry=99?=) Date: Thu, 9 Nov 2006 14:14:50 +0000 Subject: [Ruby-activeldap-discuss] ruby-activeldap-commit ML doesn't work In-Reply-To: <20061109.222409.45026649.kou@cozmixng.org> References: <20061109.222409.45026649.kou@cozmixng.org> Message-ID: I'm attempting to whitelist the google.com address the automated mails come from. Hopefully that'll do it! On 11/9/06, Kouhei Sutou wrote: > Hi, > > I have committed some changes but I haven't receive any > commit mail. Will, could you check configuration of > ruby-activeldap-commit ML and/or code.google.com? > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > From kou at cozmixng.org Thu Nov 9 09:26:42 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 09 Nov 2006 23:26:42 +0900 (JST) Subject: [Ruby-activeldap-discuss] ruby-activeldap-commit ML doesn't work In-Reply-To: References: <20061109.222409.45026649.kou@cozmixng.org> Message-ID: <20061109.232642.119668508.kou@cozmixng.org> Hi, In "Re: [Ruby-activeldap-discuss] ruby-activeldap-commit ML doesn't work" on Thu, 9 Nov 2006 14:14:50 +0000, "Will_Drewry" wrote: > I'm attempting to whitelist the google.com address the automated mails > come from. Hopefully that'll do it! It seems that it works. Thanks! I have a request if you have a time. Could you configure commit mail to include diff? Thanks, -- kou From kou at cozmixng.org Fri Nov 10 02:58:33 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Fri, 10 Nov 2006 16:58:33 +0900 Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: <20061109.224909.53334837.kou@cozmixng.org> References: <20061109.224909.53334837.kou@cozmixng.org> Message-ID: Hi, 2006/11/9, Kouhei Sutou : > I'm writing test codes for scripts under examples/ > directory. There are some ToDo tasks(*) but ActiveLdap can > be released after I completed test codes for example > scripts. And I will finish the work tomorrow. I have finished. Could you confirm my work in last 2 weeks? Thanks, -- kou From will at alum.bu.edu Fri Nov 10 03:47:50 2006 From: will at alum.bu.edu (=?WINDOWS-1252?Q?Will_Drewry=99?=) Date: Fri, 10 Nov 2006 08:47:50 +0000 Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: References: <20061109.224909.53334837.kou@cozmixng.org> Message-ID: On 11/10/06, Kouhei Sutou wrote: > Hi, > > 2006/11/9, Kouhei Sutou : > > > I'm writing test codes for scripts under examples/ > > directory. There are some ToDo tasks(*) but ActiveLdap can > > be released after I completed test codes for example > > scripts. And I will finish the work tomorrow. > > I have finished. Could you confirm my work in last 2 weeks? Excellent! I will start going through all of your changes after work tonight (I'm in UTC). Thanks!! From will at alum.bu.edu Sun Nov 19 18:17:35 2006 From: will at alum.bu.edu (=?WINDOWS-1252?Q?Will_Drewry=99?=) Date: Sun, 19 Nov 2006 23:17:35 +0000 Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: References: <20061109.224909.53334837.kou@cozmixng.org> Message-ID: Hi kou! I've just gone through the massive amount of work you've done, and it looks fantastic. I'm happy to release what is in svn now as 0.8.0 (since there hasn't been an 0.8 release yet). Then, we can proceed to knock out the remaining items in the TODO file. After that, we can either jump straight to 1.0.0 or spend a bit of time with 0.9.x as release candidates for 1.0.0 or just make 1.0.0rcX until we feel it is robust and stable. That would also give me some time to start pushing the new API into use with a few commercial/enterprise-scale users and see what bugs/problems they hit. What do you think? (Note, I've also changed your status on rubyforge which will make it easier to do quick bugfix releaes, etc.) If you're ready, I'll tag and release the current subversion contents as soon as I hear back. Thanks!! will From kou at cozmixng.org Sun Nov 19 20:37:41 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Mon, 20 Nov 2006 10:37:41 +0900 Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: References: <20061109.224909.53334837.kou@cozmixng.org> Message-ID: Hi, 2006/11/20, Will Drewry? : > I've just gone through the massive amount of work you've done, and it > looks fantastic. I'm happy to release what is in svn now as 0.8.0 > (since there hasn't been an 0.8 release yet). Then, we can proceed to > knock out the remaining items in the TODO file. > > > After that, we can either jump straight to 1.0.0 or spend a bit of > time with 0.9.x as release candidates for 1.0.0 or just make 1.0.0rcX > until we feel it is robust and stable. That would also give me some > time to start pushing the new API into use with a few > commercial/enterprise-scale users and see what bugs/problems they hit. > > What do you think? I think 1.0.0rcX is too early now because RC release means 'API stable but not yet robust'. I can't declare that 'API stable' yet. So, it's better that we release 0.9.x series before 1.0.0 to improve API. Here are some AL's ToDo I think: APIs to improve: * add filter value sanitizing API like DBI's ["XXX ? YYY", "VALUE"] syntax. * add required_clases to default filter of Base.search. * ... For robust: * handle all Ruby/LDAP exception in adaptor/ldap.rb: I just handle a bit of exceptions which occurred my environment. * sanitize filter value. * ... To resolve the above tasks, it's good that we release 0.9.x and get feedback from users. > (Note, I've also changed your status on rubyforge which will make it > easier to do quick bugfix releaes, etc.) > > If you're ready, I'll tag and release the current subversion contents > as soon as I hear back. Thanks for your work! Regards, -- kou From will at alum.bu.edu Mon Nov 20 06:08:58 2006 From: will at alum.bu.edu (=?WINDOWS-1252?Q?Will_Drewry=99?=) Date: Mon, 20 Nov 2006 11:08:58 +0000 Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: References: <20061109.224909.53334837.kou@cozmixng.org> Message-ID: On 11/20/06, Kouhei Sutou wrote: > I think 1.0.0rcX is too early now because RC release means 'API stable > but not yet robust'. I can't declare that 'API stable' yet. > So, it's better that we release 0.9.x series before 1.0.0 to improve API. Ah - I think we're talking at cross purposes - I wasn't thinking about going straight to 1.0.0rcX from what's in svn now. I was trying to decide if we should version past 0.8 to 0.9 (given that the last release is 0.7.x). > > Here are some AL's ToDo I think: > > APIs to improve: > * add filter value sanitizing API like DBI's ["XXX ? YYY", "VALUE"] > syntax. > * add required_clases to default filter of Base.search. > * ... > > For robust: > * handle all Ruby/LDAP exception in adaptor/ldap.rb: I just handle > a bit of exceptions which occurred my environment. > * sanitize filter value. > * ... > > To resolve the above tasks, it's good that we release 0.9.x and get > feedback from users. This sounds exactly right to me. With this in mind, making a 0.8.x release now followed with some API additions moving us to 0.9.x makes sense. Then we can move the 0.9.x feature complete and bug fixed version to a 1.0.0rcX and move from there. Are you happy with what's in SVN? The only thing I noticed that I haven't quite worked out yet is - is it still possible to call associations with additional options to avoid loading entire objects when you only want the dn (or a few select attributes)? If not, I'll start to add a find_options hash back into the associations and add @loaded caching. This was a pretty heavily demanded feature in earlier release. Thanks! will From kou at cozmixng.org Mon Nov 20 06:57:15 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Mon, 20 Nov 2006 20:57:15 +0900 Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: References: <20061109.224909.53334837.kou@cozmixng.org> Message-ID: Hi, 2006/11/20, Will Drewry? : > select attributes)? If not, I'll start to add a find_options hash > back into the associations and add @loaded caching. This was a pretty > heavily demanded feature in earlier release. If you want to get only dn and attributes, it's better that using Base.search instead of adding new option to Base.find. Thanks, -- kou From kou at cozmixng.org Mon Nov 20 06:42:46 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Mon, 20 Nov 2006 20:42:46 +0900 (JST) Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: References: Message-ID: <20061120.204246.75727136.kou@cozmixng.org> Hi, In "Re: [Ruby-activeldap-discuss] Release schedule" on Mon, 20 Nov 2006 11:08:58 +0000, "Will_Drewry" wrote: > > I think 1.0.0rcX is too early now because RC release means 'API stable > > but not yet robust'. I can't declare that 'API stable' yet. > > So, it's better that we release 0.9.x series before 1.0.0 to improve API. > > Ah - I think we're talking at cross purposes - I wasn't thinking about > going straight to 1.0.0rcX from what's in svn now. I was trying to > decide if we should version past 0.8 to 0.9 (given that the last > release is 0.7.x). Oh, I'm sorry. I think 0.8.X -> 1.0.0rcX is good unless big API changes are happened (not include adding API). If the event is occurred we should release 0.9.X between 0.8.X and 1.0.0rcX. > This sounds exactly right to me. With this in mind, making a 0.8.x > release now followed with some API additions moving us to 0.9.x makes > sense. Then we can move the 0.9.x feature complete and bug fixed > version to a 1.0.0rcX and move from there. OK. I agree with you. > Are you happy with what's in SVN? * LDAP filter sanitizing. * acts_as_tree related association. But I don't have enough time to do the above things now... > The only thing I noticed that I > haven't quite worked out yet is - > is it still possible to call associations with additional options to > avoid loading entire objects when you only want the dn (or a few > select attributes)? If not, I'll start to add a find_options hash > back into the associations and add @loaded caching. This was a pretty > heavily demanded feature in earlier release. No. Associations (has_many and belongs_to) always retrieve objects. But retrieved objects are cached per object. Thanks, -- kou From will at alum.bu.edu Mon Nov 20 16:57:08 2006 From: will at alum.bu.edu (=?WINDOWS-1252?Q?Will_Drewry=99?=) Date: Mon, 20 Nov 2006 21:57:08 +0000 Subject: [Ruby-activeldap-discuss] Release schedule In-Reply-To: References: <20061109.224909.53334837.kou@cozmixng.org> Message-ID: On 11/20/06, Kouhei Sutou wrote: > Hi, > > 2006/11/20, Will Drewry? : > > > select attributes)? If not, I'll start to add a find_options hash > > back into the associations and add @loaded caching. This was a pretty > > heavily demanded feature in earlier release. > > If you want to get only dn and attributes, it's better that using > Base.search instead of adding new option to Base.find. Ah of course! I've added to the example/objects/user.rb an example of how to implement the old-style API with the new API. I've also gone ahead and tagged this release as 0.8.0. The release numbering system I've been using is as follows: major.minor.subminor: - major: for full stable release - indicate a stable API - minor: increment every time the API changes leading to the next stable API - subminor: bug fixes and additive API changes (nothing that affects compatibility) If you think we should adopt a different style, I'm all ears! (e.g. the odd/even dev/stable approach, etc). acts_as_tree and LDAP filter sanitization can be added (mostly) with only subminor changes. (If sanitization is more invasiive, we may want to move to 0.9 once it is in.) Thanks! will From daniel at pfile.net Thu Nov 30 10:35:07 2006 From: daniel at pfile.net (Daniel Pfile) Date: Thu, 30 Nov 2006 09:35:07 -0600 Subject: [Ruby-activeldap-discuss] PATCH: Fedora custom schemas Message-ID: <456EFA2B.10501@pfile.net> Fedora's directory server (aka netscape) uses a string followed by a -oid (someobject-oid) to name it's custom objects instead of a proper number (1.3.6....) . I'm working on getting some of the custom extensions we've done working with your library. This is my first time using ruby and ActiveLdap for anything other than a basic tutorial, so be gentle. Here's my patch, not against SVN, but just a copy of the file out of the 0.8 gem. I think I tore the regex apart correctly, but feel free to correct it. --- schema.rb 2006-11-30 10:03:49.000000000 -0500 +++ schema-new.rb 2006-11-30 10:06:10.000000000 -0500 @@ -42,7 +42,7 @@ return ids[id] if ids.has_key?(id) while schema = @entries[group].shift - next unless /\A\s*\(\s*([\d\.]+)\s*(.*)\s*\)\s*\z/ =~ schema + next unless /\A\s*\(\s*([\d\.]+|[\w]+-oid)\s*(.*)\s*\)\s*\z/ =~ schema schema_id = $1 rest = $2 next if ids.has_key?(schema_id) Thanks for the software, keep up the great work. -- Daniel From kou at cozmixng.org Thu Nov 30 20:00:18 2006 From: kou at cozmixng.org (Kouhei Sutou) Date: Fri, 1 Dec 2006 10:00:18 +0900 Subject: [Ruby-activeldap-discuss] PATCH: Fedora custom schemas In-Reply-To: <456EFA2B.10501@pfile.net> References: <456EFA2B.10501@pfile.net> Message-ID: Hi, 2006/12/1, Daniel Pfile : > Fedora's directory server (aka netscape) uses a string followed by a > -oid (someobject-oid) to name it's custom objects instead of a proper > number (1.3.6....) . I'm working on getting some of the custom > extensions we've done working with your library. This is my first time > using ruby and ActiveLdap for anything other than a basic tutorial, so > be gentle. Here's my patch, not against SVN, but just a copy of the file > out of the 0.8 gem. I think I tore the regex apart correctly, but feel > free to correct it. Thanks. I'll be merge your work. By the way, could you send us the schema? I want to add the schema to our test suites. You will be able to get the schema with the following patch: Index: lib/active_ldap/adaptor/ldap.rb =================================================================== --- lib/active_ldap/adaptor/ldap.rb (revision 97) +++ lib/active_ldap/adaptor/ldap.rb (working copy) @@ -87,6 +87,7 @@ result = @connection.search2(base, LDAP::LDAP_SCOPE_BASE, '(objectClass=subschema)', attrs, false, sec, usec).first + p result Schema.new(result) end # rescue Regards, -- kou