phony 2.20.13 → 2.20.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phony/config.rb +25 -26
- data/lib/phony/countries/argentina.rb +311 -314
- data/lib/phony/countries/austria.rb +71 -72
- data/lib/phony/countries/bangladesh.rb +27 -28
- data/lib/phony/countries/belarus.rb +110 -111
- data/lib/phony/countries/brazil.rb +92 -92
- data/lib/phony/countries/cambodia.rb +9 -9
- data/lib/phony/countries/china.rb +22 -21
- data/lib/phony/countries/croatia.rb +6 -5
- data/lib/phony/countries/georgia.rb +84 -84
- data/lib/phony/countries/germany.rb +4067 -4068
- data/lib/phony/countries/guinea.rb +8 -8
- data/lib/phony/countries/india.rb +31 -34
- data/lib/phony/countries/indonesia.rb +57 -46
- data/lib/phony/countries/ireland.rb +4 -5
- data/lib/phony/countries/italy.rb +54 -53
- data/lib/phony/countries/japan.rb +456 -456
- data/lib/phony/countries/kyrgyzstan.rb +109 -109
- data/lib/phony/countries/latvia.rb +34 -34
- data/lib/phony/countries/libya.rb +106 -106
- data/lib/phony/countries/malaysia.rb +12 -12
- data/lib/phony/countries/moldova.rb +42 -42
- data/lib/phony/countries/montenegro.rb +24 -20
- data/lib/phony/countries/myanmar.rb +39 -39
- data/lib/phony/countries/namibia.rb +35 -29
- data/lib/phony/countries/nepal.rb +60 -62
- data/lib/phony/countries/netherlands.rb +13 -13
- data/lib/phony/countries/pakistan.rb +135 -111
- data/lib/phony/countries/paraguay.rb +135 -135
- data/lib/phony/countries/russia_kazakhstan_abkhasia_south_ossetia.rb +125 -128
- data/lib/phony/countries/saudi_arabia.rb +5 -5
- data/lib/phony/countries/serbia.rb +47 -39
- data/lib/phony/countries/somalia.rb +18 -18
- data/lib/phony/countries/south_korea.rb +16 -13
- data/lib/phony/countries/sweden.rb +28 -28
- data/lib/phony/countries/taiwan.rb +20 -19
- data/lib/phony/countries/tajikistan.rb +70 -70
- data/lib/phony/countries/turkmenistan.rb +65 -65
- data/lib/phony/countries/ukraine.rb +607 -607
- data/lib/phony/countries/united_kingdom.rb +66 -66
- data/lib/phony/countries/uruguay.rb +40 -41
- data/lib/phony/countries/vietnam.rb +18 -17
- data/lib/phony/countries/zimbabwe.rb +31 -31
- data/lib/phony/countries.rb +440 -443
- data/lib/phony/country.rb +42 -44
- data/lib/phony/country_codes.rb +61 -60
- data/lib/phony/dsl.rb +23 -26
- data/lib/phony/local_splitters/fixed.rb +20 -29
- data/lib/phony/local_splitters/regex.rb +28 -31
- data/lib/phony/national_code.rb +7 -10
- data/lib/phony/national_splitters/default.rb +9 -11
- data/lib/phony/national_splitters/dsl.rb +8 -18
- data/lib/phony/national_splitters/fixed.rb +11 -14
- data/lib/phony/national_splitters/none.rb +7 -11
- data/lib/phony/national_splitters/regex.rb +13 -17
- data/lib/phony/national_splitters/variable.rb +36 -38
- data/lib/phony/trunk_code.rb +16 -18
- data/lib/phony/vanity.rb +12 -13
- data/lib/phony.rb +84 -84
- metadata +5 -39
- data/spec/functional/config_spec.rb +0 -44
- data/spec/functional/plausibility_spec.rb +0 -689
- data/spec/lib/phony/countries_spec.rb +0 -1459
- data/spec/lib/phony/country_codes_spec.rb +0 -227
- data/spec/lib/phony/country_spec.rb +0 -104
- data/spec/lib/phony/dsl_spec.rb +0 -28
- data/spec/lib/phony/local_splitters/fixed_spec.rb +0 -56
- data/spec/lib/phony/local_splitters/regex_spec.rb +0 -94
- data/spec/lib/phony/national_code_spec.rb +0 -61
- data/spec/lib/phony/national_splitters/default_spec.rb +0 -34
- data/spec/lib/phony/national_splitters/fixed_spec.rb +0 -45
- data/spec/lib/phony/national_splitters/none_spec.rb +0 -28
- data/spec/lib/phony/national_splitters/regex_spec.rb +0 -23
- data/spec/lib/phony/national_splitters/variable_spec.rb +0 -35
- data/spec/lib/phony/trunk_code_spec.rb +0 -85
- data/spec/lib/phony/vanity_spec.rb +0 -30
- data/spec/lib/phony_spec.rb +0 -70
@@ -5,35 +5,35 @@
|
|
5
5
|
|
6
6
|
Phony.define do
|
7
7
|
country '263',
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|