countries 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/countries/cache/countries.json +1 -1
- data/lib/countries/data/countries/AD.yaml +5 -5
- data/lib/countries/data/countries/AE.yaml +11 -11
- data/lib/countries/data/countries/AF.yaml +7 -7
- data/lib/countries/data/countries/AG.yaml +9 -9
- data/lib/countries/data/countries/AI.yaml +9 -9
- data/lib/countries/data/countries/AL.yaml +3 -3
- data/lib/countries/data/countries/AM.yaml +5 -5
- data/lib/countries/data/countries/AO.yaml +11 -11
- data/lib/countries/data/countries/AQ.yaml +1 -1
- data/lib/countries/data/countries/AR.yaml +7 -7
- data/lib/countries/data/countries/AS.yaml +9 -9
- data/lib/countries/data/countries/AT.yaml +4 -4
- data/lib/countries/data/countries/AU.yaml +9 -9
- data/lib/countries/data/countries/AW.yaml +9 -9
- data/lib/countries/data/countries/AX.yaml +13 -13
- data/lib/countries/data/countries/AZ.yaml +7 -7
- data/lib/countries/data/countries/BA.yaml +3 -3
- data/lib/countries/data/countries/BB.yaml +9 -9
- data/lib/countries/data/countries/BD.yaml +7 -7
- data/lib/countries/data/countries/BE.yaml +5 -5
- data/lib/countries/data/countries/BF.yaml +7 -7
- data/lib/countries/data/countries/BG.yaml +5 -5
- data/lib/countries/data/countries/BH.yaml +10 -10
- data/lib/countries/data/countries/BI.yaml +3 -3
- data/lib/countries/data/countries/BJ.yaml +7 -7
- data/lib/countries/data/countries/BL.yaml +9 -9
- data/lib/countries/data/countries/BM.yaml +9 -9
- data/lib/countries/data/countries/BN.yaml +7 -7
- data/lib/countries/data/countries/BO.yaml +1 -1
- data/lib/countries/data/countries/BQ.yaml +9 -9
- data/lib/countries/data/countries/BR.yaml +7 -7
- data/lib/countries/data/countries/BS.yaml +9 -9
- data/lib/countries/data/countries/BT.yaml +3 -3
- data/lib/countries/data/countries/BV.yaml +7 -7
- data/lib/countries/data/countries/BW.yaml +5 -5
- data/lib/countries/data/countries/BY.yaml +6 -6
- data/lib/countries/data/countries/BZ.yaml +9 -9
- data/lib/countries/data/countries/CA.yaml +5 -5
- data/lib/countries/data/countries/CC.yaml +10 -10
- data/lib/countries/data/countries/CD.yaml +9 -2
- data/lib/countries/data/countries/CF.yaml +5 -5
- data/lib/countries/data/countries/CG.yaml +7 -7
- data/lib/countries/data/countries/CH.yaml +7 -7
- data/lib/countries/data/countries/CI.yaml +7 -7
- data/lib/countries/data/countries/CK.yaml +10 -10
- data/lib/countries/data/countries/CL.yaml +9 -9
- data/lib/countries/data/countries/CM.yaml +5 -5
- data/lib/countries/data/countries/CN.yaml +7 -7
- data/lib/countries/data/countries/CO.yaml +7 -7
- data/lib/countries/data/countries/CR.yaml +7 -7
- data/lib/countries/data/countries/CU.yaml +9 -9
- data/lib/countries/data/countries/CV.yaml +10 -10
- data/lib/countries/data/countries/CW.yaml +9 -9
- data/lib/countries/data/countries/CX.yaml +7 -7
- data/lib/countries/data/countries/CY.yaml +9 -9
- data/lib/countries/data/countries/CZ.yaml +3 -3
- data/lib/countries/data/countries/DE.yaml +5 -5
- data/lib/countries/data/countries/DJ.yaml +8 -8
- data/lib/countries/data/countries/DK.yaml +9 -9
- data/lib/countries/data/countries/DM.yaml +9 -9
- data/lib/countries/data/countries/DO.yaml +9 -9
- data/lib/countries/data/countries/DZ.yaml +4 -4
- data/lib/countries/data/countries/EC.yaml +10 -10
- data/lib/countries/data/countries/EE.yaml +9 -9
- data/lib/countries/data/countries/EG.yaml +8 -8
- data/lib/countries/data/countries/EH.yaml +8 -8
- data/lib/countries/data/countries/ER.yaml +7 -7
- data/lib/countries/data/countries/ES.yaml +9 -9
- data/lib/countries/data/countries/ET.yaml +9 -9
- data/lib/countries/data/countries/FI.yaml +7 -7
- data/lib/countries/data/countries/FJ.yaml +9 -9
- data/lib/countries/data/countries/FK.yaml +10 -10
- data/lib/countries/data/countries/FM.yaml +14 -7
- data/lib/countries/data/countries/FO.yaml +10 -10
- data/lib/countries/data/countries/FR.yaml +9 -9
- data/lib/countries/data/countries/GA.yaml +9 -9
- data/lib/countries/data/countries/GB.yaml +7 -7
- data/lib/countries/data/countries/GD.yaml +9 -9
- data/lib/countries/data/countries/GE.yaml +11 -11
- data/lib/countries/data/countries/GF.yaml +7 -7
- data/lib/countries/data/countries/GG.yaml +9 -9
- data/lib/countries/data/countries/GH.yaml +9 -9
- data/lib/countries/data/countries/GI.yaml +9 -9
- data/lib/countries/data/countries/GL.yaml +9 -9
- data/lib/countries/data/countries/GM.yaml +7 -7
- data/lib/countries/data/countries/GN.yaml +5 -5
- data/lib/countries/data/countries/GP.yaml +9 -9
- data/lib/countries/data/countries/GQ.yaml +8 -8
- data/lib/countries/data/countries/GR.yaml +7 -7
- data/lib/countries/data/countries/GS.yaml +9 -9
- data/lib/countries/data/countries/GT.yaml +9 -9
- data/lib/countries/data/countries/GU.yaml +9 -9
- data/lib/countries/data/countries/GW.yaml +7 -7
- data/lib/countries/data/countries/GY.yaml +7 -7
- data/lib/countries/data/countries/HK.yaml +7 -7
- data/lib/countries/data/countries/HM.yaml +12 -5
- data/lib/countries/data/countries/HN.yaml +9 -9
- data/lib/countries/data/countries/HR.yaml +7 -7
- data/lib/countries/data/countries/HT.yaml +7 -7
- data/lib/countries/data/countries/HU.yaml +5 -5
- data/lib/countries/data/countries/ID.yaml +9 -9
- data/lib/countries/data/countries/IE.yaml +9 -9
- data/lib/countries/data/countries/IL.yaml +7 -7
- data/lib/countries/data/countries/IM.yaml +8 -8
- data/lib/countries/data/countries/IN.yaml +7 -7
- data/lib/countries/data/countries/IO.yaml +11 -11
- data/lib/countries/data/countries/IQ.yaml +6 -6
- data/lib/countries/data/countries/IR.yaml +11 -11
- data/lib/countries/data/countries/IS.yaml +9 -9
- data/lib/countries/data/countries/IT.yaml +7 -7
- data/lib/countries/data/countries/JE.yaml +9 -9
- data/lib/countries/data/countries/JM.yaml +9 -9
- data/lib/countries/data/countries/JO.yaml +4 -4
- data/lib/countries/data/countries/JP.yaml +9 -9
- data/lib/countries/data/countries/KE.yaml +3 -3
- data/lib/countries/data/countries/KG.yaml +3 -3
- data/lib/countries/data/countries/KH.yaml +7 -7
- data/lib/countries/data/countries/KI.yaml +9 -9
- data/lib/countries/data/countries/KM.yaml +9 -9
- data/lib/countries/data/countries/KN.yaml +9 -9
- data/lib/countries/data/countries/KP.yaml +12 -5
- data/lib/countries/data/countries/KR.yaml +11 -11
- data/lib/countries/data/countries/KW.yaml +6 -6
- data/lib/countries/data/countries/KY.yaml +10 -10
- data/lib/countries/data/countries/KZ.yaml +7 -7
- data/lib/countries/data/countries/LA.yaml +7 -7
- data/lib/countries/data/countries/LB.yaml +4 -4
- data/lib/countries/data/countries/LC.yaml +9 -9
- data/lib/countries/data/countries/LI.yaml +3 -3
- data/lib/countries/data/countries/LK.yaml +9 -9
- data/lib/countries/data/countries/LR.yaml +7 -7
- data/lib/countries/data/countries/LS.yaml +3 -3
- data/lib/countries/data/countries/LT.yaml +6 -6
- data/lib/countries/data/countries/LU.yaml +3 -3
- data/lib/countries/data/countries/LV.yaml +3 -3
- data/lib/countries/data/countries/LY.yaml +6 -6
- data/lib/countries/data/countries/MA.yaml +8 -8
- data/lib/countries/data/countries/MC.yaml +5 -5
- data/lib/countries/data/countries/MD.yaml +11 -11
- data/lib/countries/data/countries/ME.yaml +5 -5
- data/lib/countries/data/countries/MF.yaml +9 -9
- data/lib/countries/data/countries/MG.yaml +9 -9
- data/lib/countries/data/countries/MH.yaml +11 -11
- data/lib/countries/data/countries/MK.yaml +10 -3
- data/lib/countries/data/countries/ML.yaml +7 -7
- data/lib/countries/data/countries/MM.yaml +7 -7
- data/lib/countries/data/countries/MN.yaml +7 -7
- data/lib/countries/data/countries/MO.yaml +7 -7
- data/lib/countries/data/countries/MP.yaml +9 -9
- data/lib/countries/data/countries/MQ.yaml +9 -9
- data/lib/countries/data/countries/MR.yaml +4 -4
- data/lib/countries/data/countries/MS.yaml +9 -9
- data/lib/countries/data/countries/MT.yaml +9 -9
- data/lib/countries/data/countries/MU.yaml +10 -10
- data/lib/countries/data/countries/MV.yaml +11 -11
- data/lib/countries/data/countries/MW.yaml +3 -3
- data/lib/countries/data/countries/MX.yaml +7 -7
- data/lib/countries/data/countries/MY.yaml +7 -7
- data/lib/countries/data/countries/MZ.yaml +9 -9
- data/lib/countries/data/countries/NA.yaml +5 -5
- data/lib/countries/data/countries/NC.yaml +9 -9
- data/lib/countries/data/countries/NE.yaml +5 -5
- data/lib/countries/data/countries/NF.yaml +10 -10
- data/lib/countries/data/countries/NG.yaml +5 -5
- data/lib/countries/data/countries/NI.yaml +9 -9
- data/lib/countries/data/countries/NL.yaml +9 -9
- data/lib/countries/data/countries/NO.yaml +9 -9
- data/lib/countries/data/countries/NP.yaml +1 -1
- data/lib/countries/data/countries/NR.yaml +9 -9
- data/lib/countries/data/countries/NU.yaml +9 -9
- data/lib/countries/data/countries/NZ.yaml +9 -9
- data/lib/countries/data/countries/OM.yaml +10 -10
- data/lib/countries/data/countries/PA.yaml +7 -7
- data/lib/countries/data/countries/PE.yaml +5 -5
- data/lib/countries/data/countries/PF.yaml +9 -9
- data/lib/countries/data/countries/PG.yaml +7 -7
- data/lib/countries/data/countries/PH.yaml +9 -9
- data/lib/countries/data/countries/PK.yaml +7 -7
- data/lib/countries/data/countries/PL.yaml +7 -7
- data/lib/countries/data/countries/PM.yaml +9 -9
- data/lib/countries/data/countries/PN.yaml +9 -9
- data/lib/countries/data/countries/PR.yaml +9 -9
- data/lib/countries/data/countries/PS.yaml +12 -12
- data/lib/countries/data/countries/PT.yaml +7 -7
- data/lib/countries/data/countries/PW.yaml +9 -9
- data/lib/countries/data/countries/PY.yaml +5 -5
- data/lib/countries/data/countries/QA.yaml +8 -8
- data/lib/countries/data/countries/RE.yaml +9 -9
- data/lib/countries/data/countries/RO.yaml +7 -7
- data/lib/countries/data/countries/RS.yaml +3 -3
- data/lib/countries/data/countries/RU.yaml +9 -9
- data/lib/countries/data/countries/RW.yaml +3 -3
- data/lib/countries/data/countries/SA.yaml +8 -8
- data/lib/countries/data/countries/SB.yaml +10 -10
- data/lib/countries/data/countries/SC.yaml +9 -9
- data/lib/countries/data/countries/SD.yaml +6 -6
- data/lib/countries/data/countries/SE.yaml +1 -1
- data/lib/countries/data/countries/SG.yaml +9 -9
- data/lib/countries/data/countries/SH.yaml +11 -11
- data/lib/countries/data/countries/SI.yaml +7 -7
- data/lib/countries/data/countries/SJ.yaml +10 -10
- data/lib/countries/data/countries/SK.yaml +3 -3
- data/lib/countries/data/countries/SL.yaml +9 -9
- data/lib/countries/data/countries/SM.yaml +3 -3
- data/lib/countries/data/countries/SN.yaml +5 -5
- data/lib/countries/data/countries/SO.yaml +8 -8
- data/lib/countries/data/countries/SR.yaml +9 -9
- data/lib/countries/data/countries/SS.yaml +7 -7
- data/lib/countries/data/countries/ST.yaml +9 -9
- data/lib/countries/data/countries/SV.yaml +9 -9
- data/lib/countries/data/countries/SX.yaml +7 -7
- data/lib/countries/data/countries/SY.yaml +5 -5
- data/lib/countries/data/countries/SZ.yaml +5 -5
- data/lib/countries/data/countries/TC.yaml +10 -10
- data/lib/countries/data/countries/TD.yaml +8 -8
- data/lib/countries/data/countries/TF.yaml +9 -9
- data/lib/countries/data/countries/TG.yaml +5 -5
- data/lib/countries/data/countries/TH.yaml +9 -9
- data/lib/countries/data/countries/TJ.yaml +7 -7
- data/lib/countries/data/countries/TK.yaml +10 -10
- data/lib/countries/data/countries/TL.yaml +9 -9
- data/lib/countries/data/countries/TM.yaml +9 -9
- data/lib/countries/data/countries/TN.yaml +6 -6
- data/lib/countries/data/countries/TO.yaml +9 -9
- data/lib/countries/data/countries/TR.yaml +5 -5
- data/lib/countries/data/countries/TT.yaml +9 -9
- data/lib/countries/data/countries/TV.yaml +10 -10
- data/lib/countries/data/countries/TW.yaml +9 -9
- data/lib/countries/data/countries/TZ.yaml +11 -4
- data/lib/countries/data/countries/UA.yaml +8 -8
- data/lib/countries/data/countries/UG.yaml +7 -7
- data/lib/countries/data/countries/UM.yaml +3 -3
- data/lib/countries/data/countries/US.yaml +10 -10
- data/lib/countries/data/countries/UY.yaml +7 -7
- data/lib/countries/data/countries/UZ.yaml +5 -5
- data/lib/countries/data/countries/VA.yaml +14 -7
- data/lib/countries/data/countries/VC.yaml +10 -10
- data/lib/countries/data/countries/VE.yaml +11 -11
- data/lib/countries/data/countries/VG.yaml +13 -6
- data/lib/countries/data/countries/VI.yaml +10 -10
- data/lib/countries/data/countries/VN.yaml +5 -5
- data/lib/countries/data/countries/VU.yaml +9 -9
- data/lib/countries/data/countries/WF.yaml +9 -9
- data/lib/countries/data/countries/WS.yaml +9 -9
- data/lib/countries/data/countries/YE.yaml +10 -10
- data/lib/countries/data/countries/YT.yaml +9 -9
- data/lib/countries/data/countries/ZA.yaml +7 -7
- data/lib/countries/data/countries/ZM.yaml +5 -5
- data/lib/countries/data/countries/ZW.yaml +3 -3
- data/lib/countries/tasks/geocoding.rake +10 -1
- data/lib/countries/version.rb +1 -1
- data/spec/country_spec.rb +1 -1
- metadata +2 -2
@@ -27,7 +27,7 @@ ZW:
|
|
27
27
|
- Zimbabwe
|
28
28
|
- Simbabwe
|
29
29
|
- Zimbabue
|
30
|
-
-
|
30
|
+
- ジンバブエ
|
31
31
|
languages_official:
|
32
32
|
- en
|
33
33
|
- sn
|
@@ -41,13 +41,13 @@ ZW:
|
|
41
41
|
latitude_dec: "-19.000280380249023"
|
42
42
|
longitude: 29.154857
|
43
43
|
longitude_dec: '29.86876106262207'
|
44
|
-
max_latitude: -15.
|
44
|
+
max_latitude: -15.609319
|
45
45
|
max_longitude: 33.068236
|
46
46
|
min_latitude: -22.4223538
|
47
47
|
min_longitude: 25.237368
|
48
48
|
bounds:
|
49
49
|
northeast:
|
50
|
-
lat: -15.
|
50
|
+
lat: -15.609319
|
51
51
|
lng: 33.068236
|
52
52
|
southwest:
|
53
53
|
lat: -22.4223538
|
@@ -1,5 +1,10 @@
|
|
1
1
|
require 'geocoder'
|
2
2
|
require 'retryable'
|
3
|
+
|
4
|
+
Geocoder.configure(
|
5
|
+
timeout: 10
|
6
|
+
)
|
7
|
+
|
3
8
|
# raise on geocoding errors such as query limit exceeded
|
4
9
|
Geocoder.configure(always_raise: :all)
|
5
10
|
# Try to geocode a given query, on exceptions it retries up to 3 times then gives up.
|
@@ -36,8 +41,12 @@ namespace :geocode do
|
|
36
41
|
# Load unmutated yaml file.
|
37
42
|
data = load_country_yaml(country.alpha2)
|
38
43
|
|
39
|
-
|
44
|
+
lookup = "#{country.alpha2} country"
|
45
|
+
# LU country lookup appears to match to Los Angeles
|
46
|
+
lookup = country.name if country.alpha2 == 'LU'
|
40
47
|
|
48
|
+
next unless (result = geocode(lookup))
|
49
|
+
puts 'WARNING:: Geocoder returned something that was not a country' unless result.types.include?('country')
|
41
50
|
geometry = result.geometry
|
42
51
|
|
43
52
|
# Extract center point data
|
data/lib/countries/version.rb
CHANGED
data/spec/country_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: countries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Robinson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-11-
|
13
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n_data
|