phony 2.20.13 → 2.20.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/phony/config.rb +25 -26
  3. data/lib/phony/countries/argentina.rb +311 -314
  4. data/lib/phony/countries/austria.rb +71 -72
  5. data/lib/phony/countries/bangladesh.rb +27 -28
  6. data/lib/phony/countries/belarus.rb +110 -111
  7. data/lib/phony/countries/brazil.rb +92 -92
  8. data/lib/phony/countries/cambodia.rb +9 -9
  9. data/lib/phony/countries/china.rb +22 -21
  10. data/lib/phony/countries/croatia.rb +6 -5
  11. data/lib/phony/countries/georgia.rb +84 -84
  12. data/lib/phony/countries/germany.rb +4067 -4068
  13. data/lib/phony/countries/guinea.rb +8 -8
  14. data/lib/phony/countries/india.rb +31 -34
  15. data/lib/phony/countries/indonesia.rb +57 -46
  16. data/lib/phony/countries/ireland.rb +4 -5
  17. data/lib/phony/countries/italy.rb +54 -53
  18. data/lib/phony/countries/japan.rb +456 -456
  19. data/lib/phony/countries/kyrgyzstan.rb +109 -109
  20. data/lib/phony/countries/latvia.rb +34 -34
  21. data/lib/phony/countries/libya.rb +106 -106
  22. data/lib/phony/countries/malaysia.rb +12 -12
  23. data/lib/phony/countries/moldova.rb +42 -42
  24. data/lib/phony/countries/montenegro.rb +24 -20
  25. data/lib/phony/countries/myanmar.rb +39 -39
  26. data/lib/phony/countries/namibia.rb +35 -29
  27. data/lib/phony/countries/nepal.rb +60 -62
  28. data/lib/phony/countries/netherlands.rb +13 -13
  29. data/lib/phony/countries/pakistan.rb +135 -111
  30. data/lib/phony/countries/paraguay.rb +135 -135
  31. data/lib/phony/countries/russia_kazakhstan_abkhasia_south_ossetia.rb +125 -128
  32. data/lib/phony/countries/saudi_arabia.rb +5 -5
  33. data/lib/phony/countries/serbia.rb +47 -39
  34. data/lib/phony/countries/somalia.rb +18 -18
  35. data/lib/phony/countries/south_korea.rb +16 -13
  36. data/lib/phony/countries/sweden.rb +28 -28
  37. data/lib/phony/countries/taiwan.rb +20 -19
  38. data/lib/phony/countries/tajikistan.rb +70 -70
  39. data/lib/phony/countries/turkmenistan.rb +65 -65
  40. data/lib/phony/countries/ukraine.rb +607 -607
  41. data/lib/phony/countries/united_kingdom.rb +66 -66
  42. data/lib/phony/countries/uruguay.rb +40 -41
  43. data/lib/phony/countries/vietnam.rb +18 -17
  44. data/lib/phony/countries/zimbabwe.rb +31 -31
  45. data/lib/phony/countries.rb +440 -443
  46. data/lib/phony/country.rb +42 -44
  47. data/lib/phony/country_codes.rb +61 -60
  48. data/lib/phony/dsl.rb +23 -26
  49. data/lib/phony/local_splitters/fixed.rb +20 -29
  50. data/lib/phony/local_splitters/regex.rb +28 -31
  51. data/lib/phony/national_code.rb +7 -10
  52. data/lib/phony/national_splitters/default.rb +9 -11
  53. data/lib/phony/national_splitters/dsl.rb +8 -18
  54. data/lib/phony/national_splitters/fixed.rb +11 -14
  55. data/lib/phony/national_splitters/none.rb +7 -11
  56. data/lib/phony/national_splitters/regex.rb +13 -17
  57. data/lib/phony/national_splitters/variable.rb +36 -38
  58. data/lib/phony/trunk_code.rb +16 -18
  59. data/lib/phony/vanity.rb +12 -13
  60. data/lib/phony.rb +84 -84
  61. metadata +5 -39
  62. data/spec/functional/config_spec.rb +0 -44
  63. data/spec/functional/plausibility_spec.rb +0 -689
  64. data/spec/lib/phony/countries_spec.rb +0 -1459
  65. data/spec/lib/phony/country_codes_spec.rb +0 -227
  66. data/spec/lib/phony/country_spec.rb +0 -104
  67. data/spec/lib/phony/dsl_spec.rb +0 -28
  68. data/spec/lib/phony/local_splitters/fixed_spec.rb +0 -56
  69. data/spec/lib/phony/local_splitters/regex_spec.rb +0 -94
  70. data/spec/lib/phony/national_code_spec.rb +0 -61
  71. data/spec/lib/phony/national_splitters/default_spec.rb +0 -34
  72. data/spec/lib/phony/national_splitters/fixed_spec.rb +0 -45
  73. data/spec/lib/phony/national_splitters/none_spec.rb +0 -28
  74. data/spec/lib/phony/national_splitters/regex_spec.rb +0 -23
  75. data/spec/lib/phony/national_splitters/variable_spec.rb +0 -35
  76. data/spec/lib/phony/trunk_code_spec.rb +0 -85
  77. data/spec/lib/phony/vanity_spec.rb +0 -30
  78. data/spec/lib/phony_spec.rb +0 -70
@@ -4,85 +4,84 @@
4
4
  #
5
5
  ndcs = [
6
6
  # '1', # Vienna
7
- '89', # Routing Number
8
- '316', # Graz
9
- '463', # Klagenfurt
10
- '512', # Innsbruck
11
- '662', # Salzburg
12
- '732' # Linz
7
+ '89', # Routing Number
8
+ '316', # Graz
9
+ '463', # Klagenfurt
10
+ '512', # Innsbruck
11
+ '662', # Salzburg
12
+ '732' # Linz
13
13
  ]
14
14
 
15
- corporate_2digit = [
16
- '57',
17
- '59'
15
+ corporate_2digit = %w[
16
+ 57
17
+ 59
18
18
  ]
19
19
 
20
- corporate = [
21
- '501',
22
- '502',
23
- '503',
24
- '504',
25
- '505',
26
- '506',
27
- '507',
28
- '508',
29
- '509',
30
- '517'
20
+ corporate = %w[
21
+ 501
22
+ 502
23
+ 503
24
+ 504
25
+ 505
26
+ 506
27
+ 507
28
+ 508
29
+ 509
30
+ 517
31
31
  ]
32
32
 
33
- mobile = [
34
- '644',
35
- '650',
36
- '651',
37
- '652',
38
- '653',
39
- '655',
40
- '657',
41
- '659',
42
- '660',
43
- '661',
44
- '664',
45
- '665',
46
- '666',
47
- '667',
48
- '668',
49
- '669',
50
- '670',
51
- '676',
52
- '677',
53
- '678',
54
- '680',
55
- '681',
56
- '688',
57
- '690',
58
- '699',
33
+ mobile = %w[
34
+ 644
35
+ 650
36
+ 651
37
+ 652
38
+ 653
39
+ 655
40
+ 657
41
+ 659
42
+ 660
43
+ 661
44
+ 664
45
+ 665
46
+ 666
47
+ 667
48
+ 668
49
+ 669
50
+ 670
51
+ 676
52
+ 677
53
+ 678
54
+ 680
55
+ 681
56
+ 688
57
+ 690
58
+ 699
59
59
  ]
60
60
 
61
- mobile_2digit = [
62
- '67',
63
- '68',
64
- '69',
61
+ mobile_2digit = %w[
62
+ 67
63
+ 68
64
+ 69
65
65
  ]
66
66
 
67
-
68
- service = [
69
- '710',
70
- '711',
71
- '718',
72
- '730',
73
- '740',
74
- '780',
75
- '802',
76
- '804',
77
- '810',
78
- '820',
79
- '821',
80
- '828',
81
- '900',
82
- '901',
83
- '930',
84
- '931',
85
- '939'
67
+ service = %w[
68
+ 710
69
+ 711
70
+ 718
71
+ 730
72
+ 740
73
+ 780
74
+ 802
75
+ 804
76
+ 810
77
+ 820
78
+ 821
79
+ 828
80
+ 900
81
+ 901
82
+ 930
83
+ 931
84
+ 939
86
85
  ]
87
86
 
88
87
  # https://www.rtr.at/en/tk/E129/Austrian_Numbering_Plan_2011-03-30.pdf
@@ -99,7 +98,7 @@ Phony.define do
99
98
  one_of(corporate) >> split(2..10) | # Corporate number length is 5..13
100
99
  one_of(ndcs) >> split(5..10) |
101
100
  one_of('663') >> split(6..8) | # 6..8 digit mobile.
102
- one_of(mobile) >> split(4,3..9) |
103
- one_of(mobile_2digit) >> split(7..7) | # Separate as mobile contains 676 - 67 violates the prefix rule.
104
- fixed(4) >> split(3..9) # Number length is 7..13.
101
+ one_of(mobile) >> split(4, 3..9) |
102
+ one_of(mobile_2digit) >> split(7..7) | # Separate as mobile contains 676 - 67 violates the prefix rule.
103
+ fixed(4) >> split(3..9) # Number length is 7..13.
105
104
  end
@@ -3,38 +3,38 @@
3
3
  # Bangladesh (People's Republic of)
4
4
  # https://www.numberingplans.com
5
5
 
6
- ndcs_with_3_subscriber_numbers = %w(
7
- 3035 3036 3224 3424 3427 3529 3823 4027 4222 4225 4425 4525 4623 4653 4658
8
- 5222 5323 5327 5526 6257 7022 7622 8023 8032 8332 8424 8528 8626 9423 9424
9
- )
6
+ ndcs_with_3_subscriber_numbers = %w[
7
+ 3035 3036 3224 3424 3427 3529 3823 4027 4222 4225 4425 4525 4623 4653 4658
8
+ 5222 5323 5327 5526 6257 7022 7622 8023 8032 8332 8424 8528 8626 9423 9424
9
+ ]
10
10
 
11
- ndcs_with_4_subscriber_numbers = %w(
12
- 3020 3022 3023 3024 3025 3026 3027 3028 3029 3032 3033 3034 3035 3036 3221 3222 3223 3225
13
- 3322 3323 3324 3325 3326 3422 3824 4020 4029 4222 4223 4224 4225 4226 4227 4228
14
- 4320 4322 4323 4324 4325 4326 4327 4328 4329 4523 4653 4654 4655 4657 4624 4626 4627
15
- 4953 6024 6622 6655 7323 7324 7325 7327 7328 7522 7523 7524 7525 7526 7527 7528 7529
16
- 8020 8022 8023 8024 8025 8026 8027 8028 8029 8032 8033 8424 8425 8426 8427 8522 8523 8524 8525 8526 8527
17
- )
11
+ ndcs_with_4_subscriber_numbers = %w[
12
+ 3020 3022 3023 3024 3025 3026 3027 3028 3029 3032 3033 3034 3035 3036 3221 3222 3223 3225
13
+ 3322 3323 3324 3325 3326 3422 3824 4020 4029 4222 4223 4224 4225 4226 4227 4228
14
+ 4320 4322 4323 4324 4325 4326 4327 4328 4329 4523 4653 4654 4655 4657 4624 4626 4627
15
+ 4953 6024 6622 6655 7323 7324 7325 7327 7328 7522 7523 7524 7525 7526 7527 7528 7529
16
+ 8020 8022 8023 8024 8025 8026 8027 8028 8029 8032 8033 8424 8425 8426 8427 8522 8523 8524 8525 8526 8527
17
+ ]
18
18
 
19
19
  ndcs_with_5_subscriber_numbers = {
20
- 2 => %w(51 71 81 91),
21
- 3 => %w(321 331 341 351 361 371 381 441 448 421 451 461 471 481 491 468
22
- 488 498 521 531 541 551 561 571 581 591 628 601 631 641 651 661 668
23
- 691 731 741 751 761 771 781 791 831 841 851 861 871 921 931 941 951 981),
24
- 4 => %w(3023 3024 3028 3223 3225 3324 3422 3425 3822
25
- 4033 4226 4227 4322 4323 4326 4327 4328 4422 4423 4424 4426 4455 4624 4625 4626 4655 4656 4657 4823 4854 4922 4924 4925 4953
26
- 5020 5023 5024 5028 5029 5224 5225 5227 5323 5325 5326 5329 5424 5426 5526 5653 5724 5826
27
- 6023 6024 6222 6224 6225 6253 6254 6255 6323 6324 6327 6328 6423 6424 6524 6527 6623 6624 6652 6653 6654 6655
28
- 6722 6723 6724 6725 6822 6823 6824 6825 6922 6923 6924 6925 6926
29
- 7225 7227 7228 7229 7324 7326 7327 7329 7425 7426 7522 7525 7526 7528 7529 7724 7823 7825 7923
30
- 8020 8022 8026 8029 8220 8222 8223 8224 8225 8226 8227 8229 8232 8325 8327 8328 8425 8426 8427 8522 8523 8524
31
- 8622 8623 8624 8625 8626 8723 8725 8727
32
- 9020 9022 9024 9025 9027 9028 9032 9033 9222 9223 9225 9226 9227 9228 9229 9232 9233 9424 9426 9428 9524 9525 9528 9529 9824 9827)
20
+ 2 => %w[51 71 81 91],
21
+ 3 => %w[321 331 341 351 361 371 381 441 448 421 451 461 471 481 491 468
22
+ 488 498 521 531 541 551 561 571 581 591 628 601 631 641 651 661 668
23
+ 691 731 741 751 761 771 781 791 831 841 851 861 871 921 931 941 951 981],
24
+ 4 => %w[3023 3024 3028 3223 3225 3324 3422 3425 3822
25
+ 4033 4226 4227 4322 4323 4326 4327 4328 4422 4423 4424 4426 4455 4624 4625 4626 4655 4656 4657 4823 4854 4922 4924 4925 4953
26
+ 5020 5023 5024 5028 5029 5224 5225 5227 5323 5325 5326 5329 5424 5426 5526 5653 5724 5826
27
+ 6023 6024 6222 6224 6225 6253 6254 6255 6323 6324 6327 6328 6423 6424 6524 6527 6623 6624 6652 6653 6654 6655
28
+ 6722 6723 6724 6725 6822 6823 6824 6825 6922 6923 6924 6925 6926
29
+ 7225 7227 7228 7229 7324 7326 7327 7329 7425 7426 7522 7525 7526 7528 7529 7724 7823 7825 7923
30
+ 8020 8022 8026 8029 8220 8222 8223 8224 8225 8226 8227 8229 8232 8325 8327 8328 8425 8426 8427 8522 8523 8524
31
+ 8622 8623 8624 8625 8626 8723 8725 8727
32
+ 9020 9022 9024 9025 9027 9028 9032 9033 9222 9223 9225 9226 9227 9228 9229 9232 9233 9424 9426 9428 9524 9525 9528 9529 9824 9827]
33
33
  }
34
34
 
35
- ndcs_with_6_subscriber_numbers = {2 => %w(31 41), 3 => %w(721 821)}
35
+ ndcs_with_6_subscriber_numbers = {2 => %w[31 41], 3 => %w[721 821]}
36
36
 
37
- ndcs_with_7_subscriber_numbers = {1 => %w(2), 3 => %w(431)}
37
+ ndcs_with_7_subscriber_numbers = {1 => %w[2], 3 => %w[431]}
38
38
 
39
39
  Phony.define do
40
40
  country '880',
@@ -42,7 +42,6 @@ Phony.define do
42
42
  match(/\A(#{ndcs_with_3_subscriber_numbers.join('|')})\d{3}\z/) >> split(3) |
43
43
  match(/\A(#{ndcs_with_4_subscriber_numbers.join('|')})\d{4}\z/) >> split(4) |
44
44
  match(/\A(#{ndcs_with_5_subscriber_numbers[4].join('|')})\d{5}\z/) >> split(5) |
45
- #
46
45
  one_of(ndcs_with_3_subscriber_numbers) >> split(3) |
47
46
  one_of(ndcs_with_4_subscriber_numbers) >> split(4) |
48
47
  one_of(ndcs_with_5_subscriber_numbers[2]) >> split(5) |
@@ -54,4 +53,4 @@ Phony.define do
54
53
  one_of(ndcs_with_7_subscriber_numbers[3]) >> split(7) |
55
54
  # match(/\A(1[15-9])\d{8}\z/) >> split(8) # mobile
56
55
  fixed(2) >> split(8) # mobile
57
- end
56
+ end
@@ -4,115 +4,115 @@
4
4
  # http://www.eng.beltelecom.by/en/subscribers/phone-codes
5
5
  # https://www.numberingplans.com
6
6
 
7
- ndcs_with_5_subscriber_digits = %w(
8
- 1511
9
- 1512
10
- 1513
11
- 1514
12
- 1515
13
- 1562
14
- 1563
15
- 1564
16
- 1591
17
- 1592
18
- 1593
19
- 1594
20
- 1595
21
- 1596
22
- 1597
23
- 1631
24
- 1632
25
- 1633
26
- 1641
27
- 1642
28
- 1643
29
- 1644
30
- 1645
31
- 1646
32
- 1647
33
- 1651
34
- 1652
35
- 1655
36
- 1713
37
- 1714
38
- 1715
39
- 1716
40
- 1717
41
- 1718
42
- 1719
43
- 1770
44
- 1771
45
- 1772
46
- 1774
47
- 1775
48
- 1776
49
- 1792
50
- 1793
51
- 1794
52
- 1795
53
- 1796
54
- 1797
55
- 2130
56
- 2131
57
- 2132
58
- 2133
59
- 2135
60
- 2136
61
- 2137
62
- 2138
63
- 2139
64
- 2151
65
- 2152
66
- 2153
67
- 2154
68
- 2155
69
- 2156
70
- 2157
71
- 2158
72
- 2159
73
- 2230
74
- 2231
75
- 2232
76
- 2233
77
- 2234
78
- 2235
79
- 2236
80
- 2237
81
- 2238
82
- 2239
83
- 2240
84
- 2241
85
- 2242
86
- 2243
87
- 2244
88
- 2245
89
- 2246
90
- 2247
91
- 2248
92
- 2330
93
- 2332
94
- 2333
95
- 2334
96
- 2336
97
- 2337
98
- 2339
99
- 2340
100
- 2342
101
- 2344
102
- 2345
103
- 2346
104
- 2347
105
- 2350
106
- 2353
107
- 2354
108
- 2355
109
- 2356
110
- 2357
111
- )
7
+ ndcs_with_5_subscriber_digits = %w[
8
+ 1511
9
+ 1512
10
+ 1513
11
+ 1514
12
+ 1515
13
+ 1562
14
+ 1563
15
+ 1564
16
+ 1591
17
+ 1592
18
+ 1593
19
+ 1594
20
+ 1595
21
+ 1596
22
+ 1597
23
+ 1631
24
+ 1632
25
+ 1633
26
+ 1641
27
+ 1642
28
+ 1643
29
+ 1644
30
+ 1645
31
+ 1646
32
+ 1647
33
+ 1651
34
+ 1652
35
+ 1655
36
+ 1713
37
+ 1714
38
+ 1715
39
+ 1716
40
+ 1717
41
+ 1718
42
+ 1719
43
+ 1770
44
+ 1771
45
+ 1772
46
+ 1774
47
+ 1775
48
+ 1776
49
+ 1792
50
+ 1793
51
+ 1794
52
+ 1795
53
+ 1796
54
+ 1797
55
+ 2130
56
+ 2131
57
+ 2132
58
+ 2133
59
+ 2135
60
+ 2136
61
+ 2137
62
+ 2138
63
+ 2139
64
+ 2151
65
+ 2152
66
+ 2153
67
+ 2154
68
+ 2155
69
+ 2156
70
+ 2157
71
+ 2158
72
+ 2159
73
+ 2230
74
+ 2231
75
+ 2232
76
+ 2233
77
+ 2234
78
+ 2235
79
+ 2236
80
+ 2237
81
+ 2238
82
+ 2239
83
+ 2240
84
+ 2241
85
+ 2242
86
+ 2243
87
+ 2244
88
+ 2245
89
+ 2246
90
+ 2247
91
+ 2248
92
+ 2330
93
+ 2332
94
+ 2333
95
+ 2334
96
+ 2336
97
+ 2337
98
+ 2339
99
+ 2340
100
+ 2342
101
+ 2344
102
+ 2345
103
+ 2346
104
+ 2347
105
+ 2350
106
+ 2353
107
+ 2354
108
+ 2355
109
+ 2356
110
+ 2357
111
+ ]
112
112
 
113
- ndcs_with_6_subscriber_digits = %w(152 154 162 163 165 174 176 177 212 214 216 222 225 232 236 602)
113
+ ndcs_with_6_subscriber_digits = %w[152 154 162 163 165 174 176 177 212 214 216 222 225 232 236 602]
114
114
 
115
- ndcs_with_7_subscriber_digits = %w(17 25 29 33 44)
115
+ ndcs_with_7_subscriber_digits = %w[17 25 29 33 44]
116
116
 
117
117
  Phony.define do
118
118
  country '375',
@@ -121,13 +121,12 @@ Phony.define do
121
121
  one_of(ndcs_with_6_subscriber_digits) >> split(6) |
122
122
  one_of(ndcs_with_7_subscriber_digits) >> split(7) |
123
123
  # not available from abroad
124
- one_of(%w(600)) >> split(3) |
125
- one_of(%w(606 777 801 803 805 810 902)) >> split(7) |
126
- one_of(%w(820)) >> split(8) |
124
+ one_of(%w[600]) >> split(3) |
125
+ one_of(%w[606 777 801 803 805 810 902]) >> split(7) |
126
+ one_of(%w[820]) >> split(8) |
127
127
  # Non-geographic number - Home country direct service
128
128
  # Assigned to Beltelecom - not available from abroad
129
129
  match(/\A(800)\d{3}\z/) >> split(3) |
130
130
  match(/\A(800)\d{4}\z/) >> split(4) |
131
131
  match(/\A(800)\d{7}\z/) >> split(7)
132
132
  end
133
-
@@ -6,102 +6,102 @@
6
6
  # NDC Reference
7
7
  # https://www.gov.br/anatel/pt-br/regulado/numeracao/plano-de-numeracao-brasileiro
8
8
 
9
- # 11 #Sao Paulo
10
- # 12 #Sao Paulo
11
- # 13 #Sao Paulo
12
- # 14 #Sao Paulo
13
- # 15 #Sao Paulo
14
- # 16 #Sao Paulo
15
- # 17 #Sao Paulo
16
- # 18 #Sao Paulo
17
- # 19 #Sao Paulo
18
- #
19
- # 21 #Rio de Janeiro
20
- # 22 #Rio de Janeiro
21
- #
22
- # 24 #Rio de Janeiro
23
- #
24
- # 27 #Espírito Santo
25
- # 28 #Espírito Santo
26
- #
27
- # 31 #Minas Gerais
28
- # 32 #Minas Gerais
29
- # 33 #Minas Gerais
30
- # 34 #Minas Gerais
31
- # 35 #Minas Gerais
32
- # 36 #Minas Gerais
33
- # 37 #Minas Gerais
34
- # 38 #Minas Gerais
35
- #
36
- # 41 #Paraná
37
- # 42 #Paraná
38
- # 43 #Paraná
39
- # 44 #Paraná
40
- # 45 #Paraná
41
- # 46 #Paraná
42
- # 47 #Santa Catarina
43
- # 48 #Santa Catarina
44
- # 49 #Santa Catarina
45
- #
46
- # 51 #Rio Grande do Sul
47
- # 52 #Rio Grande do Sul
48
- # 53 #Rio Grande do Sul
49
- # 54 #Rio Grande do Sul
50
- # 55 #Rio Grande do Sul
51
- #
52
- # 61 #Distrito Federal
53
- # 62 #Goiânia
54
- # 63 #Tocantins
55
- # 64 #Goiânia
56
- # 65 #Mato Grosso
57
- # 66 #Mato Grosso
58
- # 67 #Mato Grosso do Sul
59
- # 68 #Acre
60
- # 69 #Rondônia
61
- #
62
- # 71 #Bahia
63
- # 72 #Bahia
64
- # 73 #Bahia
65
- # 74 #Bahia
66
- # 75 #Bahia
67
- #
68
- # 77 #Bahia
69
- # 78 #Bahia
70
- # 79 #Sergipe
71
- #
72
- # 81 #Pernambuco
73
- # 82 #Alagoas
74
- # 83 #Paraíba
75
- # 84 #Rio Grande do Norte
76
- # 85 #Ceará
77
- # 86 #Piauí
78
- # 87 #Pernambuco
79
- # 88 #Ceará
80
- # 89 #Piauí
81
- #
82
- # 91 #Pará
83
- # 92 #Amazonas
84
- # 93 #Pará
85
- # 94 #Pará
86
- # 95 #Roraima
87
- # 96 #Amapá
88
- # 97 #Amazonas
89
- # 98 #Maranhão
90
- # 99 #Maranhão
9
+ # 11 #Sao Paulo
10
+ # 12 #Sao Paulo
11
+ # 13 #Sao Paulo
12
+ # 14 #Sao Paulo
13
+ # 15 #Sao Paulo
14
+ # 16 #Sao Paulo
15
+ # 17 #Sao Paulo
16
+ # 18 #Sao Paulo
17
+ # 19 #Sao Paulo
18
+ #
19
+ # 21 #Rio de Janeiro
20
+ # 22 #Rio de Janeiro
21
+ #
22
+ # 24 #Rio de Janeiro
23
+ #
24
+ # 27 #Espírito Santo
25
+ # 28 #Espírito Santo
26
+ #
27
+ # 31 #Minas Gerais
28
+ # 32 #Minas Gerais
29
+ # 33 #Minas Gerais
30
+ # 34 #Minas Gerais
31
+ # 35 #Minas Gerais
32
+ # 36 #Minas Gerais
33
+ # 37 #Minas Gerais
34
+ # 38 #Minas Gerais
35
+ #
36
+ # 41 #Paraná
37
+ # 42 #Paraná
38
+ # 43 #Paraná
39
+ # 44 #Paraná
40
+ # 45 #Paraná
41
+ # 46 #Paraná
42
+ # 47 #Santa Catarina
43
+ # 48 #Santa Catarina
44
+ # 49 #Santa Catarina
45
+ #
46
+ # 51 #Rio Grande do Sul
47
+ # 52 #Rio Grande do Sul
48
+ # 53 #Rio Grande do Sul
49
+ # 54 #Rio Grande do Sul
50
+ # 55 #Rio Grande do Sul
51
+ #
52
+ # 61 #Distrito Federal
53
+ # 62 #Goiânia
54
+ # 63 #Tocantins
55
+ # 64 #Goiânia
56
+ # 65 #Mato Grosso
57
+ # 66 #Mato Grosso
58
+ # 67 #Mato Grosso do Sul
59
+ # 68 #Acre
60
+ # 69 #Rondônia
61
+ #
62
+ # 71 #Bahia
63
+ # 72 #Bahia
64
+ # 73 #Bahia
65
+ # 74 #Bahia
66
+ # 75 #Bahia
67
+ #
68
+ # 77 #Bahia
69
+ # 78 #Bahia
70
+ # 79 #Sergipe
71
+ #
72
+ # 81 #Pernambuco
73
+ # 82 #Alagoas
74
+ # 83 #Paraíba
75
+ # 84 #Rio Grande do Norte
76
+ # 85 #Ceará
77
+ # 86 #Piauí
78
+ # 87 #Pernambuco
79
+ # 88 #Ceará
80
+ # 89 #Piauí
81
+ #
82
+ # 91 #Pará
83
+ # 92 #Amazonas
84
+ # 93 #Pará
85
+ # 94 #Pará
86
+ # 95 #Roraima
87
+ # 96 #Amapá
88
+ # 97 #Amazonas
89
+ # 98 #Maranhão
90
+ # 99 #Maranhão
91
91
 
92
- ndcs = "(11|12|13|14|15|16|17|18|19|21|22|24|27|28|31|32|33|34|35|36|37|38|41|42|43|44|45|46|47|48|49|51|52|53|54|55|61|62|63|64|65|66|67|68|69|71|72|73|74|75|77|78|79|81|82|83|84|85|86|87|88|89|91|92|93|94|95|96|97|98|99)"
92
+ ndcs = '(11|12|13|14|15|16|17|18|19|21|22|24|27|28|31|32|33|34|35|36|37|38|41|42|43|44|45|46|47|48|49|51|52|53|54|55|61|62|63|64|65|66|67|68|69|71|72|73|74|75|77|78|79|81|82|83|84|85|86|87|88|89|91|92|93|94|95|96|97|98|99)'
93
93
 
94
- service = %w{ 100 128 190 191 192 193 194 197 198 199 } # State specific numbers were not added. See http://www.brasil.gov.br/navegue_por/aplicativos/agenda
94
+ service = %w[100 128 190 191 192 193 194 197 198 199] # State specific numbers were not added. See http://www.brasil.gov.br/navegue_por/aplicativos/agenda
95
95
 
96
- special_numbers_3_4 = %w{ 0800 }
97
- special_numbers_4 = %w{ 3003 4003 4004 4020 }
96
+ special_numbers_3_4 = %w[0800]
97
+ special_numbers_4 = %w[3003 4003 4004 4020]
98
98
 
99
99
  Phony.define do
100
100
  country '55',
101
- match(/^#{ndcs}9\d{8}$/) >> split(5,4) |
102
- match(/^#{ndcs}[2-5]\d{7}$/) >> split(4,4) |
103
- one_of(special_numbers_3_4) >> split(3,4) |
104
- one_of(special_numbers_4) >> split(4) |
105
- one_of(service) >> split(3) |
106
- fixed(3) >> split(3)
101
+ match(/^#{ndcs}9\d{8}$/) >> split(5, 4) |
102
+ match(/^#{ndcs}[2-5]\d{7}$/) >> split(4, 4) |
103
+ one_of(special_numbers_3_4) >> split(3, 4) |
104
+ one_of(special_numbers_4) >> split(4) |
105
+ one_of(service) >> split(3) |
106
+ fixed(3) >> split(3)
107
107
  end