Ruby 2 is required for the latest version of net-ldap, but to support
puppetserver we need to also support 1.9.3. Here we document the
version of net-ldap we require.
Testing the methods inside of the function is a complete pain. This
moves the code out to use the PuppetX pattern and adds some basic unit
tests that validate the logic.