phony 2.18.13 → 2.18.14
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.
- checksums.yaml +4 -4
- data/lib/phony/countries.rb +1 -0
- data/lib/phony/countries/china.rb +4 -1
- data/spec/functional/plausibility_spec.rb +1 -0
- data/spec/lib/phony/countries_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aeda5c706089f2345c5d9a474749f8088a728adedd86f84ce69443540b57612e
|
|
4
|
+
data.tar.gz: 3d2fd865a0bbd0572a8444988e7c53809a0688e98b85b218191cfdbcfe96758c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 301e5a05da90d67f3943ca07d3a42b9def5c4c138b534235152e80b7450068315f1b635fda959c7f6b550fa6e5901ccff0aae9eaeae5d5126aa04cd46e7963ab
|
|
7
|
+
data.tar.gz: bc888bc9e4aa0920f5ba53c1ff264317c7cecb762cfc7f1c386dfa62c6daf6b60218efc5a51725d65a2379f5ac024cbbe62899b6724dff8a96dc4326bad5688e
|
data/lib/phony/countries.rb
CHANGED
|
@@ -607,6 +607,7 @@ describe 'plausibility' do
|
|
|
607
607
|
end
|
|
608
608
|
|
|
609
609
|
it 'is correct for Philippine' do
|
|
610
|
+
Phony.plausible?('+63 2 89889999').should be_truthy
|
|
610
611
|
Phony.plausible?('+63 976 1234567').should be_truthy # mobile phone with area code 9
|
|
611
612
|
Phony.plausible?('+63 876 1234567').should be_truthy # mobile phone with area code 8
|
|
612
613
|
end
|
|
@@ -215,6 +215,7 @@ describe 'country descriptions' do
|
|
|
215
215
|
describe 'China' do
|
|
216
216
|
it_splits '862112345678', ['86', '21', '1234', '5678'] # Shanghai
|
|
217
217
|
it_splits '8675582193447', ['86', '755', '8219', '3447'] # Shenzhen
|
|
218
|
+
it_splits '869511234567', ['86', '951', '123', '4567'] # Yinchuan
|
|
218
219
|
|
|
219
220
|
context 'mobile numbers' do
|
|
220
221
|
%w{
|
|
@@ -613,6 +614,7 @@ describe 'country descriptions' do
|
|
|
613
614
|
end
|
|
614
615
|
describe 'Philippines' do
|
|
615
616
|
it_splits '6321234567', ['63', '2', '1234567']
|
|
617
|
+
it_splits '63289889999', ['63', '2', '89889999']
|
|
616
618
|
it_splits '6321234567890', ['63', '2', '1234567890']
|
|
617
619
|
it_splits '632123456789012', ['63', '2', '123456789012']
|
|
618
620
|
it_splits '639121234567', ['63', '912', '1234567']
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phony
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.18.
|
|
4
|
+
version: 2.18.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Hanke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-06-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: 'Fast international phone number (E164 standard) normalizing, splitting
|
|
14
14
|
and formatting. Lots of formatting options: International (+.., 00..), national
|