Consider all domain suffixes for blacklisting and normalise implementations #54
This change was triggered by the Ruby implementation not matching any blacklisted domains with more than 1 subdomain, e.g.
This refactoring normalises the implementation across the 7 languages:
This removes false-negatives (e.g. where the domain includes > 2 subdomains) in some cases, and false-positives (e.g. where a blacklisted domain appears as a subdomain) in other cases.
As a side effect, several improvements were made to the tests of PHP, Python in particular, using standard libraries for unit testing rather than ad-hoc tests.
Meta: I think this will be easiest to review on a commit-by-commit basis. This PR is based off my other pending PR, so that PR's commit also shows up here.
- Use the same valid email regexp everywhere - based on PHP's FILTER_VALIDATE_EMAIL, - Lowercase the list entries in the generator, rather than in each match implementation.
You're welcome, thanks for maintaining the project!
How do we go about getting a new Ruby gem published? At work we're currently overriding
By the way, do you have any idea why