ucb_ldap 2.0.0 → 3.0.0
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 +4 -4
- data/.gitignore +1 -1
- data/.irbrc +8 -0
- data/.travis.yml +19 -0
- data/CHANGELOG +8 -0
- data/README.md +27 -15
- data/lib/ucb_ldap.rb +11 -27
- data/lib/ucb_ldap/address.rb +14 -9
- data/lib/ucb_ldap/affiliation.rb +5 -3
- data/lib/ucb_ldap/entry.rb +6 -101
- data/lib/ucb_ldap/job_appointment.rb +22 -13
- data/lib/ucb_ldap/namespace.rb +4 -2
- data/lib/ucb_ldap/person.rb +8 -6
- data/lib/ucb_ldap/person/affiliation_methods.rb +6 -3
- data/lib/ucb_ldap/person/common_attributes.rb +6 -3
- data/lib/ucb_ldap/schema.rb +2 -2
- data/lib/ucb_ldap/schema_attribute.rb +3 -3
- data/lib/ucb_ldap/service.rb +2 -3
- data/lib/ucb_ldap/student_term.rb +34 -19
- data/lib/ucb_ldap/version.rb +1 -1
- data/ucb_ldap.gemspec +8 -5
- metadata +10 -36
- data/spec/rails_binds.yml +0 -9
- data/spec/spec_helper.rb +0 -43
- data/spec/ucb_ldap/address_spec.rb +0 -54
- data/spec/ucb_ldap/affiliation_spec.rb +0 -85
- data/spec/ucb_ldap/entry_spec.rb +0 -241
- data/spec/ucb_ldap/job_appointment_spec.rb +0 -65
- data/spec/ucb_ldap/namespace_spec.rb +0 -72
- data/spec/ucb_ldap/org_spec.rb +0 -217
- data/spec/ucb_ldap/person_spec.rb +0 -225
- data/spec/ucb_ldap/schema_attribute_spec.rb +0 -122
- data/spec/ucb_ldap/schema_spec.rb +0 -104
- data/spec/ucb_ldap/service_spec.rb +0 -127
- data/spec/ucb_ldap/student_term_spec.rb +0 -121
- data/spec/ucb_ldap_spec.rb +0 -182
@@ -20,45 +20,55 @@ module UCB
|
|
20
20
|
@entity_name = 'personJobAppointment'
|
21
21
|
|
22
22
|
def cto_code
|
23
|
-
|
23
|
+
warn "DEPRECATED: cto_code is no longer supported"
|
24
|
+
[]
|
24
25
|
end
|
25
26
|
|
26
27
|
def deptid
|
27
|
-
|
28
|
+
warn "DEPRECATED: deptid is no longer supported"
|
29
|
+
[]
|
28
30
|
end
|
29
31
|
|
30
32
|
def record_number
|
31
|
-
|
33
|
+
warn "DEPRECATED: record_number is no longer supported"
|
34
|
+
[]
|
32
35
|
end
|
33
36
|
|
34
37
|
def personnel_program_code
|
35
|
-
|
38
|
+
warn "DEPRECATED: personnel_program_code is no longer supported"
|
39
|
+
[]
|
36
40
|
end
|
37
41
|
|
38
42
|
def primary?
|
39
|
-
|
43
|
+
warn "DEPRECATED: primary? is no longer supported"
|
44
|
+
[]
|
40
45
|
end
|
41
46
|
|
42
47
|
# Returns Employee Relation Code
|
43
48
|
def erc_code
|
44
|
-
|
49
|
+
warn "DEPRECATED: erc_code is no longer supported"
|
50
|
+
[]
|
45
51
|
end
|
46
52
|
|
47
53
|
def represented?
|
48
|
-
|
54
|
+
warn "DEPRECATED: represented? is no longer supported"
|
55
|
+
[]
|
49
56
|
end
|
50
57
|
|
51
58
|
def title_code
|
52
|
-
|
59
|
+
warn "DEPRECATED: title_code is no longer supported"
|
60
|
+
[]
|
53
61
|
end
|
54
62
|
|
55
63
|
def appointment_type
|
56
|
-
|
64
|
+
warn "DEPRECATED: appointment_type is no longer supported"
|
65
|
+
[]
|
57
66
|
end
|
58
67
|
|
59
68
|
# Returns +true+ if appointment is Without Salary
|
60
69
|
def wos?
|
61
|
-
|
70
|
+
warn "DEPRECATED: wos? is no longer supported"
|
71
|
+
[]
|
62
72
|
end
|
63
73
|
|
64
74
|
|
@@ -67,9 +77,8 @@ module UCB
|
|
67
77
|
# Returns an empty Array ([]) if nothing is found.
|
68
78
|
#
|
69
79
|
def self.find_by_uid(uid)
|
70
|
-
|
71
|
-
|
72
|
-
search(:base => base, :filter => filter).sort_by { |appt| appt.record_number }
|
80
|
+
warn "DEPRECATED: LDAP no longer provides job appointment data. This method will always return an empty array"
|
81
|
+
[]
|
73
82
|
end
|
74
83
|
|
75
84
|
end
|
data/lib/ucb_ldap/namespace.rb
CHANGED
@@ -26,14 +26,16 @@ module UCB
|
|
26
26
|
# Returns an +Array+ of Namespace for _uid_.
|
27
27
|
#
|
28
28
|
def self.find_by_uid(uid)
|
29
|
-
|
29
|
+
warn "DEPRECATED: Namespaces are no longer supported by LDAP. This method always returns an empty Array"
|
30
|
+
[]
|
30
31
|
end
|
31
32
|
|
32
33
|
##
|
33
34
|
# Returns Namespace instance for _cn_.
|
34
35
|
#
|
35
36
|
def self.find_by_cn(cn)
|
36
|
-
|
37
|
+
warn "DEPRECATED: Namespaces are no longer supported by LDAP. This method always returns an empty Array"
|
38
|
+
[]
|
37
39
|
end
|
38
40
|
end
|
39
41
|
end
|
data/lib/ucb_ldap/person.rb
CHANGED
@@ -48,10 +48,6 @@ module UCB::LDAP
|
|
48
48
|
#
|
49
49
|
# p.org_node #=> Org
|
50
50
|
# p.affiliations #=> Array of Affiliation
|
51
|
-
# p.addresses #=> Array of Address
|
52
|
-
# p.job_appointments #=> Array of JobAppointment
|
53
|
-
# p.namespaces #=> Array of Namespace
|
54
|
-
# p.student_terms #=> Array of StudentTerm
|
55
51
|
#
|
56
52
|
# ==Attributes
|
57
53
|
#
|
@@ -124,7 +120,12 @@ module UCB::LDAP
|
|
124
120
|
alias :dept_code :deptid
|
125
121
|
|
126
122
|
def dept_name
|
127
|
-
|
123
|
+
warn "DEPRECATED: LDAP no longer returns department names for person records. You'll need to look up the department code in the org tree. The ucb_orgs gem can help with this"
|
124
|
+
deptid
|
125
|
+
end
|
126
|
+
|
127
|
+
def departments
|
128
|
+
departmentNumber
|
128
129
|
end
|
129
130
|
|
130
131
|
##
|
@@ -133,7 +134,8 @@ module UCB::LDAP
|
|
133
134
|
# See UCB::LDAP.authenticate().
|
134
135
|
#
|
135
136
|
def job_appointments
|
136
|
-
|
137
|
+
warn "DEPRECATED: LDAP no longer contains job appointment data - you now need to go through HCM. This method will always return an empty Array"
|
138
|
+
[]
|
137
139
|
end
|
138
140
|
|
139
141
|
##
|
@@ -52,7 +52,8 @@ module UCB
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def employee_expiration_date
|
55
|
-
|
55
|
+
warn "DEPRECATED: employee_expiration_date is no longer supported"
|
56
|
+
nil
|
56
57
|
end
|
57
58
|
|
58
59
|
def employee?
|
@@ -72,7 +73,8 @@ module UCB
|
|
72
73
|
end
|
73
74
|
|
74
75
|
def student_expiration_date
|
75
|
-
|
76
|
+
warn "DEPRECATED: student_expiration_date is no longer supported"
|
77
|
+
nil
|
76
78
|
end
|
77
79
|
|
78
80
|
def student_registered?
|
@@ -217,7 +219,8 @@ module UCB
|
|
217
219
|
end
|
218
220
|
|
219
221
|
def affiliate_expiration_date
|
220
|
-
|
222
|
+
warn "DEPRECATED: affiliate_expiration_date is no longer supported"
|
223
|
+
nil
|
221
224
|
end
|
222
225
|
|
223
226
|
end
|
@@ -45,21 +45,24 @@ module UCB
|
|
45
45
|
# Requires a bind with access to namespaces.
|
46
46
|
# See UCB::LDAP.authenticate().
|
47
47
|
def namespaces
|
48
|
-
|
48
|
+
warn "DEPRECATED: this is no longer supported by LDAP. This method will always return an empty Array"
|
49
|
+
[]
|
49
50
|
end
|
50
51
|
|
51
52
|
# Returns +Array+ of Service for this Person.
|
52
53
|
# Requires a bind with access to services.
|
53
54
|
# See UCB::LDAP.authenticate().
|
54
55
|
def services
|
55
|
-
|
56
|
+
warn "DEPRECATED: this is no longer supported by LDAP. This method will always return an empty Array"
|
57
|
+
[]
|
56
58
|
end
|
57
59
|
|
58
60
|
# Returns +Array+ of Address for this Person.
|
59
61
|
# Requires a bind with access to addresses.
|
60
62
|
# See UCB::LDAP.authenticate().
|
61
63
|
def addresses
|
62
|
-
|
64
|
+
warn "DEPRECATED: use postalAddress from a Person entry"
|
65
|
+
[]
|
63
66
|
end
|
64
67
|
|
65
68
|
end
|
data/lib/ucb_ldap/schema.rb
CHANGED
@@ -79,10 +79,10 @@ module UCB #:nodoc:
|
|
79
79
|
end
|
80
80
|
|
81
81
|
# Load attributes from URL or file
|
82
|
-
def load_attributes #:nodoc:
|
82
|
+
def load_attributes(no_warn=false) #:nodoc:
|
83
83
|
load_attributes_from_url
|
84
84
|
rescue
|
85
|
-
puts "Warning: schema loading from file"
|
85
|
+
puts "Warning: schema loading from file" unless no_warn
|
86
86
|
load_attributes_from_file
|
87
87
|
end
|
88
88
|
|
@@ -20,11 +20,11 @@ module UCB
|
|
20
20
|
# uid_attr.required? #=> true
|
21
21
|
# uid_attr.type #=> 'string'
|
22
22
|
#
|
23
|
-
# uas_attr = UCB::LDAP::Person.attribute('
|
23
|
+
# uas_attr = UCB::LDAP::Person.attribute('berkeleyEduNameGenerational') # case doesn't matter
|
24
24
|
#
|
25
|
-
# uas_attr.name #=> '
|
25
|
+
# uas_attr.name #=> 'berkeleyEduNameGenerational'
|
26
26
|
# uas_attr.aliases #=> ['ucbvalidflag']
|
27
|
-
# uas_attr.description #=> '
|
27
|
+
# uas_attr.description #=> 'Generational Name'
|
28
28
|
# uas_attr.multi_valued? #=> false
|
29
29
|
# uas_attr.required? #=> false
|
30
30
|
# uas_attr.type #=> 'boolean'
|
data/lib/ucb_ldap/service.rb
CHANGED
@@ -99,9 +99,8 @@ module UCB
|
|
99
99
|
# Returns an empty Array ([]) if nothing is found.
|
100
100
|
#
|
101
101
|
def self.find_by_uid(uid)
|
102
|
-
|
103
|
-
|
104
|
-
search(:base => base, :filter => filter)
|
102
|
+
warn "DEPRECATED: Services are longer supported by LDAP. This method always returns an empty Array"
|
103
|
+
[]
|
105
104
|
end
|
106
105
|
|
107
106
|
end
|
@@ -20,67 +20,83 @@ module UCB
|
|
20
20
|
@entity_name = 'personStudentTerm'
|
21
21
|
|
22
22
|
def change_datetime
|
23
|
-
|
23
|
+
warn "DEPRECATED: change_datetime is no longer supported"
|
24
|
+
[]
|
24
25
|
end
|
25
26
|
|
26
27
|
def college_code
|
27
|
-
|
28
|
+
warn "DEPRECATED: college_code is no longer supported"
|
29
|
+
[]
|
28
30
|
end
|
29
31
|
|
30
32
|
def college_name
|
31
|
-
|
33
|
+
warn "DEPRECATED: college_name is no longer supported"
|
34
|
+
[]
|
32
35
|
end
|
33
36
|
|
34
37
|
def level_code
|
35
|
-
|
38
|
+
warn "DEPRECATED: level_code is no longer supported"
|
39
|
+
[]
|
36
40
|
end
|
37
41
|
|
38
42
|
def level_name
|
39
|
-
|
43
|
+
warn "DEPRECATED: level_name is no longer supported"
|
44
|
+
[]
|
40
45
|
end
|
41
46
|
|
42
47
|
def role_code
|
43
|
-
|
48
|
+
warn "DEPRECATED: role_code is no longer supported"
|
49
|
+
[]
|
44
50
|
end
|
45
51
|
|
46
52
|
def role_name
|
47
|
-
|
53
|
+
warn "DEPRECATED: role_name is no longer supported"
|
54
|
+
[]
|
48
55
|
end
|
49
56
|
|
50
57
|
def major_code
|
51
|
-
|
58
|
+
warn "DEPRECATED: major_code is no longer supported"
|
59
|
+
[]
|
52
60
|
end
|
53
61
|
|
54
62
|
def major_name
|
55
|
-
|
63
|
+
warn "DEPRECATED: major_name is no longer supported"
|
64
|
+
[]
|
56
65
|
end
|
57
66
|
|
58
67
|
def registration_status_code
|
59
|
-
|
68
|
+
warn "DEPRECATED: registration_status_code is no longer supported"
|
69
|
+
[]
|
60
70
|
end
|
61
71
|
|
62
72
|
def registration_status_name
|
63
|
-
|
73
|
+
warn "DEPRECATED: registration_status_name is no longer supported"
|
74
|
+
[]
|
64
75
|
end
|
65
76
|
|
66
77
|
def term_code
|
67
|
-
|
78
|
+
warn "DEPRECATED: term_code is no longer supported"
|
79
|
+
[]
|
68
80
|
end
|
69
81
|
|
70
82
|
def term_name
|
71
|
-
|
83
|
+
warn "DEPRECATED: term_name is no longer supported"
|
84
|
+
[]
|
72
85
|
end
|
73
86
|
|
74
87
|
def term_status
|
75
|
-
|
88
|
+
warn "DEPRECATED: term_status is no longer supported"
|
89
|
+
[]
|
76
90
|
end
|
77
91
|
|
78
92
|
def term_year
|
79
|
-
|
93
|
+
warn "DEPRECATED: term_year is no longer supported"
|
94
|
+
[]
|
80
95
|
end
|
81
96
|
|
82
97
|
def under_graduate_code
|
83
|
-
|
98
|
+
warn "DEPRECATED: under_graduate_code is no longer supported"
|
99
|
+
[]
|
84
100
|
end
|
85
101
|
|
86
102
|
##
|
@@ -89,9 +105,8 @@ module UCB
|
|
89
105
|
# Returns an empty Array ([]) if nothing is found.
|
90
106
|
#
|
91
107
|
def self.find_by_uid(uid)
|
92
|
-
|
93
|
-
|
94
|
-
search(:base => base, :filter => filter)
|
108
|
+
warn "DEPRECATED: Student Terms are no longer supported by LDAP. This method always returns an empty Array"
|
109
|
+
[]
|
95
110
|
end
|
96
111
|
|
97
112
|
end
|
data/lib/ucb_ldap/version.rb
CHANGED
data/ucb_ldap.gemspec
CHANGED
@@ -5,14 +5,17 @@ require 'ucb_ldap/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "ucb_ldap"
|
7
7
|
spec.version = UcbLdap::VERSION
|
8
|
-
spec.authors = ["Steven Hansen, Steve Downey"]
|
9
|
-
spec.email = %w{
|
8
|
+
spec.authors = ["Steven Hansen, Steve Downey, Darin Wilson"]
|
9
|
+
spec.email = %w{adminit@berkeley.edu}
|
10
10
|
spec.description = %q{Convenience classes for interacing with UCB's LDAP directory}
|
11
11
|
spec.summary = %q{Convenience classes for interacing with UCB's LDAP directory}
|
12
|
-
spec.homepage = "https://github.com/
|
12
|
+
spec.homepage = "https://github.com/ucb-ist-eas/ucb-ldap"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
|
-
spec.files = `git ls-files`.split(
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
|
+
f.match(%r{^(test|spec|features)/}) || f.match(/ucb_rails_cli.*\.gem/)
|
17
|
+
end
|
18
|
+
|
16
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
21
|
spec.require_paths = ["lib"]
|
@@ -21,5 +24,5 @@ Gem::Specification.new do |spec|
|
|
21
24
|
spec.add_development_dependency "rake"
|
22
25
|
spec.add_development_dependency "rspec"
|
23
26
|
|
24
|
-
spec.add_runtime_dependency "net-ldap", "0.
|
27
|
+
spec.add_runtime_dependency "net-ldap", "0.16.1"
|
25
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ucb_ldap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Steven Hansen, Steve Downey
|
7
|
+
- Steven Hansen, Steve Downey, Darin Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,22 +58,24 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.16.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.16.1
|
69
69
|
description: Convenience classes for interacing with UCB's LDAP directory
|
70
70
|
email:
|
71
|
-
-
|
71
|
+
- adminit@berkeley.edu
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
|
+
- ".irbrc"
|
78
|
+
- ".travis.yml"
|
77
79
|
- CHANGELOG
|
78
80
|
- Gemfile
|
79
81
|
- LICENSE.txt
|
@@ -96,22 +98,8 @@ files:
|
|
96
98
|
- lib/ucb_ldap/student_term.rb
|
97
99
|
- lib/ucb_ldap/version.rb
|
98
100
|
- schema/schema.yml
|
99
|
-
- spec/rails_binds.yml
|
100
|
-
- spec/spec_helper.rb
|
101
|
-
- spec/ucb_ldap/address_spec.rb
|
102
|
-
- spec/ucb_ldap/affiliation_spec.rb
|
103
|
-
- spec/ucb_ldap/entry_spec.rb
|
104
|
-
- spec/ucb_ldap/job_appointment_spec.rb
|
105
|
-
- spec/ucb_ldap/namespace_spec.rb
|
106
|
-
- spec/ucb_ldap/org_spec.rb
|
107
|
-
- spec/ucb_ldap/person_spec.rb
|
108
|
-
- spec/ucb_ldap/schema_attribute_spec.rb
|
109
|
-
- spec/ucb_ldap/schema_spec.rb
|
110
|
-
- spec/ucb_ldap/service_spec.rb
|
111
|
-
- spec/ucb_ldap/student_term_spec.rb
|
112
|
-
- spec/ucb_ldap_spec.rb
|
113
101
|
- ucb_ldap.gemspec
|
114
|
-
homepage: https://github.com/
|
102
|
+
homepage: https://github.com/ucb-ist-eas/ucb-ldap
|
115
103
|
licenses:
|
116
104
|
- MIT
|
117
105
|
metadata: {}
|
@@ -135,18 +123,4 @@ rubygems_version: 2.6.8
|
|
135
123
|
signing_key:
|
136
124
|
specification_version: 4
|
137
125
|
summary: Convenience classes for interacing with UCB's LDAP directory
|
138
|
-
test_files:
|
139
|
-
- spec/rails_binds.yml
|
140
|
-
- spec/spec_helper.rb
|
141
|
-
- spec/ucb_ldap/address_spec.rb
|
142
|
-
- spec/ucb_ldap/affiliation_spec.rb
|
143
|
-
- spec/ucb_ldap/entry_spec.rb
|
144
|
-
- spec/ucb_ldap/job_appointment_spec.rb
|
145
|
-
- spec/ucb_ldap/namespace_spec.rb
|
146
|
-
- spec/ucb_ldap/org_spec.rb
|
147
|
-
- spec/ucb_ldap/person_spec.rb
|
148
|
-
- spec/ucb_ldap/schema_attribute_spec.rb
|
149
|
-
- spec/ucb_ldap/schema_spec.rb
|
150
|
-
- spec/ucb_ldap/service_spec.rb
|
151
|
-
- spec/ucb_ldap/student_term_spec.rb
|
152
|
-
- spec/ucb_ldap_spec.rb
|
126
|
+
test_files: []
|