diff --git a/README.rdoc b/README.rdoc index 5098431e..811497cf 100644 --- a/README.rdoc +++ b/README.rdoc @@ -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. diff --git a/lib/net/ldap.rb b/lib/net/ldap.rb index 9c13a97d..8539ed77 100644 --- a/lib/net/ldap.rb +++ b/lib/net/ldap.rb @@ -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 @@ -1315,6 +1316,7 @@ def new_connection :hosts => @hosts, :encryption => @encryption, :instrumentation_service => @instrumentation_service, + :socket_class => @socket_class, :connect_timeout => @connect_timeout # Force connect to see if there's a connection error