telephone_number 1.4.9 → 1.4.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -1
  3. data/CHANGELOG.md +14 -0
  4. data/README.md +11 -5
  5. data/data/geocoding/de/49.dat +0 -0
  6. data/data/geocoding/de/49.txt +3 -3
  7. data/data/geocoding/en/1.dat +0 -0
  8. data/data/geocoding/en/1.txt +13 -1
  9. data/data/geocoding/en/212.dat +0 -0
  10. data/data/geocoding/en/212.txt +9 -1
  11. data/data/geocoding/en/225.dat +0 -0
  12. data/data/geocoding/en/225.txt +36 -22
  13. data/data/geocoding/en/267.dat +0 -0
  14. data/data/geocoding/en/267.txt +1 -0
  15. data/data/geocoding/en/44.dat +0 -0
  16. data/data/geocoding/en/44.txt +6 -1
  17. data/data/geocoding/en/49.dat +0 -0
  18. data/data/geocoding/en/49.txt +3 -3
  19. data/data/geocoding/en/504.dat +0 -0
  20. data/data/geocoding/en/504.txt +1 -0
  21. data/data/geocoding/en/52.dat +0 -0
  22. data/data/geocoding/en/52.txt +2 -0
  23. data/data/geocoding/en/55.dat +0 -0
  24. data/data/geocoding/en/55.txt +1 -1
  25. data/data/geocoding/en/57.dat +0 -0
  26. data/data/geocoding/en/57.txt +149 -0
  27. data/data/geocoding/en/598.dat +0 -0
  28. data/data/geocoding/en/598.txt +9 -1
  29. data/data/geocoding/en/61.dat +0 -0
  30. data/data/geocoding/en/61.txt +39 -9
  31. data/data/geocoding/en/678.dat +0 -0
  32. data/data/geocoding/en/678.txt +1 -1
  33. data/data/geocoding/en/81.dat +0 -0
  34. data/data/geocoding/en/81.txt +9 -1
  35. data/data/geocoding/en/880.dat +0 -0
  36. data/data/geocoding/en/880.txt +5 -1
  37. data/data/geocoding/en/961.dat +0 -0
  38. data/data/geocoding/en/961.txt +23 -0
  39. data/data/geocoding/en/994.dat +0 -0
  40. data/data/geocoding/en/994.txt +2 -2
  41. data/data/geocoding/es/52.dat +0 -0
  42. data/data/geocoding/es/52.txt +18 -16
  43. data/data/geocoding/es/57.dat +0 -0
  44. data/data/geocoding/es/57.txt +146 -0
  45. data/data/geocoding/fr/212.dat +0 -0
  46. data/data/geocoding/fr/212.txt +9 -1
  47. data/data/geocoding/fr/225.dat +0 -0
  48. data/data/geocoding/fr/225.txt +36 -22
  49. data/data/geocoding/ja/81.dat +0 -0
  50. data/data/geocoding/ja/81.txt +9 -1
  51. data/data/geocoding/pt/55.dat +0 -0
  52. data/data/geocoding/pt/55.txt +1 -1
  53. data/data/telephone_number_data_file.dat +0 -0
  54. data/data/telephone_number_data_file.xml +2162 -1297
  55. data/data/timezones/map_data.dat +0 -0
  56. data/data/timezones/map_data.txt +81 -177
  57. data/lib/telephone_number/country.rb +22 -9
  58. data/lib/telephone_number/version.rb +1 -1
  59. data/lib/telephone_number.rb +0 -1
  60. data/telephone_number.gemspec +1 -0
  61. metadata +6 -4
  62. data/lib/utilities/hash.rb +0 -47
Binary file
@@ -15,7 +15,7 @@
15
15
  # Generated from:
16
16
  # Internal statistics data (2018-06-12).
17
17
 
18
- 1|America/Adak&America/Anchorage&America/Anguilla&America/Antigua&America/Barbados&America/Boise&America/Cayman&America/Chicago&America/Denver&America/Dominica&America/Edmonton&America/Fort_Nelson&America/Grand_Turk&America/Grenada&America/Halifax&America/Jamaica&America/Juneau&America/Los_Angeles&America/Lower_Princes&America/Montserrat&America/Nassau&America/New_York&America/North_Dakota/Center&America/Phoenix&America/Port_of_Spain&America/Puerto_Rico&America/Santo_Domingo&America/St_Johns&America/St_Kitts&America/St_Lucia&America/St_Thomas&America/St_Vincent&America/Toronto&America/Tortola&America/Vancouver&America/Winnipeg&Atlantic/Bermuda&Pacific/Guam&Pacific/Honolulu&Pacific/Pago_Pago&Pacific/Saipan
18
+ 1|America/Adak&America/Anchorage&America/Anguilla&America/Antigua&America/Barbados&America/Boise&America/Cayman&America/Chicago&America/Denver&America/Dominica&America/Edmonton&America/Fort_Nelson&America/Grand_Turk&America/Grenada&America/Halifax&America/Jamaica&America/Juneau&America/Los_Angeles&America/Lower_Princes&America/Montserrat&America/Nassau&America/New_York&America/North_Dakota/Center&America/Phoenix&America/Port_of_Spain&America/Puerto_Rico&America/Regina&America/Santo_Domingo&America/St_Johns&America/St_Kitts&America/St_Lucia&America/St_Thomas&America/St_Vincent&America/Toronto&America/Tortola&America/Vancouver&America/Winnipeg&Atlantic/Bermuda&Pacific/Guam&Pacific/Honolulu&Pacific/Pago_Pago&Pacific/Saipan
19
19
  1201|America/New_York
20
20
  1202|America/New_York
21
21
  1203|America/New_York
@@ -641,7 +641,7 @@
641
641
  1303|America/Denver
642
642
  1304|America/New_York
643
643
  1305|America/New_York
644
- 1306|America/Winnipeg
644
+ 1306|America/Regina
645
645
  1307|America/Denver
646
646
  1308|America/Chicago
647
647
  1308235|America/Denver
@@ -702,6 +702,7 @@
702
702
  1364|America/New_York
703
703
  1365|America/Toronto
704
704
  1367|America/Toronto
705
+ 1368|America/Edmonton
705
706
  1380|America/New_York
706
707
  1385|America/Denver
707
708
  1386|America/New_York
@@ -916,12 +917,15 @@
916
917
  1442|America/Los_Angeles
917
918
  1443|America/New_York
918
919
  1445|America/New_York
920
+ 1447|America/Chicago
921
+ 1448|America/New_York
919
922
  1450|America/Toronto
920
923
  1458|America/Los_Angeles
921
924
  1463|America/New_York
922
925
  1469|America/Chicago
923
926
  1470|America/New_York
924
927
  1473|America/Grenada
928
+ 1474|America/Winnipeg
925
929
  1475|America/New_York
926
930
  1478|America/New_York
927
931
  1479|America/Chicago
@@ -966,6 +970,7 @@
966
970
  1567|America/New_York
967
971
  1570|America/New_York
968
972
  1571|America/New_York
973
+ 1572|America/Chicago
969
974
  1573|America/Chicago
970
975
  1574|America/New_York
971
976
  1574772|America/Chicago
@@ -974,6 +979,7 @@
974
979
  1579|America/Toronto
975
980
  1580|America/Chicago
976
981
  1581|America/Toronto
982
+ 1582|America/New_York
977
983
  1585|America/New_York
978
984
  1586|America/New_York
979
985
  1587|America/Edmonton
@@ -1165,7 +1171,7 @@
1165
1171
  1630|America/Chicago
1166
1172
  1631|America/New_York
1167
1173
  1636|America/Chicago
1168
- 1639|America/Winnipeg
1174
+ 1639|America/Regina
1169
1175
  1640|America/New_York
1170
1176
  1641|America/Chicago
1171
1177
  1646|America/New_York
@@ -1418,6 +1424,7 @@
1418
1424
  1767|America/Dominica
1419
1425
  1769|America/Chicago
1420
1426
  1770|America/New_York
1427
+ 1771|America/New_York
1421
1428
  1772|America/New_York
1422
1429
  1773|America/Chicago
1423
1430
  1774|America/New_York
@@ -1609,6 +1616,7 @@
1609
1616
  1832|America/Chicago
1610
1617
  1838|America/New_York
1611
1618
  1839|America/New_York
1619
+ 1840|America/Los_Angeles
1612
1620
  1843|America/New_York
1613
1621
  1845|America/New_York
1614
1622
  1847|America/Chicago
@@ -1972,6 +1980,7 @@
1972
1980
  1939|America/Puerto_Rico
1973
1981
  1940|America/Chicago
1974
1982
  1941|America/New_York
1983
+ 1945|America/Chicago
1975
1984
  1947|America/New_York
1976
1985
  1949|America/Los_Angeles
1977
1986
  1951|America/Los_Angeles
@@ -2097,6 +2106,7 @@
2097
2106
  34928|Atlantic/Canary
2098
2107
  350|Europe/Gibraltar
2099
2108
  351|Atlantic/Azores&Europe/Lisbon
2109
+ 3511|Atlantic/Azores&Europe/Lisbon
2100
2110
  3512|Europe/Lisbon
2101
2111
  351292|Atlantic/Azores
2102
2112
  351295|Atlantic/Azores
@@ -2173,6 +2183,33 @@
2173
2183
  441534|Europe/Jersey
2174
2184
  441624|Europe/Isle_of_Man
2175
2185
  442|Europe/London
2186
+ 443|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2187
+ 445|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2188
+ 4470|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2189
+ 4471|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2190
+ 4472|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2191
+ 4473|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2192
+ 4474|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2193
+ 4475|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2194
+ 44760|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2195
+ 44762|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2196
+ 44763|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2197
+ 447640|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2198
+ 447641|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2199
+ 447643|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2200
+ 447644|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2201
+ 447646|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2202
+ 44765|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2203
+ 44766|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2204
+ 44767|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2205
+ 44768|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2206
+ 447693|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2207
+ 447699|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2208
+ 4477|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2209
+ 4478|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2210
+ 4479|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2211
+ 448|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2212
+ 449|Europe/Guernsey&Europe/Isle_of_Man&Europe/London
2176
2213
  45|Europe/Copenhagen
2177
2214
  46|Europe/Stockholm
2178
2215
  47|Arctic/Longyearbyen&Europe/Oslo
@@ -2273,6 +2310,7 @@
2273
2310
  52652|America/Mazatlan
2274
2311
  52653|America/Mazatlan
2275
2312
  52656|America/Hermosillo
2313
+ 52657|America/Mazatlan
2276
2314
  52658|America/Tijuana
2277
2315
  52659|America/Mazatlan
2278
2316
  52661|America/Tijuana
@@ -2325,18 +2363,8 @@
2325
2363
  5569|America/Manaus
2326
2364
  55693527|America/Sao_Paulo
2327
2365
  557|America/Sao_Paulo
2366
+ 558|America/Sao_Paulo
2328
2367
  55812|America/Noronha
2329
- 55812011|America/Sao_Paulo
2330
- 55812101|America/Sao_Paulo
2331
- 55812102|America/Sao_Paulo
2332
- 55812103|America/Sao_Paulo
2333
- 55812104|America/Sao_Paulo
2334
- 55812119|America/Sao_Paulo
2335
- 5581212|America/Sao_Paulo
2336
- 55812137|America/Sao_Paulo
2337
- 55812138|America/Sao_Paulo
2338
- 55812626|America/Sao_Paulo
2339
- 558130|America/Sao_Paulo
2340
2368
  5581300|America/Noronha
2341
2369
  55813013|America/Noronha
2342
2370
  55813016|America/Noronha
@@ -2359,124 +2387,56 @@
2359
2387
  55813085|America/Noronha
2360
2388
  55813098|America/Noronha
2361
2389
  558131|America/Noronha
2362
- 5581310|America/Sao_Paulo
2363
- 55813110|America/Sao_Paulo
2364
- 55813111|America/Sao_Paulo
2365
- 55813114|America/Sao_Paulo
2366
- 55813117|America/Sao_Paulo
2367
- 55813118|America/Sao_Paulo
2368
- 55813125|America/Sao_Paulo
2369
- 55813126|America/Sao_Paulo
2370
- 55813127|America/Sao_Paulo
2371
- 55813128|America/Sao_Paulo
2372
- 55813129|America/Sao_Paulo
2373
- 5581313|America/Sao_Paulo
2374
- 55813145|America/Sao_Paulo
2375
- 55813155|America/Sao_Paulo
2376
- 55813181|America/Sao_Paulo
2377
- 55813182|America/Sao_Paulo
2378
- 55813183|America/Sao_Paulo
2379
- 55813184|America/Sao_Paulo
2380
- 55813194|America/Sao_Paulo
2381
- 55813198|America/Sao_Paulo
2382
- 5581320|America/Sao_Paulo
2383
2390
  55813200|America/Noronha
2384
2391
  55813206|America/Noronha
2385
2392
  55813208|America/Noronha
2386
2393
  55813209|America/Noronha
2387
2394
  55813210|America/Noronha
2388
2395
  55813211|America/Noronha
2389
- 55813212|America/Sao_Paulo
2390
- 55813213|America/Sao_Paulo
2391
- 55813214|America/Sao_Paulo
2392
2396
  55813215|America/Noronha
2393
- 55813216|America/Sao_Paulo
2394
- 55813217|America/Sao_Paulo
2395
2397
  55813218|America/Noronha
2396
2398
  55813219|America/Noronha
2397
- 5581322|America/Sao_Paulo
2398
2399
  55813220|America/Noronha
2399
2400
  5581323|America/Noronha
2400
- 55813231|America/Sao_Paulo
2401
- 55813232|America/Sao_Paulo
2402
- 55813233|America/Sao_Paulo
2403
- 55813236|America/Sao_Paulo
2404
2401
  55813240|America/Noronha
2405
- 55813241|America/Sao_Paulo
2406
- 55813242|America/Sao_Paulo
2407
- 55813243|America/Sao_Paulo
2408
- 55813244|America/Sao_Paulo
2409
2402
  55813245|America/Noronha
2410
2403
  55813246|America/Noronha
2411
2404
  55813247|America/Noronha
2412
2405
  55813248|America/Noronha
2413
- 55813249|America/Sao_Paulo
2414
- 5581325|America/Sao_Paulo
2415
2406
  55813250|America/Noronha
2416
2407
  55813258|America/Noronha
2417
2408
  55813259|America/Noronha
2418
- 5581326|America/Sao_Paulo
2419
2409
  55813260|America/Noronha
2420
2410
  55813261|America/Noronha
2421
2411
  55813262|America/Noronha
2422
2412
  55813263|America/Noronha
2423
2413
  5581327|America/Noronha
2424
- 55813271|America/Sao_Paulo
2425
- 55813272|America/Sao_Paulo
2426
- 55813273|America/Sao_Paulo
2427
- 55813274|America/Sao_Paulo
2428
2414
  5581328|America/Noronha
2429
- 55813281|America/Sao_Paulo
2430
2415
  5581329|America/Noronha
2431
2416
  55813300|America/Noronha
2432
- 55813301|America/Sao_Paulo
2433
- 55813302|America/Sao_Paulo
2434
- 55813303|America/Sao_Paulo
2435
- 55813304|America/Sao_Paulo
2436
- 55813305|America/Sao_Paulo
2437
2417
  55813306|America/Noronha
2438
2418
  55813307|America/Noronha
2439
2419
  55813308|America/Noronha
2440
2420
  55813309|America/Noronha
2441
- 5581331|America/Sao_Paulo
2442
2421
  55813310|America/Noronha
2443
2422
  55813313|America/Noronha
2444
2423
  55813315|America/Noronha
2445
- 5581332|America/Sao_Paulo
2446
2424
  55813321|America/Noronha
2447
2425
  55813324|America/Noronha
2448
2426
  55813329|America/Noronha
2449
2427
  5581333|America/Noronha
2450
- 55813333|America/Sao_Paulo
2451
- 55813334|America/Sao_Paulo
2452
- 55813338|America/Sao_Paulo
2453
- 55813339|America/Sao_Paulo
2454
2428
  55813340|America/Noronha
2455
- 55813341|America/Sao_Paulo
2456
- 55813342|America/Sao_Paulo
2457
- 55813343|America/Sao_Paulo
2458
- 55813344|America/Sao_Paulo
2459
- 55813345|America/Sao_Paulo
2460
2429
  55813346|America/Noronha
2461
2430
  55813347|America/Noronha
2462
2431
  55813348|America/Noronha
2463
2432
  55813349|America/Noronha
2464
2433
  5581335|America/Noronha
2465
- 55813351|America/Sao_Paulo
2466
- 55813352|America/Sao_Paulo
2467
- 55813355|America/Sao_Paulo
2468
2434
  5581336|America/Noronha
2469
- 55813361|America/Sao_Paulo
2470
- 55813362|America/Sao_Paulo
2471
- 55813363|America/Sao_Paulo
2472
- 55813366|America/Sao_Paulo
2473
- 5581337|America/Sao_Paulo
2474
2435
  55813370|America/Noronha
2475
2436
  55813373|America/Noronha
2476
2437
  55813374|America/Noronha
2477
2438
  5581338|America/Noronha
2478
2439
  5581339|America/Noronha
2479
- 558134|America/Sao_Paulo
2480
2440
  5581340|America/Noronha
2481
2441
  55813410|America/Noronha
2482
2442
  55813415|America/Noronha
@@ -2495,24 +2455,6 @@
2495
2455
  55813490|America/Noronha
2496
2456
  55813496|America/Noronha
2497
2457
  558135|America/Noronha
2498
- 55813501|America/Sao_Paulo
2499
- 55813512|America/Sao_Paulo
2500
- 55813518|America/Sao_Paulo
2501
- 55813519|America/Sao_Paulo
2502
- 5581352|America/Sao_Paulo
2503
- 5581353|America/Sao_Paulo
2504
- 5581354|America/Sao_Paulo
2505
- 55813551|America/Sao_Paulo
2506
- 55813552|America/Sao_Paulo
2507
- 55813553|America/Sao_Paulo
2508
- 55813559|America/Sao_Paulo
2509
- 55813561|America/Sao_Paulo
2510
- 55813562|America/Sao_Paulo
2511
- 55813563|America/Sao_Paulo
2512
- 55813576|America/Sao_Paulo
2513
- 55813577|America/Sao_Paulo
2514
- 55813581|America/Sao_Paulo
2515
- 558136|America/Sao_Paulo
2516
2458
  5581360|America/Noronha
2517
2459
  5581361|America/Noronha
2518
2460
  55813620|America/Noronha
@@ -2533,67 +2475,14 @@
2533
2475
  55813697|America/Noronha
2534
2476
  55813698|America/Noronha
2535
2477
  558137|America/Noronha
2536
- 55813701|America/Sao_Paulo
2537
- 55813705|America/Sao_Paulo
2538
- 55813708|America/Sao_Paulo
2539
- 55813712|America/Sao_Paulo
2540
- 55813719|America/Sao_Paulo
2541
- 5581372|America/Sao_Paulo
2542
- 5581373|America/Sao_Paulo
2543
- 5581374|America/Sao_Paulo
2544
- 5581375|America/Sao_Paulo
2545
- 55813771|America/Sao_Paulo
2546
- 55813797|America/Sao_Paulo
2547
2478
  558138|America/Noronha
2548
- 55813821|America/Sao_Paulo
2549
- 55813823|America/Sao_Paulo
2550
- 55813877|America/Sao_Paulo
2551
- 55813878|America/Sao_Paulo
2552
- 55813879|America/Sao_Paulo
2553
2479
  558139|America/Noronha
2554
- 55813912|America/Sao_Paulo
2555
- 55813972|America/Sao_Paulo
2556
- 55813974|America/Sao_Paulo
2557
2480
  55814|America/Noronha
2558
- 5581400|America/Sao_Paulo
2559
- 55814020|America/Sao_Paulo
2560
- 55814042|America/Sao_Paulo
2561
- 55814062|America/Sao_Paulo
2562
- 5581410|America/Sao_Paulo
2563
- 55814112|America/Sao_Paulo
2564
- 55814115|America/Sao_Paulo
2565
- 55814116|America/Sao_Paulo
2566
- 55814121|America/Sao_Paulo
2567
- 55814123|America/Sao_Paulo
2568
- 55814131|America/Sao_Paulo
2569
- 55814137|America/Sao_Paulo
2570
- 55814141|America/Sao_Paulo
2571
2481
  55815|America/Noronha
2572
2482
  55817|America/Noronha
2573
- 55817908|America/Sao_Paulo
2574
- 55817916|America/Sao_Paulo
2575
2483
  55819|America/Noronha
2576
- 55819000|America/Sao_Paulo
2577
- 55819710|America/Sao_Paulo
2578
- 55819711|America/Sao_Paulo
2579
- 55819712|America/Sao_Paulo
2580
- 55819730|America/Sao_Paulo
2581
- 55819731|America/Sao_Paulo
2582
- 55819732|America/Sao_Paulo
2583
- 55819733|America/Sao_Paulo
2584
- 55819790|America/Sao_Paulo
2585
- 55819791|America/Sao_Paulo
2586
- 558198|America/Sao_Paulo
2587
- 558199|America/Sao_Paulo
2588
- 5582|America/Sao_Paulo
2589
- 5583|America/Sao_Paulo
2590
- 5584|America/Sao_Paulo
2591
- 5585|America/Sao_Paulo
2592
- 5586|America/Sao_Paulo
2593
- 5587|America/Sao_Paulo
2594
- 5588|America/Sao_Paulo
2595
- 5589|America/Sao_Paulo
2596
- 5591|America/Manaus
2484
+ 559|America/Manaus
2485
+ 5590|America/Sao_Paulo
2597
2486
  55912121|America/Sao_Paulo
2598
2487
  55912122|America/Sao_Paulo
2599
2488
  55912123|America/Sao_Paulo
@@ -2707,9 +2596,7 @@
2707
2596
  55919964|America/Sao_Paulo
2708
2597
  5591998|America/Sao_Paulo
2709
2598
  5591999|America/Sao_Paulo
2710
- 5592|America/Manaus
2711
2599
  55925009|America/Sao_Paulo
2712
- 5593|America/Manaus
2713
2600
  55932101|America/Sao_Paulo
2714
2601
  55932122|America/Sao_Paulo
2715
2602
  55933016|America/Sao_Paulo
@@ -2764,7 +2651,6 @@
2764
2651
  55939991|America/Sao_Paulo
2765
2652
  55939995|America/Sao_Paulo
2766
2653
  55939997|America/Sao_Paulo
2767
- 5594|America/Manaus
2768
2654
  55942101|America/Sao_Paulo
2769
2655
  55942103|America/Sao_Paulo
2770
2656
  55943012|America/Sao_Paulo
@@ -2821,9 +2707,7 @@
2821
2707
  55949992|America/Sao_Paulo
2822
2708
  55949995|America/Sao_Paulo
2823
2709
  55949997|America/Sao_Paulo
2824
- 5595|America/Manaus
2825
2710
  5596|America/Sao_Paulo
2826
- 5597|America/Manaus
2827
2711
  5598|America/Sao_Paulo
2828
2712
  5599|America/Sao_Paulo
2829
2713
  56|America/Santiago&Pacific/Easter
@@ -2839,7 +2723,7 @@
2839
2723
  565|America/Santiago
2840
2724
  566|America/Santiago
2841
2725
  567|America/Santiago
2842
- 56800|America/Santiago
2726
+ 568|America/Santiago
2843
2727
  569|America/Santiago
2844
2728
  57|America/Bogota
2845
2729
  58|America/Caracas
@@ -2905,7 +2789,7 @@
2905
2789
  61851060|Indian/Cocos
2906
2790
  61851087|Australia/Perth
2907
2791
  61851088|Indian/Christmas
2908
- 61851089|Australia/Sydney
2792
+ 61851089|Indian/Cocos
2909
2793
  6185109|Australia/Perth
2910
2794
  618511|Australia/Perth
2911
2795
  61851100|Australia/Adelaide&Australia/Perth
@@ -2924,15 +2808,39 @@
2924
2808
  61851156|Australia/Adelaide&Australia/Perth
2925
2809
  61851158|Australia/Adelaide&Australia/Perth
2926
2810
  61851175|Indian/Christmas
2811
+ 61851176|Indian/Cocos
2927
2812
  61851185|Australia/Adelaide&Australia/Perth
2928
2813
  61851187|Australia/Adelaide&Australia/Perth
2929
2814
  6185120|Australia/Perth
2930
2815
  61851204|Indian/Christmas
2931
2816
  61851205|Australia/Sydney
2932
- 6185123|Australia/Sydney
2817
+ 61851209|Australia/Adelaide&Australia/Perth
2818
+ 6185121|Australia/Adelaide&Australia/Perth
2819
+ 61851221|Australia/Adelaide&Australia/Perth
2820
+ 61851222|Indian/Christmas
2821
+ 61851223|Indian/Cocos
2822
+ 61851224|Australia/Perth
2823
+ 61851225|Australia/Perth
2824
+ 61851226|Australia/Perth
2825
+ 61851227|Australia/Adelaide&Australia/Perth
2826
+ 61851228|Australia/Adelaide&Australia/Perth
2827
+ 61851229|Australia/Adelaide&Australia/Perth
2828
+ 61851230|Australia/Sydney
2829
+ 61851231|Australia/Adelaide&Australia/Perth
2830
+ 61851232|Australia/Sydney
2831
+ 61851233|Australia/Sydney
2832
+ 61851234|Australia/Sydney
2833
+ 61851235|Indian/Christmas
2834
+ 61851236|Australia/Adelaide&Australia/Perth
2835
+ 61851237|Australia/Adelaide&Australia/Perth
2836
+ 61851238|Australia/Adelaide&Australia/Perth
2837
+ 61851239|Australia/Adelaide&Australia/Perth
2933
2838
  6185124|Australia/Sydney
2934
2839
  6185125|Australia/Sydney
2935
2840
  6185126|Australia/Sydney
2841
+ 6185127|Australia/Adelaide&Australia/Perth
2842
+ 6185128|Australia/Adelaide&Australia/Perth
2843
+ 6185129|Australia/Adelaide&Australia/Perth
2936
2844
  6186|Australia/Adelaide&Australia/Perth
2937
2845
  6187|Australia/Adelaide&Australia/Perth
2938
2846
  6188|Australia/Adelaide&Australia/Perth
@@ -2973,11 +2881,15 @@
2973
2881
  61891700|Australia/Adelaide&Australia/Perth&Indian/Christmas
2974
2882
  61891701|Australia/Adelaide&Australia/Perth&Indian/Christmas
2975
2883
  61891702|Australia/Adelaide&Australia/Perth&Indian/Cocos
2884
+ 61891703|Indian/Cocos
2976
2885
  61891710|Australia/Adelaide&Australia/Perth&Indian/Christmas
2977
2886
  61891711|Australia/Adelaide&Australia/Perth&Indian/Christmas
2978
2887
  61891712|Australia/Adelaide&Australia/Perth&Indian/Christmas
2888
+ 61891958|Indian/Christmas
2979
2889
  61891959|Australia/Adelaide&Australia/Perth&Indian/Cocos
2980
2890
  62|Asia/Jakarta&Asia/Jayapura&Asia/Makassar
2891
+ 62007|Asia/Jakarta&Asia/Makassar
2892
+ 621|Asia/Jakarta&Asia/Makassar
2981
2893
  622|Asia/Jakarta
2982
2894
  6231|Asia/Jakarta
2983
2895
  6232|Asia/Jakarta
@@ -2985,12 +2897,8 @@
2985
2897
  6234|Asia/Jakarta
2986
2898
  6235|Asia/Jakarta
2987
2899
  6236|Asia/Makassar
2988
- 62370|Asia/Makassar
2989
- 62371|Asia/Makassar
2990
- 62372|Asia/Makassar
2991
- 62373|Asia/Makassar
2992
- 62374|Asia/Makassar
2993
- 62376|Asia/Makassar
2900
+ 6237|Asia/Makassar
2901
+ 62379|Asia/Jakarta&Asia/Makassar
2994
2902
  6238|Asia/Makassar
2995
2903
  624|Asia/Makassar
2996
2904
  62403|Asia/Jayapura&Asia/Makassar
@@ -3015,27 +2923,21 @@
3015
2923
  6256|Asia/Jakarta
3016
2924
  626|Asia/Jakarta
3017
2925
  627|Asia/Jakarta
3018
- 6281|Asia/Jakarta
2926
+ 628|Asia/Jakarta
2927
+ 6280|Asia/Jakarta&Asia/Makassar
3019
2928
  62811|Asia/Jakarta&Asia/Makassar
3020
2929
  62818|Asia/Jakarta&Asia/Makassar
3021
2930
  62819|Asia/Jakarta&Asia/Makassar
3022
- 6282|Asia/Jakarta
3023
2931
  62824|Asia/Jakarta&Asia/Makassar
3024
2932
  62829|Asia/Jakarta&Asia/Makassar
3025
- 6283|Asia/Jakarta
3026
2933
  62831|Asia/Jakarta&Asia/Makassar
3027
2934
  62833|Asia/Jakarta&Asia/Makassar
3028
2935
  62834|Asia/Jakarta&Asia/Makassar
3029
2936
  62839|Asia/Jakarta&Asia/Makassar
3030
- 6285|Asia/Jakarta
3031
2937
  62853|Asia/Jakarta&Asia/Makassar
3032
- 6286|Asia/Jakarta
3033
2938
  62868|Asia/Jakarta&Asia/Makassar
3034
- 6287|Asia/Jakarta
3035
2939
  62876|Asia/Jakarta&Asia/Makassar
3036
- 6288|Asia/Jakarta
3037
2940
  62887|Asia/Jakarta&Asia/Makassar
3038
- 6289|Asia/Jakarta
3039
2941
  6290|Asia/Jayapura
3040
2942
  6291|Asia/Jayapura
3041
2943
  62915|Asia/Jakarta&Asia/Jayapura
@@ -3090,6 +2992,7 @@
3090
2992
  688|Pacific/Funafuti
3091
2993
  689|Pacific/Gambier&Pacific/Marquesas&Pacific/Tahiti
3092
2994
  6894|Pacific/Tahiti
2995
+ 68980|Pacific/Gambier&Pacific/Marquesas&Pacific/Tahiti
3093
2996
  68987|Pacific/Gambier&Pacific/Marquesas&Pacific/Tahiti
3094
2997
  68988|Pacific/Tahiti
3095
2998
  68989|Pacific/Tahiti
@@ -3150,6 +3053,7 @@
3150
3053
  7808|Asia/Almaty&Asia/Aqtobe&Europe/Moscow
3151
3054
  7809|Asia/Almaty&Asia/Aqtobe&Europe/Moscow
3152
3055
  781|Europe/Moscow
3056
+ 7810|Asia/Almaty&Asia/Aqtobe&Europe/Moscow
3153
3057
  782|Europe/Moscow
3154
3058
  783|Europe/Moscow
3155
3059
  7840|Europe/Bucharest&Europe/Moscow
@@ -7,18 +7,18 @@ module TelephoneNumber
7
7
  MOBILE_TOKEN_COUNTRIES = { AR: '9' }.freeze
8
8
 
9
9
  def initialize(data_hash)
10
+ validations = data_hash.fetch(:validations, {}).dup
10
11
  @country_code = data_hash[:country_code]
11
12
  @country_id = data_hash[:id]
12
- @general_validation = NumberValidation.new(:general_desc, data_hash[:validations][:general_desc]) if data_hash.fetch(:validations, {})[:general_desc]
13
+ @general_validation = NumberValidation.new(:general_desc, validations[:general_desc]) if validations[:general_desc]
13
14
  @international_prefix = Regexp.new(data_hash[:international_prefix]) if data_hash[:international_prefix]
14
15
  @main_country_for_code = data_hash[:main_country_for_code] == 'true'
15
16
  @mobile_token = MOBILE_TOKEN_COUNTRIES[@country_id.to_sym]
16
17
  @national_prefix = data_hash[:national_prefix]
17
18
  @national_prefix_for_parsing = Regexp.new(data_hash[:national_prefix_for_parsing]) if data_hash[:national_prefix_for_parsing]
18
19
  @national_prefix_transform_rule = data_hash[:national_prefix_transform_rule]
19
- @validations = data_hash.fetch(:validations, {})
20
- .except(:general_desc, :area_code_optional)
21
- .map { |name, data| NumberValidation.new(name, data) }
20
+ @validations = validations.delete_if { |name, _| name == :general_desc || name == :area_code_optional }
21
+ .map { |name, data| NumberValidation.new(name, data) }
22
22
  @formats = data_hash.fetch(:formats, []).map { |format| NumberFormat.new(format, data_hash[:national_prefix_formatting_rule]) }
23
23
  end
24
24
 
@@ -52,11 +52,24 @@ module TelephoneNumber
52
52
  end
53
53
 
54
54
  def self.load_data
55
- data_file = "#{File.dirname(__FILE__)}/../../data/telephone_number_data_file.dat"
56
- main_data = Marshal.load(File.binread(data_file))
57
- override_data = {}
58
- override_data = Marshal.load(File.binread(TelephoneNumber.override_file)) if TelephoneNumber.override_file
59
- return main_data.deep_deep_merge!(override_data)
55
+ data_path = "#{File.dirname(__FILE__)}/../../data/telephone_number_data_file.dat"
56
+ main_data = Marshal.load(File.binread(data_path))
57
+ if TelephoneNumber.override_file
58
+ override_data = Marshal.load(File.binread(TelephoneNumber.override_file))
59
+ main_data = deep_merge(main_data, override_data)
60
+ end
61
+ main_data
62
+ end
63
+
64
+ def self.deep_merge(base_hash, other_hash)
65
+ other_hash.each do |key, value|
66
+ base_hash[key] = if base_hash[key].is_a?(Hash) && value.is_a?(Hash)
67
+ deep_merge(base_hash[key], value)
68
+ else
69
+ value
70
+ end
71
+ end
72
+ base_hash
60
73
  end
61
74
 
62
75
  def self.all_countries
@@ -1,3 +1,3 @@
1
1
  module TelephoneNumber
2
- VERSION = "1.4.9"
2
+ VERSION = "1.4.13"
3
3
  end
@@ -1,5 +1,4 @@
1
1
  require 'telephone_number/version'
2
- require 'utilities/hash'
3
2
  require 'active_model/telephone_number_validator' if defined?(ActiveModel)
4
3
  require 'forwardable'
5
4
 
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.bindir = 'exe'
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ['lib']
22
+ spec.required_ruby_version = '>= 2.4.0'
22
23
 
23
24
  spec.add_development_dependency 'bundler'
24
25
  spec.add_development_dependency 'rake'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telephone_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.9
4
+ version: 1.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - MOBI Wireless Management
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-17 00:00:00.000000000 Z
11
+ date: 2021-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,6 +150,7 @@ files:
150
150
  - ".rubocop.yml"
151
151
  - ".ruby-version"
152
152
  - ".travis.yml"
153
+ - CHANGELOG.md
153
154
  - CODE_OF_CONDUCT.md
154
155
  - Gemfile
155
156
  - LICENSE
@@ -453,6 +454,8 @@ files:
453
454
  - data/geocoding/en/95.txt
454
455
  - data/geocoding/en/960.dat
455
456
  - data/geocoding/en/960.txt
457
+ - data/geocoding/en/961.dat
458
+ - data/geocoding/en/961.txt
456
459
  - data/geocoding/en/962.dat
457
460
  - data/geocoding/en/962.txt
458
461
  - data/geocoding/en/963.dat
@@ -632,7 +635,6 @@ files:
632
635
  - lib/telephone_number/parser.rb
633
636
  - lib/telephone_number/time_zone_detector.rb
634
637
  - lib/telephone_number/version.rb
635
- - lib/utilities/hash.rb
636
638
  - telephone_number.gemspec
637
639
  homepage: https://github.com/mobi/telephone_number
638
640
  licenses:
@@ -646,7 +648,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
646
648
  requirements:
647
649
  - - ">="
648
650
  - !ruby/object:Gem::Version
649
- version: '0'
651
+ version: 2.4.0
650
652
  required_rubygems_version: !ruby/object:Gem::Requirement
651
653
  requirements:
652
654
  - - ">="