No commit activity in last 3 years
No release in over 3 years
Queries the PSU ldap to see if it can find a user that matches the text to get the prefered name and email
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0

Runtime

~> 2.6
= 0.9.3
~> 0.16.0
 Project Readme

ldap_disambiguate

Use ldap to disambiguate a user name against the PSU LDAP.

Useage

Instantiate the servercive with a string LdapDisambiguate::Name.new("jbd123") Call the disambiguate method which returns an array of people in the format [{:id=>"jbd123", :given_name=>"Jane B", :surname=>"Doe", :email=>"jbd123@psu.edu", :affiliation=>["STAFF"]}]

What you pass in as the nam can vary from an id to a list of names and or emails.

Basic usage with a id

You can call dismabiguate with an id, which then call ldap and returns a record containing the

service = LdapDisambiguate::Name.new("cam156") # #<LdapDisambiguate::Name:0x007fab36190710 @name="cam156", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Basic usage with a name

service = LdapDisambiguate::Name.new("Carolyn Cole") # #<LdapDisambiguate::Name:0x007fab36190710 @name="Carolyn Cole", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Useage with last name and first name part

service = LdapDisambiguate::Name.new("Carol Cole") # #<LdapDisambiguate::Name:0x007fab36190710 @name="Carol Cole", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Useage with last name and first name part

service = LdapDisambiguate::Name.new("Carol Cole, cam156") # #<LdapDisambiguate::Name:0x007fab36190710 @name="Carol Cole", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Useage with a list of names

service = LdapDisambiguate::Name.new("Carol Cole; Adam Wead") ##<LdapDisambiguate::Name:0x007fab32cf2418 @name="Carol Cole; Adam Wead", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}, {:id=>"agw13", :given_name=>"ADAM GARNER", :surname=>"WEAD", :email=>"agw13@psu.edu", :affiliation=>["STAFF"]}]