Permalink
Browse files

Merging an ugly set of changes I had forgotten about.

  • Loading branch information...
2 parents dcbb201 + f46c68d commit 84e42ceb7832f4a43c09172a1be4ae4f6cbde944 Austin Ziegler committed Mar 18, 2011
View
@@ -1,19 +1,68 @@
= Hacking on Net::LDAP
+We welcome your contributions to Net::LDAP. We accept most contributions, but
+there are ways to increase the chance of your patch being accepted quickly.
+
+== Licensing
+
+Net::LDAP 0.2 and later are be licensed under an MIT-style license; any
+contributions after 2010-04-20 must be under this license to be accepted.
+
+== Formatting
+
+* Your patches should be formatted like the rest of Net::LDAP.
+* We use a text wrap of 76–78 characters, especially for documentation
+ contents.
+* Operators should have spaces around them.
+* Method definitions should have parentheses around arguments (and no
+ parentheses if there are no arguments).
+* Indentation should be kept as flat as possible; this may mean being more
+ explicit with constants.
+
+
We welcome your contributions to Net::LDAP. To increase the chances of your
patches being accepted, we recommend that you follow the guidelines below:
-1. Your code should be formatted like the rest of Net::LDAP. We use a text
- wrap of 76 - 78 characters, especially for documentation contents.
- Operators should have spaces around them, method definitions should have
- parentheses around arguments. Keep the indentation as flat as possible.
-2. Your changes should be well-documented and described.
-3. You must provide Rspec tests for any new or changed features.
-4. You should provide LDIF data for importing into LDAP servers so that the
- changes can be tested <em>in situ</em> with more than one real LDAP
- server.
-5. You should have tested your changes against a real LDAP server.
-6. Your patch should include modifications to History.rdoc summarizing the
- change.
-7. If you're a first-time contributor, your patch should include modifications
- to Contributors.rdoc.
+== Documentation
+
+* Documentation: {net-ldap}[http://net-ldap.rubyforge.org/]
+
+It is very important that, if you add new methods or objects, your code is
+well-documented. The purpose of the changes should be clearly described so that
+even if this is a feature we do not use, we can understand its purpose.
+
+We also encourage documentation-only contributions that improve the
+documentation of Net::LDAP.
+
+We encourage you to provide a good summary of your as a modification to
++History.rdoc+, and if you're not yet named as a contributor, include a
+modification to +Contributors.rdoc+ to add yourself.
+
+== Tests
+
+The Net::LDAP team uses RSpec for unit testing; all changes must have rspec
+tests for any new or changed features.
+
+Your changes should have been tested against at least one real LDAP server; the
+current tests are not sufficient to find all possible bugs. It's unlikely that
+they will ever be sufficient given the variations in LDAP server behaviour.
+
+If you're introducing a new feature, it would be preferred for you to provide
+us with a sample LDIF data file for importing into LDAP servers for testing.
+
+== Development Dependencies
+
+Net::LDAP uses several libraries during development, all of which can be
+installed using RubyGems.
+
+* *hoe*
+* *hoe-git*
+* *metaid*
+* *rspec*
+* *flexmock*
+
+== Participation
+
+* RubyForge: {net-ldap}[http://rubyforge.org/projects/net-ldap]
+* GitHub: {ruby-ldap/ruby-net-ldap}[https://github.com/ruby-ldap/ruby-net-ldap/]
+* Group: {ruby-ldap}[http://groups.google.com/group/ruby-ldap]
View
@@ -1,4 +1,4 @@
-=== Net::LDAP 0.2.0 / 2011-__-__
+=== Net::LDAP 0.2 / 2011-03-__
* Major Enhancements:
* Net::LDAP::Filter changes:
* Filters can only be constructed using our custom constructors (eq, ge,
@@ -14,7 +14,7 @@
Fixed some of the regular expressions to be more canonically defined.
* Cleaned up the string representation of Filter objects.
* Added experimental support for RFC4515 extensible matching (e.g.,
- * "(cn:caseExactMatch:=Fred Flintstone)"); provided by "nowhereman".
+ "(cn:caseExactMatch:=Fred Flintstone)"); provided by "nowhereman".
* Minor Enhancements:
* SSL capabilities will be enabled or disabled based on whether we can load
OpenSSL successfully or not.
@@ -25,6 +25,17 @@
* Added some unit tests for the BER core extensions.
* Documentation Changes:
* Core class extension methods under Net::BER.
+ * Extensive changes to Net::BER documentation.
+ * Cleaned up some rdoc oddities, suppressed empty documentation sections
+ where possible.
+ * Added a document describing how to contribute to Net::LDAP most
+ effectively.
+ * Added a document recognizing contributors to Net::LDAP.
+* Extended unit testing:
+ * Added some unit tests for the BER core extensions.
+ * The LDIF test data file was split for Ruby 1.9 regexp support.
+ * Added a cruisecontrol.rb task.
+ * Converted some test/unit tests to specs.
* Code clean-up:
* Made the formatting of code consistent across all files.
* Removed Net::BER::BERParser::TagClasses as it does not appear to be used.
@@ -35,16 +46,18 @@
Pdu#result. This may be changed in Net::LDAP 1.0 to return the full
Pdu#result, but if we do so, it will be that way for all LDAP calls
involving Pdu objects.
+ * Renamed Net::LDAP::Psw to Net::LDAP::Password with a corresponding filename
+ change.
+ * Removed the stub file lib/net/ldif.rb and class Net::LDIF.
* Project Management:
* Changed the license from Ruby + GPL to MIT with the agreement of the
original author (Francis Cianfrocca) and the named contributors. Versions
prior to 0.2.0 are still available under the Ruby + GPL license.
- * Added a hacking document and a contributors document.
=== Net::LDAP 0.1.1 / 2010-03-18
* Fixing a critical problem with sockets.
-=== Net::LDAP 0.1.0 / 2010-03-17
+=== Net::LDAP 0.1 / 2010-03-17
* Small fixes throughout, more to come.
* Ruby 1.9 support added.
* Ruby 1.8.6 and below support removed. If we can figure out a compatible way
View
@@ -22,3 +22,8 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=== Notice of License Change
+
+Versions prior to 0.2 were under Ruby's dual license with the GNU GPL. With
+this release (0.2), Net::LDAP is now under the MIT license.
View
@@ -21,7 +21,10 @@ lib/net/ldap/entry.rb
lib/net/ldap/filter.rb
lib/net/ldap/password.rb
lib/net/ldap/pdu.rb
+<<<<<<< HEAD
lib/net/ldif.rb
+=======
+>>>>>>> f46c68dce3be545811041fb344273a9c84d372c4
lib/net/snmp.rb
spec/integration/ssl_ber_spec.rb
spec/spec.opts
View
@@ -2,20 +2,24 @@
== Description
-Net::LDAP for Ruby implements client access for the Lightweight Directory
-Access Protocol (LDAP), an IETF standard protocol for accessing distributed
-directory services. Net::LDAP is written completely in Ruby with no external
-dependencies. It supports most LDAP client features and a subset of server
-features as well.
-
-Net::LDAP strives for standards-conformity ({RFC
-4511}[http://www.rfc-editor.org/rfc/rfc4511.txt]), but it also provides support
-for features in popular non-conforming LDAP servers.
+Net::LDAP for Ruby (also called net-ldap) implements client access for the
+Lightweight Directory Access Protocol (LDAP), an IETF standard protocol for
+accessing distributed directory services. Net::LDAP is written completely in
+Ruby with no external dependencies. It supports most LDAP client features and a
+subset of server features as well.
+
+Net::LDAP has been tested against modern popular LDAP servers including
+OpenLDAP and Active Directory. The current release is mostly compliant with
+earlier versions of the IETF LDAP RFCs (2251–2256, 2829–2830, 3377, and 3771).
+Our roadmap for Net::LDAP 1.0 is to gain full <em>client</em> compliance with
+the most recent LDAP RFCs (4510–4519, plutions of 4520–4532).
== Where
* {RubyForge}[http://rubyforge.org/projects/net-ldap]
* {GitHub}[https://github.com/ruby-ldap/ruby-net-ldap]
+* {ruby-ldap@googlegroups.com}[http://groups.google.com/group/ruby-ldap]
+* {Documentation}[http://net-ldap.rubyforge.org/]
The Net::LDAP for Ruby documentation, project description, and main downloads
can currently be found on {RubyForge}[http://rubyforge.org/projects/net-ldap].
@@ -34,9 +38,14 @@ Net::LDAP is a pure Ruby library. It does not require any external libraries.
You can install the RubyGems version of Net::LDAP available from the usual
sources.
-* gem install net-ldap
+ gem install net-ldap
+
+Simply require either 'net-ldap' or 'net/ldap'.
-Simply require 'net/ldap'.
+For non-RubyGems installations of Net::LDAP, you can use Minero Aoki's
+{setup.rb}[http://i.loveruby.net/en/projects/setup/] as the layout of
+Net::LDAP is compliant. The setup installer is not included in the
+Net::LDAP repository.
:include: Contributors.rdoc
View
@@ -31,6 +31,7 @@ Hoe.spec 'net-ldap' do
self.extra_dev_deps << [ "metaid", "~> 1" ]
self.extra_dev_deps << [ "flexmock", "~> 0.9.0" ]
self.extra_dev_deps << [ "rspec", "~> 2.0" ]
+
self.clean_globs << "coverage"
self.spec_extras[:required_ruby_version] = ">= 1.8.7"
View
@@ -1,4 +1,4 @@
-module Net
+module Net # :nodoc:
##
# == Basic Encoding Rules (BER) Support Module
#
@@ -105,7 +105,7 @@ module Net
# <tr><th>BMPString</th><th>C</th><td>30: 62 (0x3e, 0b00111110)</td></tr>
# </table>
module BER
- VERSION = '0.1.0'
+ VERSION = '0.2'
##
# Used for BER-encoding the length and content bytes of a Fixnum integer
View
@@ -1,29 +1,5 @@
-# NET::BER
-# Mixes ASN.1/BER convenience methods into several standard classes. Also
-# provides BER parsing functionality.
-#
-#--
-# Copyright (C) 2006 by Francis Cianfrocca and other contributors. All
-# Rights Reserved.
-#
-# Gmail: garbagecat10
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#++
-
require 'net/ber/ber_parser'
+# :stopdoc:
class IO
include Net::BER::BERParser
end
@@ -37,36 +13,49 @@ class OpenSSL::SSL::SSLSocket
include Net::BER::BERParser
end
end
+# :startdoc:
-module Net::BER::Extensions; end
+module Net::BER::Extensions # :nodoc:
+end
require 'net/ber/core_ext/string'
+# :stopdoc:
class String
include Net::BER::BERParser
include Net::BER::Extensions::String
end
require 'net/ber/core_ext/array'
-class Array
+# :stopdoc:
+class Array
include Net::BER::Extensions::Array
end
+# :startdoc:
require 'net/ber/core_ext/bignum'
-class Bignum
+# :stopdoc:
+class Bignum
include Net::BER::Extensions::Bignum
end
+# :startdoc:
require 'net/ber/core_ext/fixnum'
-class Fixnum
+# :stopdoc:
+class Fixnum
include Net::BER::Extensions::Fixnum
end
+# :startdoc:
require 'net/ber/core_ext/true_class'
-class TrueClass
+# :stopdoc:
+class TrueClass
include Net::BER::Extensions::TrueClass
end
+# :startdoc:
require 'net/ber/core_ext/false_class'
-class FalseClass
+# :stopdoc:
+class FalseClass
include Net::BER::Extensions::FalseClass
end
+# :startdoc:
@@ -1,3 +1,5 @@
+##
+# BER extensions to the Array class.
module Net::BER::Extensions::Array
##
# Converts an Array to a BER sequence. All values in the Array are
@@ -1,3 +1,5 @@
+##
+# BER extensions to the Bignum class.
module Net::BER::Extensions::Bignum
##
# Converts a Bignum to an uncompressed BER integer.
@@ -1,3 +1,5 @@
+##
+# BER extensions to +false+.
module Net::BER::Extensions::FalseClass
##
# Converts +false+ to the BER wireline representation of +false+.
@@ -1,3 +1,5 @@
+##
+# Ber extensions to the Fixnum class.
module Net::BER::Extensions::Fixnum
##
# Converts the fixnum to BER format.
@@ -1,5 +1,7 @@
require 'stringio'
+##
+# BER extensions to the String class.
module Net::BER::Extensions::String
##
# Converts a string to a BER string. Universal octet-strings are tagged
@@ -1,3 +1,5 @@
+##
+# BER extensions to +true+.
module Net::BER::Extensions::TrueClass
##
# Converts +true+ to the BER wireline representation of +true+.
View
@@ -1,12 +1,16 @@
require 'ostruct'
-module Net
+module Net # :nodoc:
class LDAP
begin
require 'openssl'
+ ##
+ # Set to +true+ if OpenSSL is available and LDAPS is supported.
HasOpenSSL = true
rescue LoadError
+ # :stopdoc:
HasOpenSSL = false
+ # :startdoc:
end
end
end
@@ -19,16 +23,6 @@ class LDAP
require 'net/ldap/password'
require 'net/ldap/entry'
-# == Net::LDAP
-#
-# This library provides a pure-Ruby implementation of the LDAP client
-# protocol, per RFC-2251. 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 the LDAP protocol itself, and thus presenting as
-# Ruby-like a programming interface as possible.
-#
# == Quick-start for the Impatient
# === Quick Example of a user-authentication against an LDAP directory:
#
@@ -246,7 +240,7 @@ class LDAP
# and then keeps it open while it executes a user-supplied block.
# Net::LDAP#open closes the connection on completion of the block.
class Net::LDAP
- VERSION = "0.1.1"
+ VERSION = "0.2"
class LdapError < StandardError; end
Oops, something went wrong.

0 comments on commit 84e42ce

Please sign in to comment.