This repository has been archived by the owner on Jun 10, 2018. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The libphonenumber project has deprecated and removed
possibleNumberPattern
from the metadata file and this causes the database generator to fail.Announcement in April 2017: https://groups.google.com/forum/#!msg/libphonenumber-discuss/75TOpTFVi08/wobxkrstBAAJ
Change in libphonenumber: google/libphonenumber#1704
This PR changes the behaviour of the
GlobalPhone::Territory
class to consider a phone number as possible if the length of the string matches the number of digits of any national or local-only formats. This should align this gem on what libphonenumber currently does.This change created a major regression where a lot of strings would then be considered valid national phone numbers. To prevent this, a solution similar to what is found in #2 has been implemented, allowing d25c34b to be reverted.
Should fix #51 and possibly others.
Example phone numbers and database test fixtures have been regenerated from current libphonenumber master metadata.