On Wed, Feb 3, 2016 at 8:09 PM, sebb <seb...@gmail.com> wrote: > On 4 February 2016 at 00:55, Sam Ruby <ru...@intertwingly.net> wrote: >> On Wed, Feb 3, 2016 at 7:02 PM, sebb <seb...@gmail.com> wrote: >>> On 3 February 2016 at 23:23, Sam Ruby <ru...@apache.org> wrote: >>>> Commit 8745cc5399c8bf8a13a20dd5e8a41bc59161d0cf: >>>> Cleanup only - no functional changes >>>> *) Use documented interface for getting the LDAP hostname >>> >>> Where is the ldap library documented? >> >> Not very well :-( >> >> The LDAP library chosen appears to be a thin layer over the C >> interface, and I was able to piece together the interface using some >> guesswork. I used irb, but the following reproduces what I did: >> >> ruby -r whimsy/asf -e "p ASF.init_ldap.methods" >> ruby -r whimsy/asf -e "p LDAP.constants.grep /HOST/" >> >> ... followed by google searches on the result. >> >>> There seem to be quite a few ldap libraries for Ruby. >>> It's not obvious which one was chosen. >> >> The one used can be found here: >> >> https://github.com/apache/whimsy/blob/master/asf.gemspec#L26 > > That says 'ruby-ldap' > >> https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/ldap.rb#L32 > > That is just 'ldap' > > These appear to be different, but perhaps I'm missing something?
They are the same. > I could not find a plain 'ldap' on RubyGems.org, so where does that come from? Naming conventions for gems (see: http://guides.rubygems.org/name-your-gem/) are merely best practices, and are not universally followed. As an example, I should have either placed my ASF module inside a Whimsy module (thus: Whimsy::ASF instead of simply ASF) or named my gem 'asf'. >From my perspective, naming my gem 'asf' would be presumptuous, placing an ASF module inside a Whimsy module is unnecessary, and naming a ruby gem with a 'ruby-' prefix simply because it is coded in the ruby language is redundant. - Sam Ruby >> I'm not sure why I picked that one at the time. This one appears to >> be more popular: >> >> https://rubygems.org/gems/net-ldap/ >> >> All calls to LDAP are isolated in a single source file, so should >> switching be something worth considering, the changes should be >> minimal. >> >> - Sam Ruby