documentation tweaks

This commit is contained in:
blackhedd 2006-05-01 05:27:29 +00:00
parent 2f3802c4fd
commit 7958315227
4 changed files with 55 additions and 12 deletions

View file

@ -6,7 +6,7 @@ Initial release.
#-- #--
# Net::LDAP for Ruby. # Net::LDAP for Ruby.
# http://rubyforge.org/projects/net-ldap/ # http://rubyforge.org/projects/net-ldap/
# Copyright 2006 Francis Cianfrocca # Copyright (C) 2006 by Francis Cianfrocca
# #
# Available under the same terms as Ruby. See LICENCE in the main # Available under the same terms as Ruby. See LICENCE in the main
# distribution for full licensing information. # distribution for full licensing information.

View file

@ -1,5 +1,5 @@
Net::LDAP is copyrighted free software by Francis Gianfrocca Net::LDAP is copyrighted free software by Francis Cianfrocca
<garbagecat@gmail.com>. You can redistribute it and/or modify it under either <garbagecat10@gmail.com>. You can redistribute it and/or modify it under either
the terms of the GPL (see the file COPYING), or the conditions below: the terms of the GPL (see the file COPYING), or the conditions below:
1. You may make and give away verbatim copies of the source form of the 1. You may make and give away verbatim copies of the source form of the

View file

@ -1,18 +1,38 @@
It is with great excitement that I announce the first release of the pure We're pleased to announce the first release of Net::LDAP, the first
Ruby LDAP library, Net::LDAP. pure-Ruby LDAP library. Net::LDAP intends to be a feature-complete
LDAP client which can access as much as possible of the functionality
of the most-used LDAP server implementations.
Net::LDAP includes a full implementation of the LDAP wire-line
protocol so it can also be used in LDAP server implementations.
Thanks for Austin Ziegler for invaluable help in reviewing the
implementation and providing the release structure.
= What is Net::LDAP for Ruby? = What is Net::LDAP for Ruby?
[...] This library provides a pure-Ruby implementation of an LDAP client.
It can be used to access any server which implements the LDAP protocol.
Net::LDAP is intended to provide full LDAP functionality while hiding
the more arcane aspects of the LDAP protocol itself, so as to make the
programming interface as Ruby-like as possible.
In particular, this means that there is no direct dependence on the
structure of the various "traditional" LDAP clients. This is a ground-up
rethinking of the LDAP API.
Net::LDAP is based on RFC-1777, which specifies the Lightweight Directory
Access Protocol, as amended and extended by subsequent RFCs and by the more
widely-used directory implementations.
Homepage:: http://ruby-pdf.rubyforge.org/net-ldap/ Homepage:: http://ruby-pdf.rubyforge.org/net-ldap/
Download:: http://rubyforge.org/frs/?**** Download:: http://rubyforge.org/frs/?****
Copyright:: 2006 Francis Cianfrocca Copyright:: 2006 Francis Cianfrocca
This software is based on RFC***, describing the Lightweight Directory
Access Protocol.
== LICENCE NOTES == LICENCE NOTES
[...] Please read the file LICENCE for licensing restrictions on this library. In
the simplest terms, this library is available under the same terms as Ruby
itself.
== Requirements and Installation == Requirements and Installation
Net::LDAP requires Ruby 1.8.2 or better. Net::LDAP requires Ruby 1.8.2 or better.
@ -25,7 +45,30 @@ Alternatively, you can use the RubyGems version of Net::LDAP available
as ruby-net-ldap-0.0.1.gem from the usual sources. as ruby-net-ldap-0.0.1.gem from the usual sources.
== Whet your appetite: == Whet your appetite:
[...] require 'net/ldap'
ldap = Net::LDAP.new :host => server_ip_address,
:port => 389,
:auth => {
:method => :simple,
:username => "cn=manager,dc=example,dc=com",
:password => "opensesame"
}
filter = Net::LDAP::Filter.eq( "cn", "George*" )
treebase = "dc=example,dc=com"
ldap.search( :base => treebase, :filter => filter ) do |entry|
puts "DN: #{entry.dn}"
entry.each do |attribute, values|
puts " #{attribute}:"
values.each do |value|
puts " --->#{value}"
end
end
end
p ldap.get_operation_result
== Net::LDAP 0.0.1: April 30, 2006 == Net::LDAP 0.0.1: April 30, 2006
[...] [...]

View file

@ -1,7 +1,7 @@
#-- #--
# Net::LDAP for Ruby. # Net::LDAP for Ruby.
# http://rubyforge.org/projects/net-ldap/ # http://rubyforge.org/projects/net-ldap/
# Copyright 2006 Francis Cianfrocca # Copyright (C) 2006 by Francis Cianfrocca
# #
# Available under the same terms as Ruby. See LICENCE in the main # Available under the same terms as Ruby. See LICENCE in the main
# distribution for full licensing information. # distribution for full licensing information.