net-ldap 0.14.0 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +5 -2
- data/.rubocop_todo.yml +343 -219
- data/.travis.yml +27 -3
- data/CONTRIBUTING.md +1 -1
- data/History.rdoc +21 -0
- data/README.rdoc +10 -7
- data/Rakefile +1 -1
- data/lib/net-ldap.rb +1 -1
- data/lib/net/ber.rb +5 -6
- data/lib/net/ber/ber_parser.rb +3 -3
- data/lib/net/ber/core_ext.rb +6 -6
- data/lib/net/ldap.rb +65 -55
- data/lib/net/ldap/auth_adapter/gss_spnego.rb +2 -2
- data/lib/net/ldap/auth_adapter/sasl.rb +4 -2
- data/lib/net/ldap/auth_adapter/simple.rb +1 -1
- data/lib/net/ldap/connection.rb +58 -35
- data/lib/net/ldap/dataset.rb +2 -2
- data/lib/net/ldap/dn.rb +13 -14
- data/lib/net/ldap/entry.rb +5 -6
- data/lib/net/ldap/error.rb +1 -0
- data/lib/net/ldap/filter.rb +10 -3
- data/lib/net/ldap/instrumentation.rb +2 -2
- data/lib/net/ldap/password.rb +3 -5
- data/lib/net/ldap/pdu.rb +1 -1
- data/lib/net/ldap/version.rb +1 -1
- data/lib/net/snmp.rb +1 -1
- data/net-ldap.gemspec +4 -4
- data/script/ldap-docker +12 -0
- data/test/ber/test_ber.rb +1 -1
- data/test/fixtures/ca/docker-ca.pem +18 -0
- data/test/fixtures/{openldap/retcode.ldif → ldif/06-retcode.ldif} +7 -8
- data/test/fixtures/ldif/50-seed.ldif +374 -0
- data/test/integration/test_add.rb +1 -3
- data/test/integration/test_ber.rb +2 -2
- data/test/integration/test_bind.rb +193 -14
- data/test/integration/test_delete.rb +1 -3
- data/test/integration/test_open.rb +10 -11
- data/test/integration/test_password_modify.rb +29 -16
- data/test/integration/test_return_codes.rb +12 -4
- data/test/integration/test_search.rb +8 -8
- data/test/test_dn.rb +2 -3
- data/test/test_entry.rb +3 -2
- data/test/test_filter_parser.rb +5 -0
- data/test/test_helper.rb +12 -5
- data/test/test_ldap.rb +5 -5
- data/test/test_ldap_connection.rb +47 -35
- data/test/test_ldif.rb +13 -13
- data/test/test_password.rb +2 -2
- data/test/test_snmp.rb +4 -5
- data/test/test_ssl_ber.rb +7 -3
- data/testserver/ldapserver.rb +13 -22
- metadata +17 -26
- data/script/install-openldap +0 -115
- data/test/fixtures/cacert.pem +0 -20
- data/test/fixtures/openldap/memberof.ldif +0 -33
- data/test/fixtures/openldap/slapd.conf.ldif +0 -67
- data/test/fixtures/seed.ldif +0 -374
- data/test/support/vm/openldap/README.md +0 -32
- data/test/support/vm/openldap/Vagrantfile +0 -33
@@ -1,32 +0,0 @@
|
|
1
|
-
# Local OpenLDAP Integration Testing
|
2
|
-
|
3
|
-
Set up a [Vagrant](http://www.vagrantup.com/) VM to run integration tests against OpenLDAP locally.
|
4
|
-
|
5
|
-
To run integration tests locally:
|
6
|
-
|
7
|
-
``` bash
|
8
|
-
# start VM (from the correct directory)
|
9
|
-
$ cd test/support/vm/openldap/
|
10
|
-
$ vagrant up
|
11
|
-
|
12
|
-
# get the IP address of the VM
|
13
|
-
$ ip=$(vagrant ssh -- "ifconfig eth1 | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n1")
|
14
|
-
|
15
|
-
# change back to root project directory
|
16
|
-
$ cd ../../../..
|
17
|
-
|
18
|
-
# run all tests, including integration tests
|
19
|
-
$ time INTEGRATION=openldap INTEGRATION_HOST=$ip bundle exec rake
|
20
|
-
|
21
|
-
# run a specific integration test file
|
22
|
-
$ time INTEGRATION=openldap INTEGRATION_HOST=$ip bundle exec ruby test/integration/test_search.rb
|
23
|
-
|
24
|
-
# run integration tests by default
|
25
|
-
$ export INTEGRATION=openldap
|
26
|
-
$ export INTEGRATION_HOST=$ip
|
27
|
-
|
28
|
-
# now run tests without having to set ENV variables
|
29
|
-
$ time bundle exec rake
|
30
|
-
```
|
31
|
-
|
32
|
-
You may need to `gem install vagrant` first in order to provision the VM.
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
|
4
|
-
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
5
|
-
VAGRANTFILE_API_VERSION = "2"
|
6
|
-
|
7
|
-
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
8
|
-
config.vm.hostname = "rubyldap.com"
|
9
|
-
|
10
|
-
config.vm.box = "hashicorp/precise64"
|
11
|
-
|
12
|
-
config.vm.network "private_network", type: :dhcp
|
13
|
-
|
14
|
-
config.ssh.forward_agent = true
|
15
|
-
|
16
|
-
config.vm.provision "shell", inline: "apt-get update; exec env /vagrant_data/script/install-openldap"
|
17
|
-
|
18
|
-
config.vm.synced_folder "../../../..", "/vagrant_data"
|
19
|
-
|
20
|
-
config.vm.provider "vmware_fusion" do |vb, override|
|
21
|
-
override.vm.box = "hashicorp/precise64"
|
22
|
-
vb.memory = 4596
|
23
|
-
vb.vmx["displayname"] = "integration tests vm"
|
24
|
-
vb.vmx["numvcpus"] = "2"
|
25
|
-
end
|
26
|
-
|
27
|
-
config.vm.provider "virtualbox" do |vb, override|
|
28
|
-
vb.memory = 4096
|
29
|
-
vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
|
30
|
-
vb.customize ["modifyvm", :id, "--chipset", "ich9"]
|
31
|
-
vb.customize ["modifyvm", :id, "--vram", "16"]
|
32
|
-
end
|
33
|
-
end
|