telephone_number 1.4.8 → 1.4.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -1
  3. data/CHANGELOG.md +11 -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 +10 -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 +22 -22
  13. data/data/geocoding/en/267.dat +0 -0
  14. data/data/geocoding/en/267.txt +1 -0
  15. data/data/geocoding/en/380.dat +0 -0
  16. data/data/geocoding/en/380.txt +1 -1
  17. data/data/geocoding/en/44.dat +0 -0
  18. data/data/geocoding/en/44.txt +6 -1
  19. data/data/geocoding/en/49.dat +0 -0
  20. data/data/geocoding/en/49.txt +3 -3
  21. data/data/geocoding/en/504.dat +0 -0
  22. data/data/geocoding/en/504.txt +2 -1
  23. data/data/geocoding/en/598.dat +0 -0
  24. data/data/geocoding/en/598.txt +9 -1
  25. data/data/geocoding/en/61.dat +0 -0
  26. data/data/geocoding/en/61.txt +39 -9
  27. data/data/geocoding/en/678.dat +0 -0
  28. data/data/geocoding/en/678.txt +1 -1
  29. data/data/geocoding/en/81.dat +0 -0
  30. data/data/geocoding/en/81.txt +9 -1
  31. data/data/geocoding/en/961.dat +0 -0
  32. data/data/geocoding/en/961.txt +23 -0
  33. data/data/geocoding/es/52.dat +0 -0
  34. data/data/geocoding/es/52.txt +16 -16
  35. data/data/geocoding/fr/212.dat +0 -0
  36. data/data/geocoding/fr/212.txt +9 -1
  37. data/data/geocoding/fr/225.dat +0 -0
  38. data/data/geocoding/fr/225.txt +22 -22
  39. data/data/geocoding/ja/81.dat +0 -0
  40. data/data/geocoding/ja/81.txt +9 -1
  41. data/data/telephone_number_data_file.dat +0 -0
  42. data/data/telephone_number_data_file.xml +1687 -1096
  43. data/data/timezones/map_data.dat +0 -0
  44. data/data/timezones/map_data.txt +76 -20
  45. data/lib/telephone_number.rb +0 -1
  46. data/lib/telephone_number/country.rb +22 -9
  47. data/lib/telephone_number/version.rb +1 -1
  48. data/telephone_number.gemspec +1 -0
  49. metadata +6 -4
  50. data/lib/utilities/hash.rb +0 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ead78e203a5dcc8deb21cf2b3dccc002e7f349fa
4
- data.tar.gz: 6a958f18f92076d84e1488229b5d22edf617c474
3
+ metadata.gz: 1aa006867b6c4a15e810ab0d389692bf594d4e73
4
+ data.tar.gz: 15c2a66257de6414a989c03777e516cc43bcdb22
5
5
  SHA512:
6
- metadata.gz: d8b86a2b25430edf91f7ec5903d3bc0b693b3a65b939962dfc46550479a1219ee23fb035498efd8847843203c56e9139f9dee69e528059b60ef14079b4ae5de5
7
- data.tar.gz: d6fab606c1dc9d24418dfa2ed2f34fc7ca2b6417464192c52d073ff15e1efaf0281619124936d81898cf400bb523dcdf4b711ae760cf394f2b83874d071946db
6
+ metadata.gz: 4a09f365fd74d69fface3ec278514eb0f83d4d78065849f1f4c3d66f61dd8cdd953fe2f2cb95d0ea095064de1146a1b090fbb27f3a1a519f5c39937832e6f9e0
7
+ data.tar.gz: a70079067561305fdc4abea083e601cc0c50c3a62c743bcce47d371ace8a43b2723b7cc1f3ac7b2ef40259cd6b4bde1e01c7a1c091fd018febd86cdbc6971da0
data/.travis.yml CHANGED
@@ -1,4 +1,3 @@
1
- sudo: false
2
1
  language: ruby
3
2
  rvm:
4
3
  - 2.4.3
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+ All notable changes to this project are documented here.
3
+
4
+ ## v1.4.12 - 2021-07-14
5
+ * Bring data up to date with [upstream](https://github.com/google/libphonenumber/releases/tag/v8.12.27).
6
+
7
+ ## v1.4.11 - 2021-05-13
8
+ * Bring data up to date with [upstream](https://github.com/google/libphonenumber/releases/tag/v8.12.22).
9
+
10
+ ## v1.4.10 - 2021-03-18
11
+ * Bring data up to date with [upstream](https://github.com/google/libphonenumber/releases/tag/v8.12.20).
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- [![Code Climate](https://codeclimate.com/github/mobi/telephone_number/badges/gpa.svg)](https://codeclimate.com/github/mobi/telephone_number) [![Coverage Status](https://coveralls.io/repos/github/mobi/telephone_number/badge.svg)](https://coveralls.io/github/mobi/telephone_number)
1
+ [![Build Status](https://travis-ci.org/mobi/telephone_number.svg?branch=master)](https://travis-ci.org/mobi/telephone_number)
2
+ [![Code Climate](https://codeclimate.com/github/mobi/telephone_number/badges/gpa.svg)](https://codeclimate.com/github/mobi/telephone_number)
3
+ [![Coverage Status](https://coveralls.io/repos/github/mobi/telephone_number/badge.svg)](https://coveralls.io/github/mobi/telephone_number)
2
4
 
3
5
  # What is it?
4
6
 
@@ -26,6 +28,10 @@ Or install it yourself as:
26
28
 
27
29
  $ gem install telephone_number
28
30
 
31
+ ## Supported Ruby Versions
32
+
33
+ This library requires Ruby 2.4 or later.
34
+
29
35
  ## Rails Validation
30
36
 
31
37
  `validates :my_attribute_name, telephone_number: {country: proc{|record| record.country}, types: [:fixed_line, :mobile, etc]}`
@@ -60,7 +66,7 @@ phone_object = TelephoneNumber.parse("3175082237", :us) ==>
60
66
  @country=:US,
61
67
  @e164_number="13175083348",
62
68
  @national_number="3175083348",
63
- @original_number="3175083348">
69
+ @original_number="3175083348">
64
70
  ```
65
71
  After that you have the following instance methods available to you.
66
72
 
@@ -68,7 +74,7 @@ After that you have the following instance methods available to you.
68
74
 
69
75
  Returns all types that the number is considered valid for.
70
76
 
71
- `phone_object.valid_types ==> [:fixed_line, :mobile, :toll_free]`
77
+ `phone_object.valid_types ==> [:fixed_line, :mobile, :toll_free]`
72
78
 
73
79
  - ### `valid?`
74
80
 
@@ -113,10 +119,10 @@ After that you have the following instance methods available to you.
113
119
  `phone_object.location ==> "Indiana"`
114
120
 
115
121
  `phone_object.location(:ja) ==> "ソウル特別市"`
116
-
122
+
117
123
  - ### `timezone`
118
124
 
119
- Returns the time zone of the number.
125
+ Returns the time zone of the number.
120
126
 
121
127
  `phone_object.timezone ==> "America/New_York"`
122
128
 
Binary file
@@ -4701,14 +4701,14 @@
4701
4701
  499122|Schwabach
4702
4702
  499123|Lauf an der Pegnitz
4703
4703
  499126|Eckental
4704
- 499127|Rosstal Mittelfrankenanken
4704
+ 499127|Rosstal Mittelfranken
4705
4705
  499128|Feucht
4706
4706
  499129|Wendelstein
4707
4707
  499131|Erlangen
4708
4708
  499132|Herzogenaurach
4709
- 499133|Baiersdorf Mittelfrankenanken
4709
+ 499133|Baiersdorf Mittelfranken
4710
4710
  499134|Neunkirchen am Brand
4711
- 499135|Heßdorf Mittelfrankenanken
4711
+ 499135|Hessdorf Mittelfranken
4712
4712
  499141|Weißenburg in Bayern
4713
4713
  499142|Treuchtlingen
4714
4714
  499143|Pappenheim Mittelfranken
Binary file
@@ -6584,6 +6584,7 @@
6584
6584
  1325944|San Angelo, TX
6585
6585
  1325947|San Angelo, TX
6586
6586
  1325949|San Angelo, TX
6587
+ 1326|Ohio
6587
6588
  1330|Ohio
6588
6589
  1330220|Brunswick, OH
6589
6590
  1330225|Brunswick, OH
@@ -7720,6 +7721,7 @@
7720
7721
  1364|Kentucky
7721
7722
  1365|Ontario
7722
7723
  1367|Quebec
7724
+ 1368|Alberta
7723
7725
  1380|Ohio
7724
7726
  1385|Utah
7725
7727
  1386|Florida
@@ -10929,6 +10931,8 @@
10929
10931
  1443949|Annapolis, MD
10930
10932
  1443977|Baltimore, MD
10931
10933
  1445|Philadelphia
10934
+ 1447|Illinois
10935
+ 1448|Florida
10932
10936
  1450|Quebec
10933
10937
  1450218|Vaudreuil-Dorion, QC
10934
10938
  1450224|Prévost, QC
@@ -11110,6 +11114,7 @@
11110
11114
  1469916|Dallas, TX
11111
11115
  1469952|McKinney, TX
11112
11116
  1470|Georgia
11117
+ 1474|Saskatchewan
11113
11118
  1475|Connecticut
11114
11119
  1478|Georgia
11115
11120
  1478218|Perry, GA
@@ -14966,6 +14971,7 @@
14966
14971
  1571292|Manassas, VA
14967
14972
  1571379|Manassas, VA
14968
14973
  1571434|Sterling, VA
14974
+ 1572|Oklahoma
14969
14975
  1573|Missouri
14970
14976
  1573204|Jackson, MO
14971
14977
  1573214|Columbia, MO
@@ -25939,6 +25945,8 @@
25939
25945
  1832912|Houston, TX
25940
25946
  1832934|Magnolia, TX
25941
25947
  1838|New York
25948
+ 1839|South Carolina
25949
+ 1840|California
25942
25950
  1843|South Carolina
25943
25951
  1843207|North Charleston, SC
25944
25952
  1843208|Hardeeville, SC
@@ -26592,7 +26600,7 @@
26592
26600
  1850983|Milton, FL
26593
26601
  1850994|Milton, FL
26594
26602
  1850997|Monticello, FL
26595
- 1854|Ohio
26603
+ 1854|South Carolina
26596
26604
  1856|New Jersey
26597
26605
  1856205|Vineland, NJ
26598
26606
  1856216|Cherry Hill, NJ
@@ -30625,6 +30633,7 @@
30625
30633
  194195|Sarasota, FL
30626
30634
  1941964|Boca Grande, FL
30627
30635
  1941979|Port Charlotte, FL
30636
+ 1945|Texas
30628
30637
  1947|Michigan
30629
30638
  1949|California
30630
30639
  1949221|Irvine, CA
Binary file
@@ -18,7 +18,15 @@
18
18
 
19
19
  212520|Casablanca
20
20
  212521|Casablanca/Central Morocco
21
- 212522|Casablanca
21
+ 2125220|Casablanca
22
+ 2125222|Casablanca
23
+ 2125223|Casablanca
24
+ 2125224|Casablanca
25
+ 2125225|Casablanca
26
+ 2125226|Casablanca
27
+ 2125227|Casablanca
28
+ 2125228|Casablanca
29
+ 2125229|Casablanca
22
30
  2125232|Mohammedia
23
31
  2125233|El Jedida/Mohammedia
24
32
  2125234|Settai
Binary file
@@ -14,25 +14,25 @@
14
14
 
15
15
  # Translated from fr/225.txt using Freebase and Wikipedia.
16
16
 
17
- 225200|Plateau, Abidjan
18
- 225202|Plateau, Abidjan
19
- 225203|Plateau, Abidjan
20
- 225210|Abidjan (southeast)
21
- 225212|Abidjan (southeast)
22
- 225213|Abidjan (southeast)
23
- 225215|Abidjan (southeast)
24
- 225217|Abidjan (southeast)
25
- 225220|Cocody, Abidjan
26
- 225224|Cocody, Abidjan
27
- 225225|Cocody, Abidjan
28
- 225230|Banco, Abidjan
29
- 225234|Banco, Abidjan
30
- 225235|Banco, Abidjan
31
- 22524|Abobo, Abidjan
32
- 22530|Yamoussoukro
33
- 22531|Bouaké
34
- 22532|Daloa
35
- 22533|Man
36
- 22534|San-Pédro
37
- 22535|Abengourou
38
- 22536|Korhogo
17
+ 22525200|Plateau, Abidjan
18
+ 22525210|Abidjan (southeast)
19
+ 22525220|Cocody, Abidjan
20
+ 22525230|Banco, Abidjan
21
+ 22525240|Abobo, Abidjan
22
+ 22525300|Yamoussoukro
23
+ 22525310|Bouaké
24
+ 22525320|Daloa
25
+ 22525330|Man
26
+ 22525340|San-Pédro
27
+ 22525350|Abengourou
28
+ 22525360|Korhogo
29
+ 2252720|Plateau, Abidjan
30
+ 2252721|Abidjan (southeast)
31
+ 2252722|Cocody, Abidjan
32
+ 2252723|Banco, Abidjan
33
+ 2252724|Abobo, Abidjan
34
+ 2252730|Yamoussoukro
35
+ 2252731|Bouaké
36
+ 2252732|Daloa
37
+ 2252733|Man
38
+ 2252734|San-Pédro
Binary file
@@ -39,6 +39,7 @@
39
39
  26749|Palapye
40
40
  267530|Lobatse
41
41
  267533|Lobatse
42
+ 267534|Lobatse
42
43
  267538|Ramotswa
43
44
  267539|Ramotswa
44
45
  26754|Barolong/Ngwaketse
Binary file
@@ -295,7 +295,7 @@
295
295
  3804742|Katerinopil, Cherkasy
296
296
  3804744|Uman, Cherkasy
297
297
  3804745|Khrystynivka, Cherkasy
298
- 3804746|Monastir, Cherkasy
298
+ 3804746|Monastyrysche, Cherkasy
299
299
  3804747|Zhashkiv, Cherkasy
300
300
  3804748|Mankivka, Cherkasy
301
301
  3804749|Lysyanka, Cherkasy
Binary file
@@ -17,7 +17,12 @@
17
17
  # with multiple corrections and fixes applied (see previous commits).
18
18
 
19
19
  44113|Leeds
20
- 44114|Sheffield
20
+ 441140|Sheffield
21
+ 441141|Sheffield
22
+ 441142|Sheffield
23
+ 441143|Sheffield
24
+ 441144|Sheffield
25
+ 441145|Sheffield
21
26
  44115|Nottingham
22
27
  44116|Leicester
23
28
  44117|Bristol
Binary file
@@ -4700,14 +4700,14 @@
4700
4700
  499122|Schwabach
4701
4701
  499123|Lauf an der Pegnitz
4702
4702
  499126|Eckental
4703
- 499127|Rosstal Mittelfrankenanken
4703
+ 499127|Rosstal Mittelfranken
4704
4704
  499128|Feucht
4705
4705
  499129|Wendelstein
4706
4706
  499131|Erlangen
4707
4707
  499132|Herzogenaurach
4708
- 499133|Baiersdorf Mittelfrankenanken
4708
+ 499133|Baiersdorf Mittelfranken
4709
4709
  499134|Neunkirchen am Brand
4710
- 499135|Hessdorf Mittelfrankenanken
4710
+ 499135|Hessdorf Mittelfranken
4711
4711
  499141|Weissenburg in Bayern
4712
4712
  499142|Treuchtlingen
4713
4713
  499143|Pappenheim Mittelfranken
Binary file
@@ -16,6 +16,7 @@
16
16
 
17
17
  5042200|Polo Paz
18
18
  5042201|Polo Paz
19
+ 5042202|Tegucigalpa
19
20
  5042203|Polo Paz
20
21
  5042209|Res. Centro América, Tegucigalpa
21
22
  5042211|El Picacho
@@ -50,7 +51,7 @@
50
51
  5042257|Prados Universitarios
51
52
  5042290|Toncontin
52
53
  5042291|Toncontin
53
- 504240|Roatán, Bay Islands
54
+ 5042407|Roatán, Bay Islands
54
55
  5042423|La Ceiba
55
56
  5042424|Sabá
56
57
  5042425|Utila, Bay Islands
Binary file
@@ -17,8 +17,16 @@
17
17
  598433|Canelones
18
18
  598434|San Jose de Mayo
19
19
  598435|Florida
20
- 598436|Durazno
20
+ 5984360|Durazno
21
+ 5984361|Durazno
22
+ 5984362|Durazno
23
+ 5984363|Durazno
21
24
  5984364|Trinidad/Flores
25
+ 5984365|Durazno
26
+ 5984366|Durazno
27
+ 5984367|Durazno
28
+ 5984368|Durazno
29
+ 5984369|Durazno
22
30
  598444|Minas/Lavalleja
23
31
  598445|Treinta y Tres
24
32
  598447|Rocha
Binary file
@@ -42456,7 +42456,7 @@
42456
42456
  61851086|Wyndham
42457
42457
  61851087|Broome
42458
42458
  61851088|Christmas Island
42459
- 61851089|Cocos (Keeling) Island
42459
+ 61851089|Cocos Island
42460
42460
  61851090|Dampier
42461
42461
  61851091|De Grey
42462
42462
  61851092|Derby
@@ -42542,6 +42542,7 @@
42542
42542
  61851173|Wyndham
42543
42543
  61851174|Broome
42544
42544
  61851175|Christmas Island
42545
+ 61851176|Cocos Island
42545
42546
  61851177|Dampier
42546
42547
  61851178|De Grey
42547
42548
  61851179|Derby
@@ -42573,10 +42574,31 @@
42573
42574
  61851205|Port Hedland
42574
42575
  61851206|Dampier
42575
42576
  61851207|De Grey
42577
+ 61851209|Mitchell
42578
+ 61851211|Mount Bruce
42579
+ 61851213|Newman
42580
+ 61851215|Onslow
42581
+ 61851217|Ord
42582
+ 61851219|Pannawonica
42583
+ 61851221|Paraburdoo
42584
+ 61851222|Christmas Island
42585
+ 61851223|Cocos Island
42586
+ 61851224|Dampier
42587
+ 61851225|De Grey
42588
+ 61851226|Derby
42589
+ 61851227|Fitzroy Crossing
42590
+ 61851228|Great Sandy
42591
+ 61851229|Hall's Creek
42592
+ 61851230|Karratha
42593
+ 61851231|Kununurra
42576
42594
  61851232|Port Hedland
42577
42595
  61851233|Port Hedland
42578
42596
  61851234|Broome
42579
42597
  61851235|Christmas Island
42598
+ 61851236|Leopold
42599
+ 61851237|Marble Bar
42600
+ 61851238|Millstream
42601
+ 61851239|Mitchell
42580
42602
  6185124|Karratha
42581
42603
  61851250|Newman
42582
42604
  61851251|Onslow
@@ -42594,6 +42616,19 @@
42594
42616
  61851263|Whaleback
42595
42617
  61851264|Wittenoom
42596
42618
  61851265|Wyndham
42619
+ 61851267|Roebuck
42620
+ 61851269|Sandfire
42621
+ 6185127|Port Hedland
42622
+ 61851281|Telfer
42623
+ 61851283|Tom Price
42624
+ 61851285|Whaleback
42625
+ 61851287|Wittenoom
42626
+ 61851289|Wyndham
42627
+ 61851290|Telfer
42628
+ 61851291|Tom Price
42629
+ 61851292|Whaleback
42630
+ 61851293|Wittenoom
42631
+ 61851294|Wyndham
42597
42632
  61860000|Kalgoorlie
42598
42633
  61860001|Burracoppin
42599
42634
  61860002|Burracoppin
@@ -55932,6 +55967,7 @@
55932
55967
  61891700|Christmas Island
55933
55968
  61891701|Christmas Island
55934
55969
  61891702|Cocos Island
55970
+ 61891703|Cocos Island
55935
55971
  61891704|Fitzroy Crossing
55936
55972
  61891705|Fitzroy Crossing
55937
55973
  61891706|Great Sandy
@@ -56063,14 +56099,8 @@
56063
56099
  61891938|Broome
56064
56100
  61891939|Derby
56065
56101
  6189194|Broome
56066
- 61891950|Broome
56067
- 61891951|Broome
56068
- 61891952|Broome
56069
- 61891953|Broome
56070
- 61891954|Broome
56071
- 61891955|Broome
56072
- 61891956|Broome
56073
- 61891957|Broome
56102
+ 6189195|Broome
56103
+ 61891958|Christmas Island
56074
56104
  61891959|Cocos Island
56075
56105
  61891960|Broome
56076
56106
  61891961|Derby
Binary file
@@ -24,4 +24,4 @@
24
24
  67837|Luganville
25
25
  67838|Penama/Torba
26
26
  6784|Malampa
27
- 6788|Tafea
27
+ 67888|Tafea