Skip to content
18 changes: 17 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,26 @@ useful. If there is another library which handles it, we list it here.

== Develop

Clone the repository using

git clone https://github.com/ruby-ldap/ruby-net-ldap
cd ruby-net-ldap

To install all the dependencies for local development:

gem install bundler # if you don't have it
bundle install

This task will run the test suite and the
{RuboCop}[https://github.com/bbatsov/rubocop] static code analyzer.

rake rubotest
rake rubotest # without bundler
bundle exec rake rubotest # if you are using bundler

To build the gem from the existing gemset

gem build net-ldap.gemspec
gem install net-ldap-{version}.gem

CI takes too long? If your local box supports
{Docker}[https://www.docker.com/], you can also run integration tests locally.
Expand Down
4 changes: 3 additions & 1 deletion lib/net/ldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -547,12 +547,13 @@ def initialize(args = {})
@host = args[:host] || DefaultHost
@port = args[:port] || DefaultPort
@hosts = args[:hosts]
@verbose = false # Make this configurable with a switch on the class.
@verbose = args[:verbose] || false # Make this configurable with a switch on the class.
@auth = args[:auth] || DefaultAuth
@base = args[:base] || DefaultTreebase
@force_no_page = args[:force_no_page] || DefaultForceNoPage
@encryption = normalize_encryption(args[:encryption]) # may be nil
@connect_timeout = args[:connect_timeout]
@socket_class = args[:socket_class]

if pr = @auth[:password] and pr.respond_to?(:call)
@auth[:password] = pr.call
Expand Down Expand Up @@ -1315,6 +1316,7 @@ def new_connection
:hosts => @hosts,
:encryption => @encryption,
:instrumentation_service => @instrumentation_service,
:socket_class => @socket_class,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to this file should be in a separate PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhivyada ☝️

:connect_timeout => @connect_timeout

# Force connect to see if there's a connection error
Expand Down