phonie 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a118a1ed6fff869c95f9c07e3dd336452afb6f9c
4
+ data.tar.gz: f0f068fcf3b14168ac07b1ffbdbd3681fc99f536
5
+ SHA512:
6
+ metadata.gz: 343ea6ed6928dabf15ddc6f9713522af1e42b27a20acc9e172b1315a1773efc80e57abc20baf1cd87432b1effdbd790db66503513ce721422a9fedb9cc0b51ca
7
+ data.tar.gz: 360f1c4e6e3b468ec46a3fe4445cb704ebcd542013f1b375d526421a16256b2411f4d1c29e18c916e5c990f4ebeab2298d19dcb0a43e55981dd01d98bdbc794c
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  *.gem
2
2
  *.swp
3
3
  Gemfile.lock
4
+ *.un~
@@ -109,6 +109,7 @@ Currently tested on:
109
109
  [EC] Ecuador
110
110
  [EE] Estonia
111
111
  [EG] Egypt
112
+ [ES] Spain
112
113
  [ET] Ethiopia
113
114
  [FI] Finland
114
115
  [FR] France
@@ -121,6 +122,7 @@ Currently tested on:
121
122
  [GY] Guyana
122
123
  [HR] Croatia
123
124
  [HU] Hungary
125
+ [IE] Ireland
124
126
  [IL] Israel
125
127
  [IN] India
126
128
  [IR] Iran
@@ -134,6 +136,7 @@ Currently tested on:
134
136
  [NL] Netherlands
135
137
  [NO] Norway
136
138
  [NP] Nepal
139
+ [NZ] New Zealand
137
140
  [PH] Philippines
138
141
  [PK] Pakistan
139
142
  [PT] Portugal
@@ -6,7 +6,7 @@
6
6
  :char_3_code: TO
7
7
  :name: Tonga
8
8
  :international_dialing_prefix: '00'
9
- :area_code: ! '[2-8]\d'
9
+ :area_code: '[2-8]\d'
10
10
  :local_number_format: \d{3}
11
11
  :mobile_format: 8[789]\d{3}
12
12
  :number_format: \d{5}
@@ -20,7 +20,7 @@
20
20
  :area_code: 11|291|3833|297|345|351|37(83|17)|3525|22[13]|3822|2324|299|343|37[25]2|258|241|287|26[14]|26(27|52)|2461|342|285|2756|2293|2965|\d{2,4}
21
21
  :local_number_format: \d{6,8}
22
22
  :mobile_format: 9\d{10}
23
- :number_format: ! '[1-8]\d{9}|9\d{10}'
23
+ :number_format: '[1-8]\d{9}|9\d{10}'
24
24
  '506':
25
25
  :country_code: '506'
26
26
  :national_dialing_prefix: None
@@ -28,7 +28,7 @@
28
28
  :char_3_code: CR
29
29
  :name: Costa Rica
30
30
  :international_dialing_prefix: '00'
31
- :area_code: ! '[28]'
31
+ :area_code: '[28]'
32
32
  :local_number_format: \d{7}
33
33
  :mobile_format: 8\d{7}
34
34
  :number_format: \d{8}
@@ -73,7 +73,7 @@
73
73
  :international_dialing_prefix: '00'
74
74
  :area_code: 2|7|[3-9]\d|8
75
75
  :local_number_format: \d{7,8}
76
- :mobile_format: ! '[78]\d{8}'
76
+ :mobile_format: '[78]\d{8}'
77
77
  :number_format: \d{9}
78
78
  '252':
79
79
  :country_code: '252'
@@ -110,7 +110,7 @@
110
110
  :char_3_code: BO
111
111
  :name: Bolivia
112
112
  :international_dialing_prefix: '00'
113
- :area_code: ! '[1-9]'
113
+ :area_code: '[1-9]'
114
114
  :local_number_format: \d{7}
115
115
  :mobile_format: 7\d{7}
116
116
  :number_format: \d{8}
@@ -223,7 +223,7 @@
223
223
  :international_dialing_prefix: '00'
224
224
  :area_code: \d
225
225
  :local_number_format: \d{7}
226
- :mobile_format: ! '[89]\d{7}'
226
+ :mobile_format: '[89]\d{7}'
227
227
  :number_format: \d{8}
228
228
  '254':
229
229
  :country_code: '254'
@@ -232,7 +232,7 @@
232
232
  :char_3_code: KE
233
233
  :name: Kenya
234
234
  :international_dialing_prefix: '00'
235
- :area_code: ! '[2-9]\d'
235
+ :area_code: '[2-9]\d'
236
236
  :local_number_format: \d{5,7}
237
237
  :mobile_format: 7\d{8}
238
238
  :number_format: \d{7,9}
@@ -450,10 +450,10 @@
450
450
  :char_3_code: LT
451
451
  :name: Lithuania
452
452
  :international_dialing_prefix: '00'
453
- :area_code: ! '[3-9]\d{2}'
453
+ :area_code: '[3-9]\d{2}'
454
454
  :local_number_format: \d{5}
455
455
  :mobile_format: 6\d{7}
456
- :number_format: ! '[3-9]\d{7}'
456
+ :number_format: '[3-9]\d{7}'
457
457
  '993':
458
458
  :country_code: '993'
459
459
  :national_dialing_prefix: '8'
@@ -477,8 +477,8 @@
477
477
  :international_dialing_prefix: '00'
478
478
  :area_code: 800|90\d|2|3|4|9|1[0-69]|5\d|6[013-9]|7[01]|8[1-9]
479
479
  :local_number_format: \d{5,8}
480
- :mobile_format: ! '[4]\d{8}'
481
- :number_format: ! '[4]\d{8}|[1-9]\d{7}'
480
+ :mobile_format: '[4]\d{8}'
481
+ :number_format: '[4]\d{8}|[1-9]\d{7}'
482
482
  '965':
483
483
  :country_code: '965'
484
484
  :national_dialing_prefix: None
@@ -493,10 +493,10 @@
493
493
  :char_3_code: LV
494
494
  :name: Latvia
495
495
  :international_dialing_prefix: '00'
496
- :area_code: ! '[6|2]\d'
496
+ :area_code: '[6|2]\d'
497
497
  :local_number_format: \d{6}
498
498
  :mobile_format: 2\d{7}
499
- :number_format: ! '[2|6]\d{7}'
499
+ :number_format: '[2|6]\d{7}'
500
500
  '682':
501
501
  :country_code: '682'
502
502
  :national_dialing_prefix: '0'
@@ -518,10 +518,10 @@
518
518
  :char_3_code: SA
519
519
  :name: Saudi Arabia
520
520
  :international_dialing_prefix: '00'
521
- :area_code: ! '[1-7]'
521
+ :area_code: '[1-7]'
522
522
  :local_number_format: \d{7,8}
523
523
  :mobile_format: 5\d{8}
524
- :number_format: ! '[1-46-9]\d{7}|5\d{8}'
524
+ :number_format: '[1-46-9]\d{7}|5\d{8}'
525
525
  '683':
526
526
  :country_code: '683'
527
527
  :national_dialing_prefix: None
@@ -543,7 +543,7 @@
543
543
  :char_3_code: AZ
544
544
  :name: Azerbaijan
545
545
  :international_dialing_prefix: '810'
546
- :area_code: ! '[12]\d|40|44|50|51|55|60|70|77'
546
+ :area_code: '[12]\d|40|44|50|51|55|60|70|77'
547
547
  :local_number_format: \d{7}
548
548
  :mobile_format: (40|44|50|51|55|60|70|77)\d{7}
549
549
  :number_format: \d{9}
@@ -572,9 +572,9 @@
572
572
  :char_3_code: AU
573
573
  :name: Australia
574
574
  :international_dialing_prefix: '0011'
575
- :area_code: ! '[234578]'
575
+ :area_code: '[234578]'
576
576
  :local_number_format: \d{8}
577
- :mobile_format: ! '[4]\d{8}'
577
+ :mobile_format: '[4]\d{8}'
578
578
  :number_format: \d{9}
579
579
  '880':
580
580
  :country_code: '880'
@@ -585,7 +585,7 @@
585
585
  :international_dialing_prefix: '00'
586
586
  :area_code: 1\d\d|2|[345789]1|3[2345678]1|40[12]|42[13]|4[3456789]1|4(46|88)|49[68]|5[23456789]1|5[56]2|6[012345689]1|6(28|72)|7[23456789]1|732|8[234567]1|9[23458]1|3028|303[56]|322[34]|342[47]|3529|3823|4027|4031|422[258]|4326|442[24]|4623|4724|5(222|3(27|34))|625[14]|702[23]|7622|8(0(23|32)|424)|852[58]|8(626|723)|9(028|225)|942[34]
587
587
  :local_number_format: \d{3,7}
588
- :mobile_format: ! '[1]\d{7,9}'
588
+ :mobile_format: '[1]\d{7,9}'
589
589
  :number_format: \d{7,10}
590
590
  '967':
591
591
  :country_code: '967'
@@ -615,9 +615,9 @@
615
615
  :char_3_code: FR
616
616
  :name: France
617
617
  :international_dialing_prefix: '00'
618
- :area_code: ! '[1-9]'
618
+ :area_code: '[1-9]'
619
619
  :local_number_format: \d{8}
620
- :mobile_format: ! '[67]\d{8}'
620
+ :mobile_format: '[67]\d{8}'
621
621
  :number_format: \d{9}
622
622
  '995':
623
623
  :country_code: '995'
@@ -626,9 +626,9 @@
626
626
  :char_3_code: GE
627
627
  :name: Georgia
628
628
  :international_dialing_prefix: '810'
629
- :area_code: ! '[57]|32|122|3(15|40|70|68|9[37])|3[134]1|422|\d{2,3}?'
629
+ :area_code: '[57]|32|122|3(15|40|70|68|9[37])|3[134]1|422|\d{2,3}?'
630
630
  :local_number_format: \d{6,7}
631
- :mobile_format: ! '[57]\d{8}'
631
+ :mobile_format: '[57]\d{8}'
632
632
  :number_format: \d{9}
633
633
  '853':
634
634
  :country_code: '853'
@@ -665,6 +665,10 @@
665
665
  :char_3_code: ES
666
666
  :name: Spain
667
667
  :international_dialing_prefix: '00'
668
+ :area_code: '[67]|9[134]|9[2567]\d'
669
+ :local_number_format: '\d{6,8}'
670
+ :mobile_format: '[67]\d{8}'
671
+ :number_format: '\d{9}'
668
672
  '232':
669
673
  :country_code: '232'
670
674
  :national_dialing_prefix: '0'
@@ -689,7 +693,7 @@
689
693
  :area_code: 9\d\d|[3-8]\d|2
690
694
  :local_number_format: \d{7}
691
695
  :mobile_format: 9\d{9}
692
- :number_format: ! '[1-8]\d{8}|9\d{9}'
696
+ :number_format: '[1-8]\d{8}|9\d{9}'
693
697
  '968':
694
698
  :country_code: '968'
695
699
  :national_dialing_prefix: None
@@ -711,9 +715,9 @@
711
715
  :char_3_code: AM
712
716
  :name: Armenia
713
717
  :international_dialing_prefix: '00'
714
- :area_code: ! '[5679]|222|285|286|256|281|232|312|226|253|246|252|249|237|238|244|224|235|245|47|267|236|263|233|231|322|266|265|268|264|234|284|223|287|10|242|262|261|283|255|254|257|269|282'
718
+ :area_code: '[5679]|222|285|286|256|281|232|312|226|253|246|252|249|237|238|244|224|235|245|47|267|236|263|233|231|322|266|265|268|264|234|284|223|287|10|242|262|261|283|255|254|257|269|282'
715
719
  :local_number_format: \d{5,7}
716
- :mobile_format: ! '[5679]\d{7}'
720
+ :mobile_format: '[5679]\d{7}'
717
721
  :number_format: \d{8}
718
722
  '91':
719
723
  :country_code: '91'
@@ -722,9 +726,9 @@
722
726
  :char_3_code: IN
723
727
  :name: India
724
728
  :international_dialing_prefix: '00'
725
- :area_code: ! '[7-9]?\d{3}'
729
+ :area_code: '[7-9]?\d{3}'
726
730
  :local_number_format: \d{6,7}
727
- :mobile_format: ! '[789]\d{9}'
731
+ :mobile_format: '[789]\d{9}'
728
732
  :number_format: \d{10}
729
733
  '92':
730
734
  :country_code: '92'
@@ -736,14 +740,19 @@
736
740
  :area_code: 3\d\d|2[125]|4[01246789]|5[123567]|6[12345678]|7[14]|8[16]|91|2[349]\d|45\d|54\d|60\d|72\d|8[2345]\d|9[23469]\d
737
741
  :local_number_format: \d{6,7}
738
742
  :mobile_format: 3\d{9}
739
- :number_format: ! '[124-9]\d{8}|3\d{9}'
743
+ :number_format: '[124-9]\d{8}|3\d{9}'
740
744
  '64':
741
745
  :country_code: '64'
742
- :national_dialing_prefix: 0 (None fo
743
- :char_2_code: 0 (None fo
746
+ :national_dialing_prefix: 0
747
+ :char_2_code: 0
744
748
  :char_3_code: NZ
745
749
  :name: New Zealand
746
750
  :international_dialing_prefix: '00'
751
+ :area_code:
752
+ - 234679
753
+ :local_number_format: \d{7,9}
754
+ :mobile_format: 2\d{7,9}
755
+ :number_format: \d{8,10}
747
756
  '855':
748
757
  :country_code: '855'
749
758
  :national_dialing_prefix: '0'
@@ -817,7 +826,7 @@
817
826
  :char_3_code: GH
818
827
  :name: Ghana
819
828
  :international_dialing_prefix: '00'
820
- :area_code: ! '[23]\d|54'
829
+ :area_code: '[23]\d|54'
821
830
  :local_number_format: \d{7}
822
831
  :mobile_format: 2\d{8}|54\d{7}
823
832
  :number_format: \d{9}
@@ -908,8 +917,8 @@
908
917
  :international_dialing_prefix: '00'
909
918
  :area_code: 1|[2-9]\d
910
919
  :local_number_format: \d{6,7}
911
- :mobile_format: ! '[237]0\d{7}'
912
- :number_format: ! '[237]0\d{7}|[145689]\d{7}|[237][1-9]\d{6}'
920
+ :mobile_format: '[237]0\d{7}'
921
+ :number_format: '[237]0\d{7}|[145689]\d{7}|[237][1-9]\d{6}'
913
922
  '263':
914
923
  :country_code: '263'
915
924
  :national_dialing_prefix: '0'
@@ -935,7 +944,7 @@
935
944
  :char_3_code: LK
936
945
  :name: Sri Lanka
937
946
  :international_dialing_prefix: '00'
938
- :area_code: ! '[1-689]\d|7'
947
+ :area_code: '[1-689]\d|7'
939
948
  :local_number_format: \d{7,8}
940
949
  :mobile_format: 7\d{8}
941
950
  :number_format: \d{9}
@@ -1082,7 +1091,7 @@
1082
1091
  :international_dialing_prefix: '810'
1083
1092
  :area_code: 9|5|347{3}|482{3}|(?:471|(?:33|81|4?8|4[29])6|(?:42|84|[48])7|(?:87|3)8|(?:89|41)3|(?:39|42|8)4|(?:41|3)5|(?:87|3?4)9|3(?:88|9?0)|8(?:77|11))22|(?:(?:(?:86|40|[38]4|3[89])1|(?:47|81|3[458])3|(?:8[46]|3[89])5|(?:34|48)7|4(?:74|11|[78]2)|8(?:55|44|33)?)6|(?:47|34|81|3?8)55|(?:39|(?:48|81)7|(?:83|49|[34]?8)4|(?:49|84|[48]1)6|(?:[34]8|4[79])3|(?:[38]4|[34]8|3[05])2|(?:35|[38]4|8[36]|4[027]|[34][89])1|[48]11|8(?:18|33))5|(?:833|388|(?:83|4[189])6|(?:81|48|[38]4)7|(?:[38]5|8[346]|4[78]|[34][09])1|(?:81|3)8|(?:34|[34]8|4[179])3|(?:[38]4|4[79]|3[058])2|(?:39|[38]4|8[36]|4[78])5|[48]11|[38])4|(?:(?:34|86?)3|3(?:47|9?5))1|(?:81|[38]4|4[89])66|(?:(?:84|48)6|(?:42|38|[38]4|8[16])3|(?:84|38)5|(?:83|3[89])1|8(?:78|44)|3(?:42|8?4))7|(?:(?:38|84)5|8(?:63|44|[36]1|7))9|(?:83|[34]?8|4[29])44|(?:4965|38)2|3(?:911|4(?:99|77)|8)|8(?:7{3}|4{3}))3|(?:4962|(?:47|3[48]|8[16])55|(?:390|(?:35|[38]4|[34]8|4[179])3|(?:30|[38]4|[34]8|4[79])2|(?:84|4[89])6|(?:3[49]|8[36]|4[178])5|(?:48|81|[38]4)7|(?:30|[38]5|[34]9|[48]2|4[78]|8[346])1|8(?:33|11)?)4|(?:844|(?:[38]4|8[16]|4[27])3|(?:[38]4|4[89])6|(?:34|48)2|(?:83|38)1|(?:38|84)5|4(?:74|8))7|(?:(?:[34]9|4[07]|8[36]|3[58])1|(?:34|48)7|3[0458]2|(?:86|[34]8|4[27]|3[45])3|(?:[34]8|8[13])4|(?:84|49|[48]1)6|8(?:18|44))5|(?:(?:86|[38]4)3|3(?:47|[48]5))1|(?:(?:[34]9|8[13]|4[28])4|(?:[34]9|4[78]|8[23]|3[04])1|(?:47|[34]8|8[13])5|(?:4[7-9]|3[05])2|(?:48|8[46])7|(?:83?|4[19])6|8(?:11|66|18)|3(?:49|90))3|(?:8[36]1|(?:34|86|47)3|3?4|(?:84|38)5|34[27])9|(?:35|4[89])33|(?:83|[34]8|4[29])44|8(?:4{3}|3{3}|5{3})|34(?:77|99))6|(?:4962|(?:833|(?:34|48|8[36])5|(?:[34]9|8[236]|4[78]|[38][45])1|(?:49|84|[48]7|3[58])2|(?:81|[38]4)7|(?:35|[38]4|[34]8|4[1279])3|(?:84|4[18])6|[48]11|3(?:90|88))4|(?:86|38|47|[38]4)55|(?:(?:47|[48]1|8?3|3[48])5|(?:86|30|[34]9|[48]2|4[78])1|(?:8[13]|4[289])4|(?:42|8[16])7|(?:30|84|4[7-9])2|[48]11|(?:83|4[19])6|8(?:79|18|66))3|(?:(?:[34]8|8[346]|3[59])1|(?:47|[38]4|3[58]|8[16])3|(?:84|3[89])5|4(?:82|74|11|9)|8(?:44|33))6|(?:411|(?:86|4[279]|3[458])3|(?:48|8[13])4|(?:[34]9|[38]4|3[58]|4[07]|8[36])1|(?:[34]8|3[45])2|(?:49|81)6|(?:34|81)7|8(?:44|33))5|(?:81|[38]4|4[89])66|(?:42|863?|3(?:47|[89]5))1|(?:4964|(?:34|86)3|3(?:85|4[27]))9|(?:83|[34]8|4[29])44|(?:35|49)33|8(?:5{3}|4{3}|3{3})|3(?:911|499))7|(?:(?:86|[34]8|3[45]|4[279])3|(?:35|[38]4|8[36]|4[02]|[34][89])1|(?:84|[48]1)6|(?:81|48)7|(?:30|48|[38]4)2|(?:81|[34]8)4|8(?:44|33)|4(?:11|8))55|(?:3477|(?:347|(?:[38]4|8[36]|4[07]|3[589])1|(?:86|47|3[48])3|(?:48|34)2|(?:81|49)4|8(?:18|33|11|[14]6))5|(?:(?:[38]5|8[246]|4[78]|3[09])1|(?:86|[34]8|4(?:24|7))3|(?:87|35|[38]4)2|4[89]6|(?:81|34)7|3(?:88|49)|8(?:11|33|[346]5))4|(?:411|347|(?:87|34)2|(?:38|8[46])5|(?:8[36]|3[58])1|(?:86|38|[38]4)3)6|(?:4236|(?:49|81)4|(?:48|3[05]|8[47])2|(?:4[89]|3[04]|8[236])1|(?:81|38)5|8(?:66|18))3|(?:385|(?:83|38)1|(?:47|[38]4|8[16])3|(?:84|49)6)7|(?:86|3[48])55|(?:38|8183)59|(?:855|3(?:[89]5|4[37]))1|8(?:3{3}|7{3}|[14]66)|4(?:833|9(?:62|44)))0|(?:4962|3499|83{3}|(?:347|(?:87|4)9|(?:38|84)5|(?:40|8[346]|3[589])1|(?:47|3?8)4|(?:81|47|[38]4|3[58])3|(?:30|48)2|8(?:33|44))6|(?:390|(?:82|3[459]|4[78])1|(?:8?4|4[7-9]|3[05])2|(?:83|4[19])6|(?:8[13]|4[89])4|(?:83|4[178])5|(?:86|48)7|[48]11|8(?:66|79|18))3|(?:(?:34|48)2|(?:48|[38]4)6|(?:81|[38]4|4[27])3|(?:38|84)5|(?:83|3[89])1|(?:38|47)4|8(?:44|78))7|(?:38|833|411|(?:42|[34]8|8[13])4|(?:86|[34]8|4[279])3|(?:[38]4|[34]9|8[36]|3[58]|4[27])1|(?:49|84|[48]1)6|(?:38|[38]4)2|(?:48|34)7)5|(?:35|4[289])33|(?:47|38|[38]4|8[16])55|(?:855|(?:34|86)3|3(?:47|[89]5))1|(?:81|4[89])66|(?:(?:34|47|86)3|3(?:85|4[27]?)|8(?:44|31))9)4|(?:3477|4962|(?:833|(?:[34]9|[38]4|4[07]|3[58]|8[236])1|(?:87|3)9|(?:35|86|[34]8|4[29])?3|(?:34|48|81)7|(?:49|[34]8|8[13])4|(?:49|84|[48]1)6|[48]11|(?:[34]8|3[05])2)5|(?:(?:34|47|86)3|(?:84|38)5|(?:35|8[36])1|34[27])9|(?:390|(?:86|48|[38]4)7|(?:84|3[05]|4[7-9])2|(?:83|47|34|[48]1|[34]8)5|(?:8[13]|4[289])4|(?:3[05]|4[7-9]|8[26])1|[48]11|(?:49|83)6|8(?:18|66))3|(?:(?:47|[48]2|8[36]|[38][45]|[34][089])1|(?:35|86|[38]4|[34]8|4[179])3|(?:[38]4|3[08]|4[79])2|(?:41|83)6|[48]11|(?:81|48|[38]4)7|(?:47|83|3[49])5|3(?:90|88)|8(?:18|33))4|(?:83|[34]8|4[29])44|(?:411|(?:[38]4|4[27]|3[58]|8[16])3|(?:48|34)7|(?:48|[48]7|3[04])2|(?:40|[38]4|8[36]|3[589])1|(?:47|3)4|(?:84|38)5|8(?:44|79|33)?)6|(?:49|8[14])66|(?:(?:38|[38]4|8[16]|4[27])3|(?:34|48)2|(?:8[35]|3[89])1|(?:38|47)4|3(?:85|46))7|(?:47|38|[38]4|8[13])55|(?:35|4[289])33|8(?:5{3}|7{3}))1|(?:472|(?:474|347|(?:[38]4|3[58]|8[16]|4[27])3|(?:48|3[04])2|(?:[34]8|8[346]|3[59])1|(?:8[46]|3[89])5|8(?:44|33))6|(?:35|4[28])33|(?:833|[48]11|(?:39|[38]4|4[78]|8[36])5|(?:8[236]|4[78]|[34][09]|[38][45])1|(?:[38]4|4[79]|3[058])2|(?:86|35|[34]8|[38]4|4[1279])3|(?:83|4[189])6|(?:81|48|[38]4)7|3(?:90|88))4|(?:390|(?:47|[34]8|8[13]|3[49])5|(?:4[289]|3)4|(?:84|3[05]|4[7-9])2|[48]11|(?:8[46]|4[28])7|(?:30|86|[34]9|[48]2|4[78])1|8(?:79|66|[34]6))3|(?:81|4[28])66|(?:347|(?:34|86|47)3|(?:39|8[36])1|(?:84|38)5|4)9|(?:855|(?:86|34)3|3(?:85|47))1|(?:385|(?:83|3[89])1|(?:47|38)4|(?:[38]4|4[89])6|(?:[38]4|4[27]|8[16])3|(?:48|34)2|8(?:44|78))7|(?:49|83|[34]8)44|3(?:911|4(?:99|77))|8(?:4{3}|3{3}))5|(?:(?:833|(?:47|[48]2|4?8|[38]5|8[346]|[34][09])1|(?:[38]4|3[05]|4[7-9])2|[48]11|(?:39|[38]4|4[178]|8(?:44|[36]))5|(?:86|35|[38]4|4?8|4[17])?3|(?:48|81|3?4)7|(?:81|[34])8|3(?:88|90)|4(?:[189]6|9))4|(?:(?:35|[38]4|3?8|4[27])3|(?:40|[38]?4|3[89]|8[36])1|(?:47|3)4|(?:84|3[89])5|(?:34|48)2|(?:48|34)7|8(?:44|33|48)|4(?:11|9))6|(?:39|(?:35|3?8|[38]4|8[36]|4[079])1|(?:81|[34])8|(?:81|[34]8|4[29]|[38])4|(?:35|86|[34]?8|4[279])3|(?:87|3[0458])2|(?:[48]1|84?)6|[48]11|(?:48|81|3?4)7|8(?:44|33))5|(?:866|390|(?:42|8[146]|[48])7|(?:[48]7|8?4|3[05]|4[89])2|(?:47|8?3|[34]8|[48]1)5|(?:81|4)8|(?:[34]9|8[26]|4[78]|3[04])1|(?:83|4[29])6|(?:87|3?4)9|(?:83|4[289])4|[48]11)3|(?:(?:39|3?8)5|86?3|(?:34|8)7|[48]2|[38]4|[34]?8|[34][09])1|(?:47|3?8|8[146])55|(?:(?:84|38)5|(?:34|86)3|34[27]|8(?:44|[36]1))9|(?:385|844|48|(?:49|[38]4|4?8)6|(?:3?8|8[35])1|(?:4[27]|8[16]|3[48])3|(?:34|48)2|(?:47|3)4)7|(?:83|[34]?8|4[29])44|(?:48|35)33|(?:39|4)11|(?:81|4?8)66|8(?:7{3}|5{3}|20|3{3}|4{3}|[14]8)|34(?:77|99))2|(?:4962|(?:(?:34|81)7|(?:[34]9|3[48]|4[07]|8[36])1|(?:86|[34]8|3[45])3|(?:49|[48]1)6|(?:48|34)2|8(?:44|18|33|34))5|(?:342|(?:84|38)5|(?:38|83)1|4(?:86|74)|8(?:44|78|[146]3))7|(?:83|49|[34]8)44|(?:(?:83|4[89])4|(?:42|8[16])7|(?:48|[34]9|[48]2|8[36]|3[045])1|(?:84|4[7-9]|3[05])2|(?:48|8[13])5|(?:83|4[19])6|[48]11|8(?:79|18|66))3|(?:(?:30|[34]9|[38]5|8[346]|4[78])1|(?:47|84|[34]8)3|(?:[38]4|4[79]|3[05])2|(?:47|8[346])5|(?:84|4[89])6|(?:81|34)7|3(?:49|88)|8(?:33|11))4|(?:(?:[38]4|3[58]|8[16])3|(?:3[589]|8[346])1|(?:84|3[89])5|4(?:74|11)|8(?:44|33)|(?:34|48)[27])6|(?:(?:86|34)3|3(?:85|4[67]))1|(?:48|35)33|(?:38|47|8[46])55|3(?:911|477|(?:85|4[27])9)|8(?:3{3}|166|5{3}))8|(?:833|(?:86|[38]4|4[127-9])3|(?:[34]8|[38]4|4[79]|3[05])2|(?:48|81|[38]4)7|(?:[38]5|8[2-46]|4[78]|[34][09])1|(?:83|4[189])6|(?:[38]4|4[178]|8[36])5|[48]11|3(?:90|88))44|(?:(?:(?:42|86|3[58])3|(?:[38]4|3[589]|8[36]|4[07])1|(?:38|81)4|3[48]2|8(?:33|1[67]))5|(?:(?:34|8[16])7|(?:83|41|[34]8)5|(?:41|8[34])6|(?:82|48|[34]9|3[045])1|(?:48|35|8[47])2|(?:81|8?3|4[89])4|8(?:11|18))3|(?:4[89]6|(?:35|8[146])3|8(?:78|44)|3(?:42|85))7|(?:855|(?:86|34)3|3(?:47|8?5|9))1|(?:388|(?:[48]2|[38]5|4[78]|3[09]|8[36])1|(?:39|48|8[346])5|(?:86|[34]8|4[29]|3[45])3|4[18]6|(?:48|[38]4|3[05])2|8(?:11|55|33|17))4|(?:49|34|81)66|(?:474|833|(?:38|8[146])3|(?:3[589]|8[346])1|3(?:85|4[27]))6|(?:38|47|8[16])55|(?:35|4[289])33|(?:83|49|[34]8)44|8(?:7{3}|3{3}|5{3})|3(?:477|911))9|(?:866|390|(?:[34]9|8[26]|3[045]|4[78])1|(?:4[28]|8[146])7|(?:84|3[05]|4[7-9])2|(?:49|83)6|(?:4[289]|8[13])4|(?:83|47|34|[48]1|[34]8)5|[48]11)33|(?:47|3?8|[38]4|8[16])5{3}|(?:(?:38|8[14]|4[27])3|(?:[34]8|3[45]|8[36])1|3[89]5|(?:47|38?)4|(?:48|30)2|4(?:87|9)|8(?:44|33))66|(?:345|8(?:55|63))11|(?:474|342|844|(?:38|84)5|(?:86|42|[38]4)3|(?:34|4[89])6|(?:38|83)1)77|(?:8[14]|4[289])6{3}|(?:35|4[89])3{3}|(?:83|[34]8|4[29])4{3}|(?:385|4)99|8(?:3{4}|5{4}|4{4}|7{4})
1084
1093
  :local_number_format: \d{5,9}
1085
- :mobile_format: ! '[9|5]\d{9}'
1094
+ :mobile_format: '[9|5]\d{9}'
1086
1095
  :number_format: \d{10}
1087
1096
  '98':
1088
1097
  :country_code: '98'
@@ -1091,7 +1100,7 @@
1091
1100
  :char_3_code: IR
1092
1101
  :name: Iran, Islamic Republic Of
1093
1102
  :international_dialing_prefix: '00'
1094
- :area_code: ! '[2]\d|[3-9]\d\d'
1103
+ :area_code: '[2]\d|[3-9]\d\d'
1095
1104
  :local_number_format: \d{7,8}
1096
1105
  :mobile_format: 9\d{9}
1097
1106
  :number_format: \d{10}
@@ -1102,7 +1111,7 @@
1102
1111
  :char_3_code: IL
1103
1112
  :name: Israel
1104
1113
  :international_dialing_prefix: '00'
1105
- :area_code: ! '[2-46-9]|5\d'
1114
+ :area_code: '[2-46-9]|5\d'
1106
1115
  :local_number_format: \d{7}
1107
1116
  :mobile_format: 5\d{8}
1108
1117
  :number_format: \d{8,9}
@@ -1170,7 +1179,7 @@
1170
1179
  :char_3_code: UA
1171
1180
  :name: Ukraine
1172
1181
  :international_dialing_prefix: '00'
1173
- :area_code: ! '[1-9]\d'
1182
+ :area_code: '[1-9]\d'
1174
1183
  :local_number_format: \d{7}
1175
1184
  :mobile_format: (39|50|6[3678]|9\d)\d{7}
1176
1185
  :number_format: \d{9}
@@ -1231,10 +1240,10 @@
1231
1240
  :char_3_code: RS
1232
1241
  :name: Serbia
1233
1242
  :international_dialing_prefix: '00'
1234
- :area_code: ! '[1-9]\d'
1243
+ :area_code: '[1-9]\d'
1235
1244
  :local_number_format: \d{7}
1236
1245
  :mobile_format: 6\d{7,8}
1237
- :number_format: ! '[1-57-9]\d{6,8}|6\d{7,8}'
1246
+ :number_format: '[1-57-9]\d{6,8}|6\d{7,8}'
1238
1247
  '975':
1239
1248
  :country_code: '975'
1240
1249
  :national_dialing_prefix: None
@@ -1260,6 +1269,10 @@
1260
1269
  :char_3_code: IE
1261
1270
  :name: Ireland
1262
1271
  :international_dialing_prefix: '00'
1272
+ :area_code: 1|2[1-9]|40[24]|4[1-9]|50[45]|5[1-9]|6[1-9]|7[146]|9[013-9]|8[2-9]
1273
+ :local_number_format: \d{4,8}
1274
+ :mobile_format: 8[2-9]\d{7}
1275
+ :number_format: ((8[2-9]|76)\d{7}|\d{7,9})
1263
1276
  '692':
1264
1277
  :country_code: '692'
1265
1278
  :national_dialing_prefix: '1'
@@ -1356,7 +1369,7 @@
1356
1369
  :char_3_code: DZ
1357
1370
  :name: Algeria
1358
1371
  :international_dialing_prefix: '00'
1359
- :area_code: ! '[2-8]\d'
1372
+ :area_code: '[2-8]\d'
1360
1373
  :local_number_format: \d{6,7}
1361
1374
  :mobile_format: (55|6[69]|7[79])\d{7}
1362
1375
  :number_format: (55|6[69]|7[79])\d{7}|\d{8}
@@ -1427,7 +1440,7 @@
1427
1440
  :international_dialing_prefix: '00'
1428
1441
  :area_code: 23|3[378]|6[29]|77|4|5|7|9|\d{1,2}
1429
1442
  :local_number_format: \d{6,7}
1430
- :mobile_format: ! '[49]\d{7}'
1443
+ :mobile_format: '[49]\d{7}'
1431
1444
  :number_format: \d{8}
1432
1445
  '385':
1433
1446
  :country_code: '385'
@@ -1439,7 +1452,7 @@
1439
1452
  :area_code: 1|[2-9]\d
1440
1453
  :local_number_format: \d{6,7}
1441
1454
  :mobile_format: 9\d{8}
1442
- :number_format: ! '[1-8]\d{7,8}|9\d{8}'
1455
+ :number_format: '[1-8]\d{7,8}|9\d{8}'
1443
1456
  '243':
1444
1457
  :country_code: '243'
1445
1458
  :national_dialing_prefix: None
@@ -1503,7 +1516,7 @@
1503
1516
  :international_dialing_prefix: '00'
1504
1517
  :area_code: 6|[0-57-9]\d
1505
1518
  :local_number_format: \d{6,7}
1506
- :mobile_format: ! '[6]\d{7}'
1519
+ :mobile_format: '[6]\d{7}'
1507
1520
  :number_format: \d{8}
1508
1521
  '245':
1509
1522
  :country_code: '245'
@@ -1565,7 +1578,7 @@
1565
1578
  :char_3_code: EG
1566
1579
  :name: Egypt
1567
1580
  :international_dialing_prefix: '00'
1568
- :area_code: ! '[1-3]|[4-9]\d'
1581
+ :area_code: '[1-3]|[4-9]\d'
1569
1582
  :local_number_format: \d{7,9}
1570
1583
  :mobile_format: 1\d{9}
1571
1584
  :number_format: \d{9,10}
@@ -1590,7 +1603,7 @@
1590
1603
  :char_3_code: BZ
1591
1604
  :name: Belize
1592
1605
  :international_dialing_prefix: '00'
1593
- :area_code: ! '[1-9]'
1606
+ :area_code: '[1-9]'
1594
1607
  :local_number_format: \d{6}
1595
1608
  :mobile_format: 6\d{6}
1596
1609
  :number_format: \d{7}
@@ -1610,7 +1623,7 @@
1610
1623
  :international_dialing_prefix: '00'
1611
1624
  :area_code: \d
1612
1625
  :local_number_format: \d{7}
1613
- :mobile_format: ! '[45]\d{7}'
1626
+ :mobile_format: '[45]\d{7}'
1614
1627
  :number_format: \d{8}
1615
1628
  '51':
1616
1629
  :country_code: '51'
@@ -1640,7 +1653,7 @@
1640
1653
  :char_3_code: SV
1641
1654
  :name: El Salvador
1642
1655
  :international_dialing_prefix: '00'
1643
- :area_code: ! '[27]'
1656
+ :area_code: '[27]'
1644
1657
  :local_number_format: \d{7}
1645
1658
  :mobile_format: 7\d{7}
1646
1659
  :number_format: \d{8}
@@ -1,3 +1,3 @@
1
1
  module Phonie
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -0,0 +1,12 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+
3
+ ## Ireland
4
+ class IETest < Phonie::TestCase
5
+ def test_local
6
+ parse_test('+3535041234', '353', '504', '1234', 'Ireland', false)
7
+ end
8
+
9
+ def test_mobile
10
+ parse_test('+353821234567', '353', '82', '1234567', 'Ireland', true)
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+
3
+ ## New Zealand
4
+ class NZTest < Phonie::TestCase
5
+ def test_local
6
+ parse_test('+6431234567', '64', '3', '1234567', 'New Zealand', false)
7
+ end
8
+
9
+ def test_mobile
10
+ parse_test('+6421234567', '64', '2', '1234567', 'New Zealand', true)
11
+ parse_test('+642123456789', '64', '2', '123456789', 'New Zealand', true)
12
+ end
13
+ end
@@ -40,7 +40,7 @@ def create_test_file
40
40
  country_call_code = get_country_call_code
41
41
 
42
42
  File.open(@test_filename, 'w') do |test_file|
43
- test_file.print <<-eof
43
+ test_file.print <<-eof
44
44
  require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
45
45
 
46
46
  ## #{@country}
@@ -55,6 +55,7 @@ class #{@country_code.upcase}Test < Phonie::TestCase
55
55
  end
56
56
  eof
57
57
  end
58
+ puts "Create: #{@test_filename}"
58
59
  end
59
60
 
60
61
  def add_missing_fields
@@ -66,6 +67,8 @@ def add_missing_fields
66
67
  File.open(@data_file, 'w') do |f|
67
68
  f.puts hash.to_yaml
68
69
  end
70
+
71
+ puts "Modified: #{@data_file}"
69
72
  end
70
73
 
71
74
  def update_readme
@@ -92,6 +95,7 @@ def update_readme
92
95
  end
93
96
 
94
97
  FileUtils.mv(new_readme.path, readme.path)
98
+ puts "Modified: #{@readme_file}"
95
99
  end
96
100
 
97
101
  def generate
@@ -104,9 +108,14 @@ end
104
108
 
105
109
  usage if ARGV.length < 1
106
110
 
107
- @country = ARGV[0]
111
+ @country = ARGV.join(' ')
108
112
  @country_code = get_country_code
109
113
 
114
+ if @country_code.nil?
115
+ puts "Could not find a country code for '#{@country}'"
116
+ exit
117
+ end
118
+
110
119
  @test_filename = File.join(File.dirname(__FILE__), '..', 'test', 'countries', "#{@country_code}_test.rb")
111
120
 
112
121
  generate
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phonie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
5
- prerelease:
4
+ version: 1.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tomislav Car
@@ -12,54 +11,48 @@ authors:
12
11
  autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2013-01-29 00:00:00.000000000 Z
14
+ date: 2013-02-26 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: rake
19
18
  requirement: !ruby/object:Gem::Requirement
20
- none: false
21
19
  requirements:
22
- - - ! '>='
20
+ - - '>='
23
21
  - !ruby/object:Gem::Version
24
22
  version: '0'
25
23
  type: :development
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
- - - ! '>='
27
+ - - '>='
31
28
  - !ruby/object:Gem::Version
32
29
  version: '0'
33
30
  - !ruby/object:Gem::Dependency
34
31
  name: nokogiri
35
32
  requirement: !ruby/object:Gem::Requirement
36
- none: false
37
33
  requirements:
38
- - - ! '>='
34
+ - - '>='
39
35
  - !ruby/object:Gem::Version
40
36
  version: '0'
41
37
  type: :development
42
38
  prerelease: false
43
39
  version_requirements: !ruby/object:Gem::Requirement
44
- none: false
45
40
  requirements:
46
- - - ! '>='
41
+ - - '>='
47
42
  - !ruby/object:Gem::Version
48
43
  version: '0'
49
44
  - !ruby/object:Gem::Dependency
50
45
  name: activemodel
51
46
  requirement: !ruby/object:Gem::Requirement
52
- none: false
53
47
  requirements:
54
- - - ! '>='
48
+ - - '>='
55
49
  - !ruby/object:Gem::Version
56
50
  version: '0'
57
51
  type: :development
58
52
  prerelease: false
59
53
  version_requirements: !ruby/object:Gem::Requirement
60
- none: false
61
54
  requirements:
62
- - - ! '>='
55
+ - - '>='
63
56
  - !ruby/object:Gem::Version
64
57
  version: '0'
65
58
  description: Phone number parsing, validation and formatting
@@ -129,6 +122,7 @@ files:
129
122
  - test/countries/gy_test.rb
130
123
  - test/countries/hr_test.rb
131
124
  - test/countries/hu_test.rb
125
+ - test/countries/ie_test.rb
132
126
  - test/countries/il_test.rb
133
127
  - test/countries/in_test.rb
134
128
  - test/countries/ir_test.rb
@@ -142,6 +136,7 @@ files:
142
136
  - test/countries/nl_test.rb
143
137
  - test/countries/no_test.rb
144
138
  - test/countries/np_test.rb
139
+ - test/countries/nz_test.rb
145
140
  - test/countries/ph_test.rb
146
141
  - test/countries/pk_test.rb
147
142
  - test/countries/pt_test.rb
@@ -168,26 +163,102 @@ files:
168
163
  - tools/russian_area_codes.rb
169
164
  homepage: http://github.com/wmoxam/phonie
170
165
  licenses: []
166
+ metadata: {}
171
167
  post_install_message:
172
168
  rdoc_options: []
173
169
  require_paths:
174
170
  - lib
175
171
  required_ruby_version: !ruby/object:Gem::Requirement
176
- none: false
177
172
  requirements:
178
- - - ! '>='
173
+ - - '>='
179
174
  - !ruby/object:Gem::Version
180
175
  version: '0'
181
176
  required_rubygems_version: !ruby/object:Gem::Requirement
182
- none: false
183
177
  requirements:
184
- - - ! '>='
178
+ - - '>='
185
179
  - !ruby/object:Gem::Version
186
180
  version: '0'
187
181
  requirements: []
188
182
  rubyforge_project:
189
- rubygems_version: 1.8.23
183
+ rubygems_version: 2.0.0
190
184
  signing_key:
191
- specification_version: 3
185
+ specification_version: 4
192
186
  summary: Phone number parsing, validation and formatting
193
- test_files: []
187
+ test_files:
188
+ - test/countries/ae_test.rb
189
+ - test/countries/af_test.rb
190
+ - test/countries/al_test.rb
191
+ - test/countries/am_test.rb
192
+ - test/countries/ar_test.rb
193
+ - test/countries/at_test.rb
194
+ - test/countries/au_test.rb
195
+ - test/countries/az_test.rb
196
+ - test/countries/ba_test.rb
197
+ - test/countries/bd_test.rb
198
+ - test/countries/be_test.rb
199
+ - test/countries/bg_test.rb
200
+ - test/countries/bo_test.rb
201
+ - test/countries/br_test.rb
202
+ - test/countries/bs_test.rb
203
+ - test/countries/bt_test.rb
204
+ - test/countries/by_test.rb
205
+ - test/countries/bz_test.rb
206
+ - test/countries/ca_test.rb
207
+ - test/countries/cl_test.rb
208
+ - test/countries/cr_test.rb
209
+ - test/countries/cy_test.rb
210
+ - test/countries/cz_test.rb
211
+ - test/countries/de_test.rb
212
+ - test/countries/dk_test.rb
213
+ - test/countries/dz_test.rb
214
+ - test/countries/ec_test.rb
215
+ - test/countries/ee_test.rb
216
+ - test/countries/eg_test.rb
217
+ - test/countries/et_test.rb
218
+ - test/countries/fi_test.rb
219
+ - test/countries/fr_test.rb
220
+ - test/countries/gb_test.rb
221
+ - test/countries/ge_test.rb
222
+ - test/countries/gh_test.rb
223
+ - test/countries/gr_test.rb
224
+ - test/countries/gt_test.rb
225
+ - test/countries/gu_test.rb
226
+ - test/countries/gy_test.rb
227
+ - test/countries/hr_test.rb
228
+ - test/countries/hu_test.rb
229
+ - test/countries/ie_test.rb
230
+ - test/countries/il_test.rb
231
+ - test/countries/in_test.rb
232
+ - test/countries/ir_test.rb
233
+ - test/countries/it_test.rb
234
+ - test/countries/ke_test.rb
235
+ - test/countries/lk_test.rb
236
+ - test/countries/lt_test.rb
237
+ - test/countries/lu_test.rb
238
+ - test/countries/lv_test.rb
239
+ - test/countries/ng_test.rb
240
+ - test/countries/nl_test.rb
241
+ - test/countries/no_test.rb
242
+ - test/countries/np_test.rb
243
+ - test/countries/nz_test.rb
244
+ - test/countries/ph_test.rb
245
+ - test/countries/pk_test.rb
246
+ - test/countries/pt_test.rb
247
+ - test/countries/qa_test.rb
248
+ - test/countries/rs_test.rb
249
+ - test/countries/ru_test.rb
250
+ - test/countries/sa_test.rb
251
+ - test/countries/se_test.rb
252
+ - test/countries/si_test.rb
253
+ - test/countries/sv_test.rb
254
+ - test/countries/to_test.rb
255
+ - test/countries/ua_test.rb
256
+ - test/countries/us_test.rb
257
+ - test/countries/uy_test.rb
258
+ - test/countries/za_test.rb
259
+ - test/countries/zw_test.rb
260
+ - test/country_test.rb
261
+ - test/extension_test.rb
262
+ - test/phone_test.rb
263
+ - test/railties/validator_test.rb
264
+ - test/test_helper.rb