Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Passing the encryption method to
Net::LDAP#new
is apparently not officially supported prior to version 0.13.0 of thenet-ldap
gem. And even then, the API is a bit different from how it is used here. When passed as a parameter to he initializer, Net::LDAP expects it to be a hash or an array.The "right" way to do it prior to 0.13.0 (which, given the versions as stated in the
gemspec
, is the way this library would have to take) is to callNet::LDAP#encryption
after its creation. This then even works with just giving it a symbol; it will do normalization for you. It will also warn you about its deprecation with versions ofnet-ldap
from 0.13.0 onwards.All this is supported by ruby-ldap/ruby-net-ldap#250.
Note that this wouldn't show up in the tests as this causes an error only in
Net::LDAP#open
, not in the initializer itself, but any call to this method is stubbed out in the test suite.