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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ff0abb4ff702e766243e5ff416b5b526b4ae0f2e0269e4058f00956b27b7de8
4
- data.tar.gz: 87e13372b42e5b6c8b58012597f5631ebd92d50b213382f5d6f32a90479b4f60
3
+ metadata.gz: 952ff57b69e61432c8d7558c5d7174c1b1624887d334af0dce219f81c3c96994
4
+ data.tar.gz: ea21da7bf86e6a8f0a71e95177cb8d2edaf6f7900700a2416c2d2c89438531e3
5
5
  SHA512:
6
- metadata.gz: a5b69fb0534269a9fdc2b0eda2882d35a4c74cfde74b3d82af50880e83c49a350f770d18538e6b9fca119aa4ca4c59c9482ca9c447620cdbdfe5327f113a268d
7
- data.tar.gz: 10c8ebcb314692ed2e2abafe1a9edd39572c617f8ffe540fcc6ca760aff3c8b7ebd6dbf3f1f2af7d0c76097a340fb2c393516629e229e212af82842d5386d3f5
6
+ metadata.gz: 3b52b40daf56db823378e77216af2a6673c35dd8f9d5167d01cbe1a94112aec66bb41af3367992b9f03ca48480d3e58a9a64de3d3380d4ce198937834bf78b4b
7
+ data.tar.gz: 4437b9bdb39f9258e50e0b5527e58b82b5241b49223df5c296e046b6841028a05076bbfa6c7033f83eb42234f58106a08e06d0491d8146a934a95c5a72fbe349
@@ -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 remove_configuration_by_configuration(config)
95
- @@defined_configurations.delete_if {|key, value| value == config}
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
- remove_configuration_by_configuration(config)
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
@@ -1,3 +1,3 @@
1
1
  module ActiveLdap
2
- VERSION = "5.2.0"
2
+ VERSION = "5.2.1"
3
3
  end
@@ -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.0
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-05-09 00:00:00.000000000 Z
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: 2.7.6
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