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 CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0
data/cornell_ldap.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cornell_ldap}
8
- s.version = "1.1.0"
8
+ s.version = "1.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ari Epstein"]
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
@@ -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',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cornell_ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Epstein