cs-ruby-ldap 0.1.2 → 0.1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudscaling/ldap.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caffea2e1fac8506d6e17580119da954b32517cf
|
4
|
+
data.tar.gz: 97a3409a6f73092a0171c7dea13332db970607ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f4071af0d38a008c6d25a969e5b178687fd01c8ec7c96b1844e3c4972f1dc3bea844a71f0deda01ce9a9e904a312009a55aaf35ac6fd229d1d7c69945a7c20f
|
7
|
+
data.tar.gz: 07f7776f67e9e3219948a546903704a7732e376715e40f16c46b02b05d84c429a44e21b6f0e21595cd2b3de46664c3b93aa4a70a62c5d0f2ec2542115aa21946
|
data/lib/cloudscaling/ldap.rb
CHANGED
@@ -55,10 +55,14 @@ module Cloudscaling
|
|
55
55
|
when 'filter'
|
56
56
|
filter = val
|
57
57
|
when 'attributes'
|
58
|
-
|
58
|
+
case val
|
59
|
+
when Array
|
60
|
+
attributes = val
|
61
|
+
when String
|
62
|
+
attributes = [val]
|
63
|
+
else
|
59
64
|
fail("attributes must be an Array, not #{val.class}")
|
60
65
|
end
|
61
|
-
attributes = val
|
62
66
|
else
|
63
67
|
fail "Unrecognized option: #{arg}"
|
64
68
|
end
|
@@ -93,7 +97,7 @@ module Cloudscaling
|
|
93
97
|
# Check for existence of a cn=config entry
|
94
98
|
def self.dn_exists?(dn)
|
95
99
|
true unless ldapsearch(base: dn,
|
96
|
-
attributes: 'dn',
|
100
|
+
attributes: ['dn'],
|
97
101
|
scope: :base
|
98
102
|
).empty?
|
99
103
|
end
|