phony 2.8.6 → 2.8.7
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/spec/lib/phony/countries_spec.rb +93 -90
- 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: 8e2d03fb9d2d806c19a40868f855ba47e9ec5d1e
|
4
|
+
data.tar.gz: 6d46d7b99a432ac114aa827805bf6d226277e564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fedc1ec8edfcc93b2a5864ec3521426ac70fd4509a84d20c9e856d33d3933804552a0de67651946ad99e517208c720e778e80548f3d6f6d5c81fdf997db70e1
|
7
|
+
data.tar.gz: 81906816fd112f07dee1fdbf10a48510f136af5b751c9ddf94fa535f332959eb266eaa0bac23a3403d27d631e38819d90683993972626ebb0ff69e71f0c4b09a
|
@@ -548,10 +548,13 @@ describe 'country descriptions' do
|
|
548
548
|
it_splits '2399920012', %w(239 9 920 012)
|
549
549
|
end
|
550
550
|
describe 'South Korea' do
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
551
|
+
it_splits '82212345678', ['82', '2', '1234', '5678'] # Seoul
|
552
|
+
it_splits '825112345678', ['82', '51', '1234', '5678'] # Busan
|
553
|
+
it_splits '821027975588', ['82', '10', '2797', '5588'] # mobile
|
554
|
+
it_splits '821087971234', ['82', '10', '8797', '1234'] # mobile
|
555
|
+
end
|
556
|
+
describe 'Serbia' do
|
557
|
+
it_splits '38163512529', ['381', '63', '512', '529']
|
555
558
|
end
|
556
559
|
describe 'South Sudan' do
|
557
560
|
it_splits '211123212345', ['211', '123', '212', '345']
|
@@ -561,31 +564,31 @@ describe 'country descriptions' do
|
|
561
564
|
it_splits '249187171100', ['249', '18', '717', '1100']
|
562
565
|
end
|
563
566
|
describe 'Thailand' do
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
+
it_splits '6621231234', ['66', '2', '123', '1234'] # Bangkok
|
568
|
+
it_splits '6636123123', ['66', '36', '123', '123'] # Lop Buri
|
569
|
+
it_splits '66851234567', ['66', '851', '234', '567'] # Lop Buri
|
567
570
|
end
|
568
571
|
describe 'Tunesia' do
|
569
|
-
|
570
|
-
|
572
|
+
it_splits '21611231234', ['216', '1', '123', '1234'] # Ariana
|
573
|
+
it_splits '21621231234', ['216', '2', '123', '1234'] # Bizerte
|
571
574
|
end
|
572
575
|
describe 'Salvador (El)' do
|
573
|
-
|
574
|
-
|
576
|
+
it_splits '50321121234', ['503', '2112', '1234'] # Fixed number
|
577
|
+
it_splits '50361121234', ['503', '6112', '1234'] # Mobile number
|
575
578
|
end
|
576
579
|
|
577
580
|
describe 'Singapore' do
|
578
|
-
|
581
|
+
it_splits '6561231234', ['65', false, '6123', '1234'] # Fixed line
|
579
582
|
end
|
580
583
|
describe 'Slovakia' do
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
+
it_splits '421912123456', ['421', '912', '123456'] # Mobile
|
585
|
+
it_splits '421212345678', ['421', '2', '12345678'] # Bratislava
|
586
|
+
it_splits '421371234567', ['421', '37', '1234567'] # Nitra / Other
|
584
587
|
end
|
585
588
|
|
586
589
|
describe 'Slovenia' do
|
587
|
-
|
588
|
-
|
590
|
+
it_splits '38651234567', ['386', '51', '234', '567'] # Mobile
|
591
|
+
it_splits '38611234567', ['386', '1', '123', '4567'] # LJUBLJANA
|
589
592
|
end
|
590
593
|
|
591
594
|
describe 'Spain' do
|
@@ -597,104 +600,104 @@ describe 'country descriptions' do
|
|
597
600
|
end
|
598
601
|
|
599
602
|
describe 'Sri Lanka' do
|
600
|
-
|
603
|
+
it_splits '94711231212', ['94', '71', '123', '12', '12'] # Mobile
|
601
604
|
end
|
602
605
|
|
603
606
|
describe 'Sweden' do
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
607
|
+
it_splits '46812345678', ['46', '8', '123', '45', '678'] # Stockholm
|
608
|
+
it_splits '46111234567', ['46', '11', '123', '45', '67']
|
609
|
+
it_splits '46721234567', ['46', '72', '123', '45', '67'] # mobile
|
610
|
+
it_splits '46125123456', ['46', '125', '123', '456']
|
608
611
|
end
|
609
612
|
describe 'Switzerland' do
|
610
|
-
|
611
|
-
|
613
|
+
it_splits '41443643532', ['41', '44', '364', '35', '32'] # Zurich (usually)
|
614
|
+
it_splits '41800334455', ['41', '800', '334', '455'] # Service number
|
612
615
|
end
|
613
616
|
describe 'Tanzania' do
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
+
it_splits '255221231234', ['255', '22', '123', '1234'] # Dar Es Salaam
|
618
|
+
it_splits '255651231234', ['255', '65', '123', '1234'] # TIGO
|
619
|
+
it_splits '255861123123', ['255', '861', '123', '123'] # Special Rates
|
617
620
|
end
|
618
621
|
describe 'Turkey' do
|
619
|
-
|
622
|
+
it_splits '903121234567', ['90', '312', '123', '4567'] # Ankara
|
620
623
|
end
|
621
624
|
describe 'Uganda' do
|
622
|
-
|
623
|
-
|
625
|
+
it_splits '256414123456', ['256', '41', '4123456'] # Kampania
|
626
|
+
it_splits '256464441234', ['256', '464', '441234'] # Mubende
|
624
627
|
end
|
625
628
|
describe 'The UK' do
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
629
|
+
it_splits '442075671113', ['44', '20', '7567', '1113'] # [2+8] London
|
630
|
+
it_splits '442920229901', ['44', '29', '2022', '9901'] # [2+8] Cardiff
|
631
|
+
it_splits '441134770011', ['44', '113', '477', '0011'] # [3+7] Leeds
|
632
|
+
it_splits '441412770022', ['44', '141', '277', '0022'] # [3+7] Glasgow
|
633
|
+
it_splits '441204500532', ['44', '1204', '500532'] # [4+6] Bolton
|
634
|
+
it_splits '44120462532', ['44', '1204', '62532'] # [4+5] Bolton
|
635
|
+
it_splits '441333247700', ['44', '1333', '247700'] # [4+6] Leven (Fife)
|
636
|
+
it_splits '441382229845', ['44', '1382', '229845'] # [4+6] Dundee
|
637
|
+
it_splits '441420700378', ['44', '1420', '700378'] # [4+6] Alton
|
638
|
+
it_splits '44142080378', ['44', '1420', '80378'] # [4+5] Alton
|
639
|
+
it_splits '441475724688', ['44', '1475', '724688'] # [4+6] Greenock
|
640
|
+
it_splits '441539248756', ['44', '1539', '248756'] # [4+6] Kendal (Mixed area)
|
641
|
+
it_splits '441539648788', ['44', '15396', '48788'] # [5+5] Sedbergh (Mixed area)
|
642
|
+
it_splits '441652757248', ['44', '1652', '757248'] # [4+6] Brigg
|
643
|
+
it_splits '441664333456', ['44', '1664', '333456'] # [4+6] Melton Mowbray
|
644
|
+
it_splits '441697222555', ['44', '1697', '222555'] # [4+6] Brampton (Mixed area)
|
645
|
+
it_splits '441697388555', ['44', '16973', '88555'] # [5+5] Wigton (Mixed area)
|
646
|
+
it_splits '441697433777', ['44', '16974', '33777'] # [5+5] Raughton Head (Mixed area)
|
647
|
+
it_splits '44169772333', ['44', '16977', '2333'] # [5+4] Brampton (Mixed area)
|
648
|
+
it_splits '441697744888', ['44', '16977', '44888'] # [5+5] Brampton (Mixed area)
|
649
|
+
it_splits '441757850526', ['44', '1757', '850526'] # [4+6] Selby
|
650
|
+
it_splits '441890234567', ['44', '1890', '234567'] # [4+6] Coldstream (ELNS area)
|
651
|
+
it_splits '441890595378', ['44', '1890', '595378'] # [4+6] Ayton (ELNS area)
|
652
|
+
it_splits '441931306526', ['44', '1931', '306526'] # [4+6] Shap
|
653
|
+
it_splits '441946555777', ['44', '1946', '555777'] # [4+6] Whitehaven (Mixed area)
|
654
|
+
it_splits '44194662888', ['44', '1946', '62888'] # [4+5] Whitehaven (Mixed area)
|
655
|
+
it_splits '441946722444', ['44', '19467', '22444'] # [5+5] Gosforth (Mixed area)
|
656
|
+
it_splits '441987705337', ['44', '1987', '705337'] # [4+6] Ebbsfleet
|
657
|
+
it_splits '443005828323', ['44', '300', '582', '8323'] # Non-geographic (NTS)
|
658
|
+
it_splits '443334253344', ['44', '333', '425', '3344'] # Non-geographic (NTS)
|
659
|
+
it_splits '443437658834', ['44', '343', '765', '8834'] # Non-geographic (NTS)
|
660
|
+
it_splits '443452273512', ['44', '345', '227', '3512'] # Non-geographic (NTS)
|
661
|
+
it_splits '443707774444', ['44', '370', '777', '4444'] # Non-geographic (NTS)
|
662
|
+
it_splits '443725247722', ['44', '372', '524', '7722'] # Non-geographic (NTS)
|
663
|
+
it_splits '44500557788', ['44', '500', '557788'] # Freefone (500 + 6)
|
664
|
+
it_splits '445575671113', ['44', '55', '7567', '1113'] # Corporate numbers
|
665
|
+
it_splits '445644775533', ['44', '56', '4477', '5533'] # LIECS/VoIP
|
666
|
+
it_splits '447020229901', ['44', '70', '2022', '9901'] # Personal numbers
|
667
|
+
it_splits '447688554246', ['44', '76', '8855', '4246'] # Pager
|
668
|
+
it_splits '447180605207', ['44', '7180', '605207'] # Mobile
|
669
|
+
it_splits '447480605207', ['44', '7480', '605207'] # Mobile
|
670
|
+
it_splits '447624605207', ['44', '7624', '605207'] # Mobile (Isle of Man)
|
671
|
+
it_splits '447780605207', ['44', '7780', '605207'] # Mobile
|
672
|
+
it_splits '447980605207', ['44', '7980', '605207'] # Mobile
|
673
|
+
it_splits '44800557788', ['44', '800', '557788'] # Freefone (800 + 6)
|
674
|
+
it_splits '448084682355', ['44', '808', '468', '2355'] # Freefone (808 + 7)
|
675
|
+
it_splits '448005878323', ['44', '800', '587', '8323'] # Freefone (800 + 7), regression
|
676
|
+
it_splits '448437777334', ['44', '843', '777', '7334'] # Non-geographic (NTS)
|
677
|
+
it_splits '448457777334', ['44', '845', '777', '7334'] # Non-geographic (NTS)
|
678
|
+
it_splits '448707777334', ['44', '870', '777', '7334'] # Non-geographic (NTS)
|
679
|
+
it_splits '448727777334', ['44', '872', '777', '7334'] # Non-geographic (NTS)
|
680
|
+
it_splits '449052463456', ['44', '905', '246', '3456'] # Non-geographic (PRS)
|
681
|
+
it_splits '449122463456', ['44', '912', '246', '3456'] # Non-geographic (PRS)
|
682
|
+
it_splits '449832463456', ['44', '983', '246', '3456'] # Non-geographic (SES)
|
680
683
|
end
|
681
684
|
describe 'US' do
|
682
|
-
|
685
|
+
it_splits '15551115511', ['1', '555', '111', '5511']
|
683
686
|
end
|
684
687
|
describe 'Venezuela' do
|
685
|
-
|
688
|
+
it_splits '582121234567', ['58', '212', '1234567']
|
686
689
|
end
|
687
690
|
describe 'Vietnam' do
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
+
it_splits '8498123456', ['84', '98', '123456'] # Viettel Mobile
|
692
|
+
it_splits '8499612345', ['84', '996', '12345'] # GTel
|
693
|
+
it_splits '84412345678', ['84', '4', '1234', '5678'] # Hanoi
|
691
694
|
end
|
692
695
|
describe 'Zambia' do
|
693
696
|
it_splits '260977640895', ['260', '97', '7640895'] # mobile
|
694
697
|
it_splits '260211229049', ['260', '211', '229049'] # fixed
|
695
698
|
end
|
696
699
|
describe 'New Zealand' do
|
697
|
-
|
700
|
+
it_splits '6491234567', ['64', '9', '123', '4567']
|
698
701
|
end
|
699
702
|
describe 'Bhutan (Kingdom of)' do
|
700
703
|
it_splits '9759723642', %w(975 9 723 642)
|
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.8.
|
4
|
+
version: 2.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Hanke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-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
|