phony 2.20.10 → 2.20.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phony/countries/vietnam.rb +3 -0
- data/spec/functional/plausibility_spec.rb +6 -4
- 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: f68626c2d1c6c1acec1bb90885078a4c304e104572eff7ec4861832d6a1a5b3f
|
4
|
+
data.tar.gz: 83f0cc53c664ae5850f7a2f645804a0cd61a839cb389f5108b4744df4bb3c20e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5532e887806791826d8b3796afe665e0510a691e55452461f5392bbc00c06e4222069603adbe6ffb28f174cb545ac50c9181a27730b042f2e6730f1c686479e4
|
7
|
+
data.tar.gz: a0d7f8366751cfb069c57ae99980d997b1d1b1cda370f25dac608c28f183e45b4746866c0c1b89fa2c68d9e4b8b9b33d19e70094eb31f7e4e0943167b5cf8fa7
|
@@ -127,6 +127,9 @@ Phony.define do
|
|
127
127
|
one_of(ndcs_with_7_subscriber_digits) >> split(3,4) |
|
128
128
|
one_of(ndcs_with_8_subscriber_digits) >> split(4,4) |
|
129
129
|
one_of(mobile_with_trunk) >> split(5..8)|
|
130
|
+
one_of('1900') >> matched_split(
|
131
|
+
/\A\d{4}\z/ => [4],
|
132
|
+
/\A\d{6}\z/ => [6]) | # Premium rate
|
130
133
|
# Govt reserved
|
131
134
|
fixed(80) >> split(5) |
|
132
135
|
fixed(69) >> split(1,5)
|
@@ -590,7 +590,9 @@ describe 'plausibility' do
|
|
590
590
|
'+598 805 123 45']
|
591
591
|
it_is_correct_for 'Vietnam', :samples => ['+84 24 41234567',
|
592
592
|
'+84 28 41234567',
|
593
|
-
'+84 23 61234567'
|
593
|
+
'+84 23 61234567',
|
594
|
+
'+84 1900 1212',
|
595
|
+
'+84 1900 541234']
|
594
596
|
it_is_correct_for 'Yemen', :samples => [['+967 1 234 567', '+967 1 234 5678'],
|
595
597
|
'+967 7 234 567',
|
596
598
|
'+967 77 123 4567',
|
@@ -617,16 +619,16 @@ describe 'plausibility' do
|
|
617
619
|
Phony.plausible?('+62 22 0000 0000').should be_truthy
|
618
620
|
Phony.plausible?('+62 22 000 000 000').should be_truthy
|
619
621
|
end
|
620
|
-
|
622
|
+
|
621
623
|
it 'is correct for Italy' do
|
622
624
|
Phony.plausible?('+39 0574 123').should be_falsy
|
623
625
|
Phony.plausible?('+39 0574 1234').should be_truthy
|
624
626
|
Phony.plausible?('+39 0574 12345').should be_falsy
|
625
|
-
|
627
|
+
|
626
628
|
Phony.plausible?('+39 085 541').should be_falsy
|
627
629
|
Phony.plausible?('+39 085 5410').should be_truthy
|
628
630
|
Phony.plausible?('+39 085 54105').should be_truthy
|
629
|
-
|
631
|
+
|
630
632
|
Phony.plausible?('+39 06 4991').should be_falsy
|
631
633
|
Phony.plausible?('+39 06 49911').should be_truthy
|
632
634
|
Phony.plausible?('+39 06 499112').should be_truthy
|
@@ -855,6 +855,8 @@ describe 'country descriptions' do
|
|
855
855
|
it_splits '842841234567', ['84', '28', '4123', '4567'] # Ho Chi Minh City
|
856
856
|
it_splits '84341234567', ['84', '34', '1234567'] # Viettel
|
857
857
|
it_splits '84841234567', ['84', '84', '1234567'] # Vinaphone
|
858
|
+
it_splits '8419001212', ['84', '1900', '1212'] # Vinaphone
|
859
|
+
it_splits '841900541234', ['84', '1900', '541234'] # Vinaphone
|
858
860
|
end
|
859
861
|
describe 'Zambia' do
|
860
862
|
it_splits '260211123456', ['260', '211', '123456'] # Fixed
|
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.20.
|
4
|
+
version: 2.20.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Hanke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-05 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
|