sheffield_ldap_lookup 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,13 @@
|
|
1
1
|
require 'net/ldap'
|
2
2
|
module SheffieldLdapLookup
|
3
|
-
class LdapFinder
|
3
|
+
class LdapFinder
|
4
|
+
attr_accessor :keyword
|
5
|
+
|
6
|
+
def initialize(keyword = nil, config_prefix = nil)
|
7
|
+
self.keyword = keyword
|
8
|
+
@config_prefix = config_prefix
|
9
|
+
end
|
10
|
+
|
4
11
|
class << self
|
5
12
|
attr_accessor :ldap_config
|
6
13
|
end
|
@@ -26,7 +33,7 @@ module SheffieldLdapLookup
|
|
26
33
|
end
|
27
34
|
|
28
35
|
def connection(ldap_class = Net::LDAP)
|
29
|
-
@connection ||= ldap_class.new(host: ldap_config[
|
36
|
+
@connection ||= ldap_class.new(host: ldap_config["#{@config_prefix}host"], port: ldap_config["#{@config_prefix}port"], base: ldap_config["#{@config_prefix}base"])
|
30
37
|
end
|
31
38
|
end
|
32
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sheffield_ldap_lookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: net-ldap
|
@@ -111,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
segments:
|
113
113
|
- 0
|
114
|
-
hash: -
|
114
|
+
hash: -2227935076351519590
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
@@ -120,10 +120,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
version: '0'
|
121
121
|
segments:
|
122
122
|
- 0
|
123
|
-
hash: -
|
123
|
+
hash: -2227935076351519590
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 1.8.
|
126
|
+
rubygems_version: 1.8.23
|
127
127
|
signing_key:
|
128
128
|
specification_version: 3
|
129
129
|
summary: LDAP lookup
|