leereilly/swot — pull request #71 by mdwheele (2014-07-16 03:30:51+00:00)
Title: Adds america.edu to blacklist

I recently ported this Gem to PHP and got some feedback from the sub-reddit community that included this issue. I added a failing test (originally to `it "recognizes academic email addresses and domains" do`) and started debugging. I traced it down to returning true at:

```ruby
def is_academic?(text)
...
elsif BLACKLIST.any? { |d| domain.name =~ /(\A|\.)#{Regexp.escape(d)}\z/ }
false
elsif ACADEMIC_TLDS.include?(domain.tld)
# Value of domain.tld for "america.edu" is "edu", a valid TLD. Return true!
true
elsif match_academic_domain?(domain)
true
...
```

At this point, I moved the test from "recognizes...domains" to the blacklist case and updated the package blacklist to include `america.edu`.

http://www.reddit.com/r/PHP/comments/2assv5/identify_email_addresses_or_domains_names_that/