telephone_number 1.4.6 → 1.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +8 -0
- data/README.md +4 -0
- data/data/geocoding/de/352.dat +0 -0
- data/data/geocoding/de/352.txt +0 -1
- data/data/geocoding/de/43.dat +0 -0
- data/data/geocoding/de/43.txt +2 -0
- data/data/geocoding/de/49.dat +0 -0
- data/data/geocoding/de/49.txt +3 -3
- data/data/geocoding/en/1.dat +0 -0
- data/data/geocoding/en/1.txt +45 -7
- data/data/geocoding/en/212.dat +0 -0
- data/data/geocoding/en/212.txt +4 -4
- data/data/geocoding/en/221.dat +0 -0
- data/data/geocoding/en/221.txt +7 -1
- data/data/geocoding/en/224.dat +0 -0
- data/data/geocoding/en/224.txt +1 -1
- data/data/geocoding/en/225.dat +0 -0
- data/data/geocoding/en/225.txt +22 -12
- data/data/geocoding/en/233.dat +0 -0
- data/data/geocoding/en/233.txt +1 -0
- data/data/geocoding/en/234.dat +0 -0
- data/data/geocoding/en/234.txt +16 -1
- data/data/geocoding/en/236.dat +0 -0
- data/data/geocoding/en/236.txt +15 -0
- data/data/geocoding/en/252.dat +0 -0
- data/data/geocoding/en/252.txt +0 -1
- data/data/geocoding/en/264.dat +0 -0
- data/data/geocoding/en/264.txt +2 -0
- data/data/geocoding/en/267.dat +0 -0
- data/data/geocoding/en/267.txt +1 -0
- data/data/geocoding/en/290.dat +0 -0
- data/data/geocoding/en/290.txt +6 -1
- data/data/geocoding/en/352.dat +0 -0
- data/data/geocoding/en/352.txt +0 -1
- data/data/geocoding/en/370.dat +0 -0
- data/data/geocoding/en/370.txt +9 -2
- data/data/geocoding/en/374.dat +0 -0
- data/data/geocoding/en/374.txt +0 -5
- data/data/geocoding/en/380.dat +0 -0
- data/data/geocoding/en/380.txt +1 -1
- data/data/geocoding/en/389.dat +0 -0
- data/data/geocoding/en/389.txt +28 -2
- data/data/geocoding/en/421.dat +0 -0
- data/data/geocoding/en/421.txt +15 -14
- data/data/geocoding/en/43.dat +0 -0
- data/data/geocoding/en/43.txt +2 -0
- data/data/geocoding/en/44.dat +0 -0
- data/data/geocoding/en/44.txt +15 -2
- data/data/geocoding/en/49.dat +0 -0
- data/data/geocoding/en/49.txt +3 -3
- data/data/geocoding/en/504.dat +0 -0
- data/data/geocoding/en/504.txt +76 -1
- data/data/geocoding/en/54.dat +0 -0
- data/data/geocoding/en/54.txt +18 -3
- data/data/geocoding/en/56.dat +0 -0
- data/data/geocoding/en/56.txt +37 -1
- data/data/geocoding/en/58.dat +0 -0
- data/data/geocoding/en/58.txt +21 -12
- data/data/geocoding/en/593.dat +0 -0
- data/data/geocoding/en/593.txt +21 -0
- data/data/geocoding/en/595.dat +0 -0
- data/data/geocoding/en/595.txt +73 -0
- data/data/geocoding/en/598.dat +0 -0
- data/data/geocoding/en/598.txt +41 -0
- data/data/geocoding/en/599.dat +0 -0
- data/data/geocoding/en/599.txt +8 -2
- data/data/geocoding/en/60.dat +0 -0
- data/data/geocoding/en/60.txt +9 -8
- data/data/geocoding/en/61.dat +0 -0
- data/data/geocoding/en/61.txt +20671 -1999
- data/data/geocoding/en/63.dat +0 -0
- data/data/geocoding/en/63.txt +61 -0
- data/data/geocoding/en/64.dat +0 -0
- data/data/geocoding/en/64.txt +2862 -108
- data/data/geocoding/en/66.dat +0 -0
- data/data/geocoding/en/66.txt +4 -0
- data/data/geocoding/en/670.dat +0 -0
- data/data/geocoding/en/670.txt +31 -0
- data/data/geocoding/en/672.dat +0 -0
- data/data/geocoding/en/672.txt +18 -0
- data/data/geocoding/en/678.dat +0 -0
- data/data/geocoding/en/678.txt +27 -0
- data/data/geocoding/en/680.dat +0 -0
- data/data/geocoding/en/680.txt +1 -1
- data/data/geocoding/en/685.dat +0 -0
- data/data/geocoding/en/685.txt +27 -0
- data/data/geocoding/en/686.dat +0 -0
- data/data/geocoding/en/686.txt +0 -1
- data/data/geocoding/en/689.dat +0 -0
- data/data/geocoding/en/689.txt +24 -0
- data/data/geocoding/en/690.dat +0 -0
- data/data/geocoding/en/690.txt +17 -0
- data/data/geocoding/en/7.dat +0 -0
- data/data/geocoding/en/7.txt +3 -0
- data/data/geocoding/en/81.dat +0 -0
- data/data/geocoding/en/81.txt +10 -2
- data/data/geocoding/en/850.dat +0 -0
- data/data/geocoding/en/850.txt +31 -0
- data/data/geocoding/en/880.dat +0 -0
- data/data/geocoding/en/880.txt +247 -613
- data/data/geocoding/en/92.dat +0 -0
- data/data/geocoding/en/92.txt +760 -0
- data/data/geocoding/en/94.dat +0 -0
- data/data/geocoding/en/94.txt +2 -2
- data/data/geocoding/en/961.dat +0 -0
- data/data/geocoding/en/961.txt +23 -0
- data/data/geocoding/en/962.dat +0 -0
- data/data/geocoding/en/962.txt +24 -2
- data/data/geocoding/en/963.dat +0 -0
- data/data/geocoding/en/963.txt +35 -0
- data/data/geocoding/en/967.dat +0 -0
- data/data/geocoding/en/967.txt +98 -0
- data/data/geocoding/en/970.dat +0 -0
- data/data/geocoding/en/970.txt +29 -0
- data/data/geocoding/en/993.dat +0 -0
- data/data/geocoding/en/993.txt +5 -0
- data/data/geocoding/en/995.dat +0 -0
- data/data/geocoding/en/995.txt +91 -0
- data/data/geocoding/es/52.dat +0 -0
- data/data/geocoding/es/52.txt +16 -16
- data/data/geocoding/es/54.dat +0 -0
- data/data/geocoding/es/54.txt +18 -3
- data/data/geocoding/es/56.dat +0 -0
- data/data/geocoding/es/56.txt +37 -1
- data/data/geocoding/es/58.dat +0 -0
- data/data/geocoding/es/58.txt +21 -12
- data/data/geocoding/fr/212.dat +0 -0
- data/data/geocoding/fr/212.txt +4 -4
- data/data/geocoding/fr/225.dat +0 -0
- data/data/geocoding/fr/225.txt +22 -12
- data/data/geocoding/fr/290.dat +0 -0
- data/data/geocoding/fr/290.txt +6 -1
- data/data/geocoding/fr/352.dat +0 -0
- data/data/geocoding/fr/352.txt +0 -1
- data/data/geocoding/hy/374.dat +0 -0
- data/data/geocoding/hy/374.txt +0 -5
- data/data/geocoding/ja/81.dat +0 -0
- data/data/geocoding/ja/81.txt +9 -1
- data/data/geocoding/ru/374.dat +0 -0
- data/data/geocoding/ru/374.txt +0 -6
- data/data/geocoding/ru/7.dat +0 -0
- data/data/geocoding/ru/7.txt +92 -1
- data/data/geocoding/th/66.dat +0 -0
- data/data/geocoding/th/66.txt +4 -0
- data/data/telephone_number_data_file.dat +0 -0
- data/data/telephone_number_data_file.xml +3182 -1588
- data/data/timezones/map_data.dat +0 -0
- data/data/timezones/map_data.txt +134 -49
- data/lib/importers/geo_location_data_importer.rb +1 -1
- data/lib/telephone_number.rb +0 -1
- data/lib/telephone_number/country.rb +22 -9
- data/lib/telephone_number/version.rb +1 -1
- data/telephone_number.gemspec +1 -0
- metadata +42 -4
- data/lib/utilities/hash.rb +0 -47
data/telephone_number.gemspec
CHANGED
@@ -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.
|
4
|
+
version: 1.4.11
|
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:
|
11
|
+
date: 2021-05-14 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
|
@@ -217,6 +218,8 @@ files:
|
|
217
218
|
- data/geocoding/en/233.txt
|
218
219
|
- data/geocoding/en/234.dat
|
219
220
|
- data/geocoding/en/234.txt
|
221
|
+
- data/geocoding/en/236.dat
|
222
|
+
- data/geocoding/en/236.txt
|
220
223
|
- data/geocoding/en/237.dat
|
221
224
|
- data/geocoding/en/237.txt
|
222
225
|
- data/geocoding/en/238.dat
|
@@ -373,6 +376,12 @@ files:
|
|
373
376
|
- data/geocoding/en/58.txt
|
374
377
|
- data/geocoding/en/592.dat
|
375
378
|
- data/geocoding/en/592.txt
|
379
|
+
- data/geocoding/en/593.dat
|
380
|
+
- data/geocoding/en/593.txt
|
381
|
+
- data/geocoding/en/595.dat
|
382
|
+
- data/geocoding/en/595.txt
|
383
|
+
- data/geocoding/en/598.dat
|
384
|
+
- data/geocoding/en/598.txt
|
376
385
|
- data/geocoding/en/599.dat
|
377
386
|
- data/geocoding/en/599.txt
|
378
387
|
- data/geocoding/en/60.dat
|
@@ -381,26 +390,40 @@ files:
|
|
381
390
|
- data/geocoding/en/61.txt
|
382
391
|
- data/geocoding/en/62.dat
|
383
392
|
- data/geocoding/en/62.txt
|
393
|
+
- data/geocoding/en/63.dat
|
394
|
+
- data/geocoding/en/63.txt
|
384
395
|
- data/geocoding/en/64.dat
|
385
396
|
- data/geocoding/en/64.txt
|
386
397
|
- data/geocoding/en/66.dat
|
387
398
|
- data/geocoding/en/66.txt
|
399
|
+
- data/geocoding/en/670.dat
|
400
|
+
- data/geocoding/en/670.txt
|
401
|
+
- data/geocoding/en/672.dat
|
402
|
+
- data/geocoding/en/672.txt
|
388
403
|
- data/geocoding/en/673.dat
|
389
404
|
- data/geocoding/en/673.txt
|
390
405
|
- data/geocoding/en/675.dat
|
391
406
|
- data/geocoding/en/675.txt
|
392
407
|
- data/geocoding/en/676.dat
|
393
408
|
- data/geocoding/en/676.txt
|
409
|
+
- data/geocoding/en/678.dat
|
410
|
+
- data/geocoding/en/678.txt
|
394
411
|
- data/geocoding/en/679.dat
|
395
412
|
- data/geocoding/en/679.txt
|
396
413
|
- data/geocoding/en/680.dat
|
397
414
|
- data/geocoding/en/680.txt
|
398
415
|
- data/geocoding/en/682.dat
|
399
416
|
- data/geocoding/en/682.txt
|
417
|
+
- data/geocoding/en/685.dat
|
418
|
+
- data/geocoding/en/685.txt
|
400
419
|
- data/geocoding/en/686.dat
|
401
420
|
- data/geocoding/en/686.txt
|
402
421
|
- data/geocoding/en/688.dat
|
403
422
|
- data/geocoding/en/688.txt
|
423
|
+
- data/geocoding/en/689.dat
|
424
|
+
- data/geocoding/en/689.txt
|
425
|
+
- data/geocoding/en/690.dat
|
426
|
+
- data/geocoding/en/690.txt
|
404
427
|
- data/geocoding/en/7.dat
|
405
428
|
- data/geocoding/en/7.txt
|
406
429
|
- data/geocoding/en/81.dat
|
@@ -409,6 +432,8 @@ files:
|
|
409
432
|
- data/geocoding/en/82.txt
|
410
433
|
- data/geocoding/en/84.dat
|
411
434
|
- data/geocoding/en/84.txt
|
435
|
+
- data/geocoding/en/850.dat
|
436
|
+
- data/geocoding/en/850.txt
|
412
437
|
- data/geocoding/en/86.dat
|
413
438
|
- data/geocoding/en/86.txt
|
414
439
|
- data/geocoding/en/880.dat
|
@@ -419,6 +444,8 @@ files:
|
|
419
444
|
- data/geocoding/en/90.txt
|
420
445
|
- data/geocoding/en/91.dat
|
421
446
|
- data/geocoding/en/91.txt
|
447
|
+
- data/geocoding/en/92.dat
|
448
|
+
- data/geocoding/en/92.txt
|
422
449
|
- data/geocoding/en/93.dat
|
423
450
|
- data/geocoding/en/93.txt
|
424
451
|
- data/geocoding/en/94.dat
|
@@ -427,12 +454,20 @@ files:
|
|
427
454
|
- data/geocoding/en/95.txt
|
428
455
|
- data/geocoding/en/960.dat
|
429
456
|
- data/geocoding/en/960.txt
|
457
|
+
- data/geocoding/en/961.dat
|
458
|
+
- data/geocoding/en/961.txt
|
430
459
|
- data/geocoding/en/962.dat
|
431
460
|
- data/geocoding/en/962.txt
|
461
|
+
- data/geocoding/en/963.dat
|
462
|
+
- data/geocoding/en/963.txt
|
432
463
|
- data/geocoding/en/966.dat
|
433
464
|
- data/geocoding/en/966.txt
|
465
|
+
- data/geocoding/en/967.dat
|
466
|
+
- data/geocoding/en/967.txt
|
434
467
|
- data/geocoding/en/968.dat
|
435
468
|
- data/geocoding/en/968.txt
|
469
|
+
- data/geocoding/en/970.dat
|
470
|
+
- data/geocoding/en/970.txt
|
436
471
|
- data/geocoding/en/971.dat
|
437
472
|
- data/geocoding/en/971.txt
|
438
473
|
- data/geocoding/en/972.dat
|
@@ -445,8 +480,12 @@ files:
|
|
445
480
|
- data/geocoding/en/98.txt
|
446
481
|
- data/geocoding/en/992.dat
|
447
482
|
- data/geocoding/en/992.txt
|
483
|
+
- data/geocoding/en/993.dat
|
484
|
+
- data/geocoding/en/993.txt
|
448
485
|
- data/geocoding/en/994.dat
|
449
486
|
- data/geocoding/en/994.txt
|
487
|
+
- data/geocoding/en/995.dat
|
488
|
+
- data/geocoding/en/995.txt
|
450
489
|
- data/geocoding/en/996.dat
|
451
490
|
- data/geocoding/en/996.txt
|
452
491
|
- data/geocoding/es/228.dat
|
@@ -596,7 +635,6 @@ files:
|
|
596
635
|
- lib/telephone_number/parser.rb
|
597
636
|
- lib/telephone_number/time_zone_detector.rb
|
598
637
|
- lib/telephone_number/version.rb
|
599
|
-
- lib/utilities/hash.rb
|
600
638
|
- telephone_number.gemspec
|
601
639
|
homepage: https://github.com/mobi/telephone_number
|
602
640
|
licenses:
|
@@ -610,7 +648,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
610
648
|
requirements:
|
611
649
|
- - ">="
|
612
650
|
- !ruby/object:Gem::Version
|
613
|
-
version:
|
651
|
+
version: 2.4.0
|
614
652
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
615
653
|
requirements:
|
616
654
|
- - ">="
|
data/lib/utilities/hash.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
# Returns a new hash with +self+ and +other_hash+ merged recursively.
|
3
|
-
#
|
4
|
-
# h1 = { a: true, b: { c: [1, 2, 3] } }
|
5
|
-
# h2 = { a: false, b: { x: [3, 4, 5] } }
|
6
|
-
#
|
7
|
-
# h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } }
|
8
|
-
#
|
9
|
-
# Like with Hash#merge in the standard library, a block can be provided
|
10
|
-
# to merge values:
|
11
|
-
#
|
12
|
-
# h1 = { a: 100, b: 200, c: { c1: 100 } }
|
13
|
-
# h2 = { b: 250, c: { c1: 200 } }
|
14
|
-
# h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val }
|
15
|
-
# # => { a: 100, b: 450, c: { c1: 300 } }
|
16
|
-
def deep_deep_merge(other_hash, &block)
|
17
|
-
dup.deep_deep_merge!(other_hash, &block)
|
18
|
-
end
|
19
|
-
|
20
|
-
# Same as +deep_merge+, but modifies +self+.
|
21
|
-
def deep_deep_merge!(other_hash, &block)
|
22
|
-
other_hash.each_pair do |current_key, other_value|
|
23
|
-
this_value = self[current_key]
|
24
|
-
|
25
|
-
self[current_key] = if this_value.is_a?(Hash) && other_value.is_a?(Hash)
|
26
|
-
this_value.deep_deep_merge(other_value, &block)
|
27
|
-
else
|
28
|
-
if block_given? && key?(current_key)
|
29
|
-
block.call(current_key, this_value, other_value)
|
30
|
-
else
|
31
|
-
other_value
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
self
|
37
|
-
end
|
38
|
-
|
39
|
-
def except(*keys)
|
40
|
-
dup.except!(*keys)
|
41
|
-
end
|
42
|
-
|
43
|
-
def except!(*keys)
|
44
|
-
keys.each { |key| delete(key) }
|
45
|
-
self
|
46
|
-
end
|
47
|
-
end
|