ucb_ldap 2.0.0.pre1 → 2.0.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/CHANGELOG +137 -135
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/{README → README.md} +82 -80
  7. data/Rakefile +38 -20
  8. data/lib/ucb_ldap.rb +238 -204
  9. data/lib/{ucb_ldap_address.rb → ucb_ldap/address.rb} +106 -106
  10. data/lib/{ucb_ldap_affiliation.rb → ucb_ldap/affiliation.rb} +16 -16
  11. data/lib/{ucb_ldap_entry.rb → ucb_ldap/entry.rb} +455 -448
  12. data/lib/{ucb_ldap_person_job_appointment.rb → ucb_ldap/job_appointment.rb} +77 -79
  13. data/lib/{ucb_ldap_namespace.rb → ucb_ldap/namespace.rb} +40 -50
  14. data/lib/{ucb_ldap_org.rb → ucb_ldap/org.rb} +427 -429
  15. data/lib/{ucb_ldap_person.rb → ucb_ldap/person.rb} +157 -148
  16. data/lib/{person → ucb_ldap/person}/affiliation_methods.rb +23 -22
  17. data/lib/ucb_ldap/person/common_attributes.rb +63 -0
  18. data/lib/{ucb_ldap_schema.rb → ucb_ldap/schema.rb} +28 -28
  19. data/lib/{ucb_ldap_schema_attribute.rb → ucb_ldap/schema_attribute.rb} +152 -153
  20. data/lib/{ucb_ldap_service.rb → ucb_ldap/service.rb} +17 -19
  21. data/lib/{ucb_ldap_student_term.rb → ucb_ldap/student_term.rb} +29 -31
  22. data/lib/ucb_ldap/version.rb +3 -0
  23. data/spec/rails_binds.yml +9 -0
  24. data/spec/spec_helper.rb +43 -0
  25. data/spec/ucb_ldap/address_spec.rb +54 -0
  26. data/spec/ucb_ldap/affiliation_spec.rb +85 -0
  27. data/spec/ucb_ldap/entry_spec.rb +241 -0
  28. data/spec/ucb_ldap/job_appointment_spec.rb +65 -0
  29. data/spec/ucb_ldap/namespace_spec.rb +72 -0
  30. data/spec/ucb_ldap/org_spec.rb +217 -0
  31. data/spec/ucb_ldap/person_spec.rb +225 -0
  32. data/spec/ucb_ldap/schema_attribute_spec.rb +122 -0
  33. data/spec/ucb_ldap/schema_spec.rb +104 -0
  34. data/spec/ucb_ldap/service_spec.rb +127 -0
  35. data/spec/ucb_ldap/student_term_spec.rb +121 -0
  36. data/spec/ucb_ldap_spec.rb +182 -0
  37. data/ucb_ldap.gemspec +20 -27
  38. metadata +113 -64
  39. data/Manifest +0 -23
  40. data/TODO +0 -2
  41. data/lib/person/adv_con_person.rb +0 -0
  42. data/lib/person/generic_attributes.rb +0 -68
  43. data/lib/ucb_ldap_exceptions.rb +0 -27
  44. data/version.yml +0 -1
data/Manifest DELETED
@@ -1,23 +0,0 @@
1
- CHANGELOG
2
- Manifest
3
- README
4
- Rakefile
5
- TODO
6
- lib/person/adv_con_person.rb
7
- lib/person/affiliation_methods.rb
8
- lib/person/generic_attributes.rb
9
- lib/ucb_ldap.rb
10
- lib/ucb_ldap_address.rb
11
- lib/ucb_ldap_affiliation.rb
12
- lib/ucb_ldap_entry.rb
13
- lib/ucb_ldap_exceptions.rb
14
- lib/ucb_ldap_namespace.rb
15
- lib/ucb_ldap_org.rb
16
- lib/ucb_ldap_person.rb
17
- lib/ucb_ldap_person_job_appointment.rb
18
- lib/ucb_ldap_schema.rb
19
- lib/ucb_ldap_schema_attribute.rb
20
- lib/ucb_ldap_service.rb
21
- lib/ucb_ldap_student_term.rb
22
- schema/schema.yml
23
- version.yml
data/TODO DELETED
@@ -1,2 +0,0 @@
1
- * Make thread safe, mutex around search?
2
-
File without changes
@@ -1,68 +0,0 @@
1
-
2
- module UCB::LDAP
3
- module GenericAttributes
4
-
5
-
6
- # Returns +true+ if the entry represents a test entry.
7
- def test?
8
- berkeleyEduTestIDFlag
9
- end
10
-
11
- def uid
12
- super.first
13
- end
14
-
15
- def firstname
16
- givenname.first
17
- end
18
- alias :first_name :firstname
19
-
20
- def lastname
21
- sn.first
22
- end
23
- alias :last_name :lastname
24
-
25
- def email
26
- mail.first
27
- end
28
-
29
- def phone
30
- telephoneNumber.first
31
- end
32
-
33
- # Returns +Array+ of Affiliation for this Person. Requires a bind with access to affiliations.
34
- # See UCB::LDAP.authenticate().
35
- def affiliate_affiliations
36
- @affiliate_affiliations ||= Affiliation.find_by_uid(uid)
37
- end
38
-
39
- # Returns +Array+ of Address for this Person.
40
- # Requires a bind with access to addresses.
41
- # See UCB::LDAP.authenticate().
42
- def addresses
43
- @addresses ||= Address.find_by_uid(uid)
44
- end
45
-
46
- # Returns +Array+ of Namespace for this Person.
47
- # Requires a bind with access to namespaces.
48
- # See UCB::LDAP.authenticate().
49
- def namespaces
50
- @namespaces ||= Namespace.find_by_uid(uid)
51
- end
52
-
53
- # Returns +Array+ of Service for this Person.
54
- # Requires a bind with access to services.
55
- # See UCB::LDAP.authenticate().
56
- def services
57
- @services ||= Service.find_by_uid(uid)
58
- end
59
-
60
- # Returns +Array+ of Address for this Person.
61
- # Requires a bind with access to addresses.
62
- # See UCB::LDAP.authenticate().
63
- def addresses
64
- @addresses ||= Address.find_by_uid(uid)
65
- end
66
-
67
- end
68
- end
@@ -1,27 +0,0 @@
1
- module UCB
2
- module LDAP
3
-
4
- class BadAttributeNameException < Exception #:nodoc:
5
- end
6
-
7
- class BindFailedException < Exception #:nodoc:
8
- def initialize
9
- super("Failed to bind username '#{UCB::LDAP.username}' to '#{UCB::LDAP.host}'")
10
- end
11
- end
12
-
13
- class ConnectionFailedException < Exception #:nodoc:
14
- def initialize
15
- super("Failed to connect to ldap host '#{UCB::LDAP.host}''")
16
- end
17
- end
18
-
19
- class DirectoryNotUpdatedException < Exception #:nodoc:
20
- def initialize
21
- result = UCB::LDAP.net_ldap.get_operation_result
22
- super("(Code=#{result.code}) #{result.message}")
23
- end
24
- end
25
-
26
- end
27
- end
data/version.yml DELETED
@@ -1 +0,0 @@
1
- version: 'rel-2.0.0'