Skip to content
Ruby interface to MIT Directory
Find file
Latest commit 0dcc958 @ecbypi Fix gemspec
Accidentally swapped required double quotes for interpreting '\n'
Failed to load latest commit information.
lib Use net-ldap adapter
spec Use net-ldap adapter
.gitignore Initial, tweaked commit of bunde gem
Gemfile Initial, tweaked commit of bunde gem
Rakefile Initial, tweaked commit of bunde gem
mit-ldap.gemspec Fix gemspec


Ruby wrapper for the MIT LDAP server. Can only be used if on the MIT campus network. Leverages tpope's wonderful Ldaptic


gem 'mit-ldap'


require 'mit-ldap'
MIT::LDAP.connect! # => true => '(uid=mrhalp)') # => any Ldaptic options/methods

# if the connection fails or expires

MIT::LDAP.connected? # => false
MIT::LDAP.connect! # => true (re-establishes connection)

Stubbing out the LDAP server in development can be difficult as it requires setting up a private LDAP server or continuously being on campus for development. This library maintains the expected interface (logger, search) that can be faked in the event where the connection cannot be made or has failed and cannot be made again.

Something went wrong with that request. Please try again.