mit-ldap 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # mit-ldap
2
2
 
3
- There were a few projects I was working on that required use of the MIT ldap
4
- server. I extracted the dependency into this gem to make my life easier. This
5
- is a name-spaced module that includes Ldaptic::Module.
3
+ Ruby wrapper for the MIT LDAP server. Can only be used if on MIT campus network. Leverages tpope's wonderful [Ldaptic](https://github.com/tpope/ldaptic)
4
+
5
+ ## Installation:
6
+
7
+ ```
8
+ gem 'mit-ldap'
9
+ ```
10
+
11
+ ## Usage:
12
+
13
+ ```ruby
14
+ require 'mit-ldap'
15
+ MIT::LDAP.connect!
16
+ MIT::LDAP.search(:filter => '(uid=mrhalp)') # any Ldaptic syntax
17
+ ```
data/lib/mit/ldap.rb CHANGED
@@ -10,10 +10,10 @@ module MIT
10
10
  self.connection = ::LDAP::Conn.new('ldap-too.mit.edu')
11
11
  singleton_class.send(:include,
12
12
  Ldaptic::Module(
13
- adapter: :ldap_conn,
14
- connection: connection,
15
- host: 'ldap-too.mit.edu',
16
- base: 'dc=mit,dc=edu',
13
+ :adapter => :ldap_conn,
14
+ :connection => connection,
15
+ :host => 'ldap-too.mit.edu',
16
+ :base => 'dc=mit,dc=edu',
17
17
  )
18
18
  )
19
19
  end
@@ -1,5 +1,5 @@
1
1
  module MIT
2
2
  module LDAP
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
data/spec/ldap_spec.rb CHANGED
@@ -41,10 +41,10 @@ module MIT
41
41
 
42
42
  it "includes Ldaptic::Module" do
43
43
  Ldaptic.should_receive(:Module).
44
- with(adapter: :ldap_conn,
45
- base: 'dc=mit,dc=edu',
46
- connection: @connection,
47
- host: 'ldap-too.mit.edu'
44
+ with(:adapter => :ldap_conn,
45
+ :base => 'dc=mit,dc=edu',
46
+ :connection => @connection,
47
+ :host => 'ldap-too.mit.edu'
48
48
  )
49
49
  LDAP.connect!
50
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mit-ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-09 00:00:00.000000000 Z
12
+ date: 2012-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ldaptic
16
- requirement: &70244886779820 !ruby/object:Gem::Requirement
16
+ requirement: &70314214948620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70244886779820
24
+ version_requirements: *70314214948620
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ruby-ldap
27
- requirement: &70244886779300 !ruby/object:Gem::Requirement
27
+ requirement: &70314214948120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.9'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70244886779300
35
+ version_requirements: *70314214948120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70244886778820 !ruby/object:Gem::Requirement
38
+ requirement: &70314214947620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '2.0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70244886778820
46
+ version_requirements: *70314214947620
47
47
  description: Ruby interface for querying MIT LDAP server (only if you're on MITnet)
48
48
  email:
49
49
  - edd_d@mit.edu