ldap_lookup 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b943ecad9bf67507e63bdb72a7bff7d4422380dc0abac50994065ce625b7c22b
4
- data.tar.gz: 545d10f9839cfe5c1a0a5e107799a656e34732c9b2bf1fb803b963d64bc4f3d1
3
+ metadata.gz: c758df2ba4bd275893bab9423486dbf4c8befb3002a9bc480f4f2e4b5d465885
4
+ data.tar.gz: e6c69664b9b03a99725467988028c003e7610bcaaac0f5f0195fae4c19ca4ee5
5
5
  SHA512:
6
- metadata.gz: a3a1d046e9611b6e97a5cbc61032f991506bfa9a180486d8c4cde7e34e9165bbf4749397ca5dfe5571289e1ded538451510ac443bfda57494b433a1a77cfbbd3
7
- data.tar.gz: a34532047bbf26951ca1c63b9e4200b56f67b5af5017a3394fdf110c6873707e87df63b997024b55b51e640127fc2d3104395b3dc7e80b004dbe74aa0ad4b122
6
+ metadata.gz: 358f2ba236db3721236483e2017286d07ffad110f9a60946589d0ca20626d9829a970a9e9dabcd2a9243c3c8cd56a19ca0e8be5949983d1479fea77494e5adc0
7
+ data.tar.gz: 3bc39049501bbab4f7751269c7a5ef12262bd5752c27f38b349ec1171393fe5397d5511ef3ef77e12dc870af6aa12e178b082b433a0abe6545360330aa26a181
data/ldaptest.rb CHANGED
@@ -7,14 +7,10 @@ class Ldaptest
7
7
 
8
8
  ############## CONFIGURATION BLOCK ###################
9
9
  LdapLookup.configuration do |config|
10
- config.host = "adsroot.itcs.umich.edu"
11
- config.base = "OU=UMICH,DC=adsroot,DC=itcs,DC=umich,DC=edu"
12
- config.dept_attribute = "umichPostalAddressData" #sAMAccountName
13
- # config.host = "ldap.umich.edu" #adsroot.itcs.umich.edu
14
- # config.base = "dc=umich,dc=edu" #OU=UMICH,DC=adsroot,DC=itcs,DC=umich,DC=edu
15
- # config.dept_attribute = "umichPostalAddressData" #sAMAccountName
16
- # config.group_attribute = "umichGroupEmail"
17
- # config.group_attribute = "umichGroupEmail"
10
+ config.host = "ldap.umich.edu"
11
+ config.base = "dc=umich,dc=edu"
12
+ config.dept_attribute = "umichPostalAddressData"
13
+ config.group_attribute = "umichGroupEmail"
18
14
  end
19
15
  #######################################################
20
16
 
data/lib/ldap_lookup.rb CHANGED
@@ -53,7 +53,11 @@ module LdapLookup
53
53
  search_filter = Net::LDAP::Filter.eq("uid", search_param)
54
54
  # Execute search
55
55
  ldap.search(filter: search_filter, attributes: result_attrs) { |item|
56
- return item.displayName.first
56
+ begin
57
+ return item.displayName.first
58
+ rescue
59
+ return "not available"
60
+ end
57
61
  }
58
62
  get_ldap_response(ldap)
59
63
  end
@@ -1,3 +1,3 @@
1
1
  module LdapLookup
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ldap_lookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Smoke