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
@@ -5,35 +5,35 @@
5
5
 
6
6
  Phony.define do
7
7
  country '263',
8
- trunk('0', normalize: true) |
9
- one_of(%w(2582 2583 5483)) >>
10
- matched_split(/\A\d{6}\z/ => [3,3],
11
- /\A\d+\z/ => [3] ) | # geographic [XXXX] XXX(XXX)
12
- one_of(%w(147 204 205 222 227 228 238 248 2582 2583 271 272 274 276 281 283
13
- 284 286 287 288 289 298 308 317 371 375 376 379 383 387 389 517 518
14
- 557 558 628 637 667 668 687 688 698 848)) >>
15
- matched_split(/\A\d{6}\z/ => [3,3],
16
- /\A\d+\z/ => [3] ) | # geographic [XXX] XXX(XXX)
17
- one_of(%w(270)) >>
18
- matched_split(/\A\d{6}\z/ => [3,3],
19
- /\A\d+\z/ => [3,2] ) | # geographic [XXX] XXXXX(X)
20
- one_of(%w(273 275 277 278 279 282 285)) >>
21
- matched_split(/\A\d{6}\z/ => [3,3],
22
- /\A\d+\z/ => [2,2] ) | # geographic [XXX] XXXX(XX)
23
- one_of(%w(13 14 15 16 17 18 19 21 24 26 29 30 31 32 34 35 36 50 55 57 58 59 60
24
- 63 64 65 66 69)) >>
25
- matched_split(/\A\d{6}\z/ => [3,3],
26
- /\A\d+\z/ => [3] ) | # geographic [XX] XXX(XXX)
27
- one_of(%w(20)) >>
28
- matched_split(/\A\d{6}\z/ => [3,3],
29
- /\A\d+\z/ => [3,2] ) | # geographic [XXX] XXXXX(X)
30
- one_of(%w(25 33 39 51 52 53 54 56 61 62 67 68 )) >>
31
- matched_split(/\A\d{6}\z/ => [3,3],
32
- /\A\d+\z/ => [2,2] ) | # geographic [XXX] XXXX(XX)
33
- one_of(%w(86)) >> split(4,4) | # VoIP telephony
34
- one_of(%w(71 73 77 78)) >> split(3,4) | # mobile
35
- one_of(%w(4 9)) >>
36
- matched_split(/\A\d{6}\z/ => [4,4],
37
- /\A\d+\z/ => [3,2] ) | # geographic [X] XXXXX(XXX)
38
- fixed(2) >> split(3,3)
8
+ trunk('0', normalize: true) |
9
+ one_of(%w[2582 2583 5483]) >>
10
+ matched_split(/\A\d{6}\z/ => [3, 3],
11
+ /\A\d+\z/ => [3]) | # geographic [XXXX] XXX(XXX)
12
+ one_of(%w[147 204 205 222 227 228 238 248 2582 2583 271 272 274 276 281 283
13
+ 284 286 287 288 289 298 308 317 371 375 376 379 383 387 389 517 518
14
+ 557 558 628 637 667 668 687 688 698 848]) >>
15
+ matched_split(/\A\d{6}\z/ => [3, 3],
16
+ /\A\d+\z/ => [3]) | # geographic [XXX] XXX(XXX)
17
+ one_of(%w[270]) >>
18
+ matched_split(/\A\d{6}\z/ => [3, 3],
19
+ /\A\d+\z/ => [3, 2]) | # geographic [XXX] XXXXX(X)
20
+ one_of(%w[273 275 277 278 279 282 285]) >>
21
+ matched_split(/\A\d{6}\z/ => [3, 3],
22
+ /\A\d+\z/ => [2, 2]) | # geographic [XXX] XXXX(XX)
23
+ one_of(%w[13 14 15 16 17 18 19 21 24 26 29 30 31 32 34 35 36 50 55 57 58 59 60
24
+ 63 64 65 66 69]) >>
25
+ matched_split(/\A\d{6}\z/ => [3, 3],
26
+ /\A\d+\z/ => [3]) | # geographic [XX] XXX(XXX)
27
+ one_of(%w[20]) >>
28
+ matched_split(/\A\d{6}\z/ => [3, 3],
29
+ /\A\d+\z/ => [3, 2]) | # geographic [XXX] XXXXX(X)
30
+ one_of(%w[25 33 39 51 52 53 54 56 61 62 67 68]) >>
31
+ matched_split(/\A\d{6}\z/ => [3, 3],
32
+ /\A\d+\z/ => [2, 2]) | # geographic [XXX] XXXX(XX)
33
+ one_of(%w[86]) >> split(4, 4) | # VoIP telephony
34
+ one_of(%w[71 73 77 78]) >> split(3, 4) | # mobile
35
+ one_of(%w[4 9]) >>
36
+ matched_split(/\A\d{6}\z/ => [4, 4],
37
+ /\A\d+\z/ => [3, 2]) | # geographic [X] XXXXX(XXX)
38
+ fixed(2) >> split(3, 3)
39
39
  end