Skip to content

Commit

Permalink
Fixes to aol for edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Carlson committed Dec 23, 2009
1 parent da2241f commit 357f367
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/contacts/aol.rb
Expand Up @@ -131,6 +131,10 @@ def contacts
data, resp, cookies, forward, old_url = get(forward, cookies, old_url) + [forward]
end

if data.include?("error.gif")
raise AuthenticationError, "Account invalid"
end

parse data
end
end
Expand All @@ -140,7 +144,7 @@ def parse(data, options={})
data = CSV::Reader.parse(data)
col_names = data.shift
@contacts = data.map do |person|
["#{person[0]} #{person[1]}", person[4]] unless person[4].empty?
["#{person[0]} #{person[1]}", person[4]] if person[4] && !person[4].empty?
end.compact
end
end
Expand Down

0 comments on commit 357f367

Please sign in to comment.