phony 2.15.21 → 2.15.23
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.rb +4 -4
- data/lib/phony/countries/ukraine.rb +2 -2
- data/spec/functional/plausibility_spec.rb +3 -3
- data/spec/lib/phony/countries_spec.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ded6a4714a2bd5195e8385f4187f889d0c3aadd6
|
4
|
+
data.tar.gz: 52e3cdffc4522a172347903046803fa18b9eebd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e917455c4e6e3c8ee65764f9eb58eb7ca8661d1955a11b1b5926376ee2a09c5f5a86b8f5f39dc42c653ad8deed8033ac9bc8aa49d6865159cdb6d0ace8e0bd87
|
7
|
+
data.tar.gz: 98d26dd34032919adf066350c8c08273188eb2667208377173f42194fee53e21fcba71bf1897d7f30daccec224bc4f7d0e6e9d07d4f01a8784c38c48da26c4a6
|
data/lib/phony/countries.rb
CHANGED
@@ -351,7 +351,7 @@ Phony.define do
|
|
351
351
|
country '228', none >> split(4,4) # Togolese Republic http://www.wtng.info/wtng-228-tg.html
|
352
352
|
country '229', none >> split(4,4) # Benin http://www.itu.int/oth/T0202000017/en
|
353
353
|
|
354
|
-
country '230', none >> split(
|
354
|
+
country '230', none >> split(4,4) # Mauritius http://www.wtng.info/wtng-230-mu.html
|
355
355
|
|
356
356
|
# Liberia
|
357
357
|
# https://www.numberingplans.com/?page=plans&sub=phonenr&alpha_2_input=LR
|
@@ -384,17 +384,17 @@ Phony.define do
|
|
384
384
|
|
385
385
|
country '235', none >> split(4,4) # Chad http://www.wtng.info/wtng-235-td.html
|
386
386
|
country '236', none >> split(4,4) # Central African Republic http://www.wtng.info/wtng-236-cf.html
|
387
|
-
country '237', none >> split(
|
387
|
+
country '237', none >> split(3,2,2,2) # Cameroon http://www.wtng.info/wtng-237-cm.html
|
388
388
|
country '238', none >> split(3,4) # Cape Verde http://www.wtng.info/wtng-238-cv.html
|
389
389
|
country '239', fixed(1) >> split(3,3) # Sao Tome and Principe, http://www.wtng.info/wtng-239-st.html
|
390
390
|
|
391
391
|
country '240', none >> split(3,3,3) # Equatorial Guinea
|
392
392
|
country '241', fixed(1) >> split(3,3) # Gabonese Republic http://www.wtng.info/wtng-241-ga.html
|
393
393
|
country '242', none >> split(4,5) # Congo http://www.wtng.info/wtng-242-cg.html
|
394
|
-
country '243', fixed(
|
394
|
+
country '243', fixed(2) >> split(3,4) # Democratic Republic of the Congo http://www.wtng.info/wtng-243-cd.html
|
395
395
|
country '244', one_of('321', '348', '358', '363', '364', '485', '526', '535', '546', '612', '643', '652', '655', '722', '726', '728', '729', '777') >> split(3,3) | # Angola
|
396
396
|
fixed(2) >> split(3,4)
|
397
|
-
country '245', none >> split(3,4) # Guinea-Bissau http://www.wtng.info/wtng-245-gw.html
|
397
|
+
country '245', none >> split(2,3,4) # Guinea-Bissau http://www.wtng.info/wtng-245-gw.html
|
398
398
|
country '246', none >> split(3,4) # Diego Garcia http://www.wtng.info/wtng-246-io.html
|
399
399
|
country '247', none >> split(4) # Ascension
|
400
400
|
|
@@ -601,9 +601,9 @@ ndcs_with_4_subscriber_numbers = %w(
|
|
601
601
|
)
|
602
602
|
|
603
603
|
seven_digit_mobile_prefixes = [
|
604
|
-
'50', '66', '95', '99', #
|
604
|
+
'50', '66', '95', '99', # Vodafone
|
605
605
|
'67', '96', '97', '98', # Kyivstar
|
606
|
-
'63', '93', #
|
606
|
+
'63', '93', '73', # Lifecell
|
607
607
|
'39', # Kyivstar(Golden Telecom)
|
608
608
|
'68', # Kyivstar(Beeline)
|
609
609
|
'91', # UTEL
|
@@ -51,7 +51,7 @@ describe 'plausibility' do
|
|
51
51
|
it_is_correct_for 'Costa Rica', :samples => '+506 2 234 5678'
|
52
52
|
it_is_correct_for "Côte d'Ivoire", :samples => '+225 9358 8764'
|
53
53
|
it_is_correct_for 'Democratic Republic of Timor-Leste', :samples => ['+670 465 7886', '+670 7465 7886']
|
54
|
-
it_is_correct_for 'Democratic Republic of the Congo', :samples => '+243
|
54
|
+
it_is_correct_for 'Democratic Republic of the Congo', :samples => '+243 80 864 9794'
|
55
55
|
it_is_correct_for 'Diego Garcia', :samples => '+246 123 7686'
|
56
56
|
it_is_correct_for 'Djibouti', :samples => '+253 3671 1431'
|
57
57
|
it_is_correct_for 'Ecuador', :samples => '+593 68 467 4579'
|
@@ -93,7 +93,7 @@ describe 'plausibility' do
|
|
93
93
|
'+224 700 00 00 00'
|
94
94
|
]
|
95
95
|
|
96
|
-
it_is_correct_for 'Guinea-Bissau', :samples => '+245
|
96
|
+
it_is_correct_for 'Guinea-Bissau', :samples => '+245 44 728 6998'
|
97
97
|
it_is_correct_for 'Guyana', :samples => '+592 263 1234'
|
98
98
|
it_is_correct_for 'Honduras (Republic of)', :samples => '+504 12 961 637'
|
99
99
|
it_is_correct_for 'Iraq', :samples => ['+964 1 123 4567',
|
@@ -150,7 +150,7 @@ describe 'plausibility' do
|
|
150
150
|
it_is_correct_for 'Marshall Islands (Republic of the)', :samples => '+692 372 7183'
|
151
151
|
it_is_correct_for 'Martinique (French Department of)', :samples => '+596 596 123 456'
|
152
152
|
it_is_correct_for 'Mauritania', :samples => '+222 1234 5678'
|
153
|
-
it_is_correct_for 'Mauritius', :samples => '+230
|
153
|
+
it_is_correct_for 'Mauritius', :samples => '+230 5695 2277'
|
154
154
|
it_is_correct_for 'Micronesia (Federated States of)', :samples => '+691 766 7914'
|
155
155
|
it_is_correct_for 'Moldova', :samples => ['+373 800 123 45',
|
156
156
|
'+373 22 123 345',
|
@@ -748,7 +748,7 @@ describe 'country descriptions' do
|
|
748
748
|
it_splits '25712345678', ['257', false, '1234', '5678']
|
749
749
|
end
|
750
750
|
describe 'Cameroon' do
|
751
|
-
it_splits '
|
751
|
+
it_splits '237276593812', ['237', false, '276', '59', '38', '12']
|
752
752
|
end
|
753
753
|
describe 'Cape Verde' do
|
754
754
|
it_splits '2385494177', ['238', false, '549', '4177']
|
@@ -780,7 +780,7 @@ describe 'country descriptions' do
|
|
780
780
|
it_splits '6701742945', ['670', false, '174', '2945']
|
781
781
|
end
|
782
782
|
describe 'Democratic Republic of the Congo' do
|
783
|
-
it_splits '
|
783
|
+
it_splits '243121995381', %w(243 12 199 5381)
|
784
784
|
end
|
785
785
|
describe 'Diego Garcia' do
|
786
786
|
it_splits '2461234683', ['246', false, '123', '4683']
|
@@ -834,7 +834,7 @@ describe 'country descriptions' do
|
|
834
834
|
it_splits '224662123456', ['224', '662', '12', '34', '56']
|
835
835
|
end
|
836
836
|
describe 'Guinea-Bissau' do
|
837
|
-
it_splits '
|
837
|
+
it_splits '245443837652', ['245', false, '44', '383', '7652']
|
838
838
|
end
|
839
839
|
describe 'Guyana' do
|
840
840
|
it_splits '5922631234', %w(592 263 1234)
|
@@ -929,7 +929,7 @@ describe 'country descriptions' do
|
|
929
929
|
it_splits '22212345678', ['222', false, '1234', '5678']
|
930
930
|
end
|
931
931
|
describe 'Mauritius' do
|
932
|
-
it_splits '
|
932
|
+
it_splits '23059518919', ['230', false, '5951', '8919']
|
933
933
|
end
|
934
934
|
describe 'Micronesia (Federated States of)' do
|
935
935
|
it_splits '6911991754', ['691', false, '199', '1754']
|
@@ -1189,6 +1189,7 @@ describe 'country descriptions' do
|
|
1189
1189
|
it_splits '380911234567', %w(380 91 123 45 67)
|
1190
1190
|
it_splits '380921234567', %w(380 92 123 45 67)
|
1191
1191
|
it_splits '380931234567', %w(380 93 123 45 67)
|
1192
|
+
it_splits '380731234567', %w(380 73 123 45 67)
|
1192
1193
|
it_splits '380941234567', %w(380 94 123 45 67)
|
1193
1194
|
it_splits '380951234567', %w(380 95 123 45 67)
|
1194
1195
|
it_splits '380961234567', %w(380 96 123 45 67)
|
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.15.
|
4
|
+
version: 2.15.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Hanke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-31 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
|