activeldap 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.textile +11 -0
- data/lib/active_ldap/configuration.rb +2 -2
- data/lib/active_ldap/connection.rb +1 -1
- data/lib/active_ldap/version.rb +1 -1
- data/test/test_connection_per_class.rb +34 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 952ff57b69e61432c8d7558c5d7174c1b1624887d334af0dce219f81c3c96994
|
4
|
+
data.tar.gz: ea21da7bf86e6a8f0a71e95177cb8d2edaf6f7900700a2416c2d2c89438531e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b52b40daf56db823378e77216af2a6673c35dd8f9d5167d01cbe1a94112aec66bb41af3367992b9f03ca48480d3e58a9a64de3d3380d4ce198937834bf78b4b
|
7
|
+
data.tar.gz: 4437b9bdb39f9258e50e0b5527e58b82b5241b49223df5c296e046b6841028a05076bbfa6c7033f83eb42234f58106a08e06d0491d8146a934a95c5a72fbe349
|
data/doc/text/news.textile
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
h1. News
|
2
2
|
|
3
|
+
h2(#release-5-2-1). 5.2.1: 2018-06-13
|
4
|
+
|
5
|
+
h3. Fixes
|
6
|
+
|
7
|
+
* Fixed a bug that configuration may be removed unexpectedly.
|
8
|
+
[GitHub#155][Reported by Juha Erkkilä]
|
9
|
+
|
10
|
+
h3. Thanks
|
11
|
+
|
12
|
+
* Juha Erkkilä
|
13
|
+
|
3
14
|
h2(#release-5-2-0). 5.2.0: 2018-05-09
|
4
15
|
|
5
16
|
h3. Improvements
|
@@ -91,8 +91,8 @@ module ActiveLdap
|
|
91
91
|
@@defined_configurations
|
92
92
|
end
|
93
93
|
|
94
|
-
def
|
95
|
-
@@defined_configurations.
|
94
|
+
def remove_configuration_by_key(key)
|
95
|
+
@@defined_configurations.delete(key)
|
96
96
|
end
|
97
97
|
|
98
98
|
CONNECTION_CONFIGURATION_KEYS = [:uri, :base, :adapter]
|
@@ -135,7 +135,7 @@ module ActiveLdap
|
|
135
135
|
end
|
136
136
|
config = configuration(key)
|
137
137
|
conn = active_connections[key]
|
138
|
-
|
138
|
+
remove_configuration_by_key(key)
|
139
139
|
active_connections.delete_if {|_key, value| value == conn}
|
140
140
|
conn.disconnect! if conn
|
141
141
|
config
|
data/lib/active_ldap/version.rb
CHANGED
@@ -57,6 +57,40 @@ class TestConnectionPerClass < Test::Unit::TestCase
|
|
57
57
|
assert_equal([sub2_base], sub2_class.find(:all).collect(&:dn))
|
58
58
|
end
|
59
59
|
|
60
|
+
def test_multi_same_setup_connections
|
61
|
+
make_ou("Sub")
|
62
|
+
sub_class1 = ou_class("ou=Sub")
|
63
|
+
sub_class2 = ou_class("ou=Sub")
|
64
|
+
|
65
|
+
configuration = current_configuration.symbolize_keys
|
66
|
+
configuration[:scope] = :base
|
67
|
+
current_base = configuration[:base]
|
68
|
+
sub_configuration = configuration.dup
|
69
|
+
sub_base = "ou=Sub,#{current_base}"
|
70
|
+
sub_configuration[:base] = sub_base
|
71
|
+
|
72
|
+
sub_class1.setup_connection(sub_configuration)
|
73
|
+
sub_class2.setup_connection(sub_configuration)
|
74
|
+
|
75
|
+
sub_configuration1 = sub_class1.configuration
|
76
|
+
sub_configuration2 = sub_class2.configuration
|
77
|
+
|
78
|
+
assert_not_nil(sub_configuration1)
|
79
|
+
assert_not_nil(sub_configuration2)
|
80
|
+
|
81
|
+
sub_class1.setup_connection(sub_configuration.dup)
|
82
|
+
sub_class1.prefix = nil
|
83
|
+
|
84
|
+
assert_equal([
|
85
|
+
sub_configuration1,
|
86
|
+
sub_configuration2,
|
87
|
+
],
|
88
|
+
[
|
89
|
+
sub_class1.configuration,
|
90
|
+
sub_class2.configuration,
|
91
|
+
])
|
92
|
+
end
|
93
|
+
|
60
94
|
def test_bind
|
61
95
|
non_anon_class = ou_class("ou=NonAnonymous")
|
62
96
|
anon_class = ou_class("ou=Anonymous")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeldap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Drewry
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
359
|
version: '0'
|
360
360
|
requirements: []
|
361
361
|
rubyforge_project: ruby-activeldap
|
362
|
-
rubygems_version:
|
362
|
+
rubygems_version: 3.0.0.beta1
|
363
363
|
signing_key:
|
364
364
|
specification_version: 4
|
365
365
|
summary: ActiveLdap is a object-oriented API to LDAP
|