cornell_ldap 1.1.0 → 1.2.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.
- data/VERSION +1 -1
- data/cornell_ldap.gemspec +1 -1
- data/lib/cornell_ldap.rb +1 -1
- data/spec/cornell_ldap_spec.rb +6 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/cornell_ldap.gemspec
CHANGED
data/lib/cornell_ldap.rb
CHANGED
@@ -46,7 +46,7 @@ module CornellLdap
|
|
46
46
|
return @campus_address
|
47
47
|
end
|
48
48
|
@campus_address = false unless attribute_present?('cornelleducampusaddress') &&
|
49
|
-
@campus_address = { :street => cornelleducampusaddress,
|
49
|
+
@campus_address = { :street => cornelleducampusaddress.strip,
|
50
50
|
:on_campus => true }
|
51
51
|
return campus_address
|
52
52
|
end
|
data/spec/cornell_ldap_spec.rb
CHANGED
@@ -71,12 +71,17 @@ describe "CornellLdap" do
|
|
71
71
|
person.home_address
|
72
72
|
end
|
73
73
|
|
74
|
+
it "should strip whitespace from campus address" do
|
75
|
+
person = mock_person
|
76
|
+
person.campus_address[:street].should eql '-100 Day Hall'
|
77
|
+
end
|
78
|
+
|
74
79
|
def mock_person
|
75
80
|
person = CornellLdap::Record.new
|
76
81
|
person.attributes={
|
77
82
|
'type' => 'staff',
|
78
83
|
'cornelleduacadcollege' => 'AS',
|
79
|
-
'cornelleducampusaddress' => '-100 Day Hall',
|
84
|
+
'cornelleducampusaddress' => '-100 Day Hall ',
|
80
85
|
'cornelledulocaladdress' => '1 Main St., Apt. 1, Ithaca, NY, 14850',
|
81
86
|
'homePostalAddress' => '1 Broadway, New York, NY, 00000',
|
82
87
|
'givenName' => 'John',
|