countries 5.4.0 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (250) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +61 -0
  3. data/.github/workflows/tests.yml +4 -0
  4. data/.gitignore +0 -1
  5. data/.rubocop.yml +17 -8
  6. data/CHANGELOG.md +8 -0
  7. data/Gemfile +1 -2
  8. data/Gemfile.lock +84 -0
  9. data/README.md +41 -1
  10. data/Rakefile +2 -3
  11. data/countries.gemspec +1 -1
  12. data/lib/countries/cache/countries.json +1 -1
  13. data/lib/countries/country/class_methods.rb +22 -3
  14. data/lib/countries/country/country_subdivision_methods.rb +82 -0
  15. data/lib/countries/country/currency_methods.rb +0 -1
  16. data/lib/countries/country/finder_methods.rb +2 -4
  17. data/lib/countries/country.rb +13 -53
  18. data/lib/countries/data/countries/AR.yaml +1 -0
  19. data/lib/countries/data/countries/AU.yaml +1 -0
  20. data/lib/countries/data/countries/BR.yaml +1 -0
  21. data/lib/countries/data/countries/CA.yaml +2 -0
  22. data/lib/countries/data/countries/CN.yaml +1 -0
  23. data/lib/countries/data/countries/DE.yaml +2 -0
  24. data/lib/countries/data/countries/FR.yaml +2 -0
  25. data/lib/countries/data/countries/GB.yaml +2 -0
  26. data/lib/countries/data/countries/ID.yaml +1 -0
  27. data/lib/countries/data/countries/IN.yaml +1 -0
  28. data/lib/countries/data/countries/IT.yaml +2 -0
  29. data/lib/countries/data/countries/JP.yaml +2 -0
  30. data/lib/countries/data/countries/KR.yaml +1 -0
  31. data/lib/countries/data/countries/MX.yaml +1 -0
  32. data/lib/countries/data/countries/RU.yaml +1 -0
  33. data/lib/countries/data/countries/SA.yaml +1 -0
  34. data/lib/countries/data/countries/TR.yaml +1 -0
  35. data/lib/countries/data/countries/US.yaml +2 -0
  36. data/lib/countries/data/countries/ZA.yaml +1 -0
  37. data/lib/countries/data/locales_methods.rb +23 -0
  38. data/lib/countries/data/subdivision_methods.rb +30 -0
  39. data/lib/countries/data/subdivisions/AD.yaml +7 -0
  40. data/lib/countries/data/subdivisions/AE.yaml +18 -0
  41. data/lib/countries/data/subdivisions/AF.yaml +167 -2
  42. data/lib/countries/data/subdivisions/AG.yaml +9 -0
  43. data/lib/countries/data/subdivisions/AL.yaml +57 -0
  44. data/lib/countries/data/subdivisions/AM.yaml +34 -0
  45. data/lib/countries/data/subdivisions/AO.yaml +36 -0
  46. data/lib/countries/data/subdivisions/AR.yaml +46 -0
  47. data/lib/countries/data/subdivisions/AT.yaml +28 -0
  48. data/lib/countries/data/subdivisions/AU.yaml +29 -0
  49. data/lib/countries/data/subdivisions/AZ.yaml +239 -0
  50. data/lib/countries/data/subdivisions/BA.yaml +5 -0
  51. data/lib/countries/data/subdivisions/BB.yaml +4 -0
  52. data/lib/countries/data/subdivisions/BD.yaml +139 -0
  53. data/lib/countries/data/subdivisions/BE.yaml +34 -0
  54. data/lib/countries/data/subdivisions/BF.yaml +56 -0
  55. data/lib/countries/data/subdivisions/BG.yaml +30 -0
  56. data/lib/countries/data/subdivisions/BH.yaml +13 -0
  57. data/lib/countries/data/subdivisions/BI.yaml +54 -0
  58. data/lib/countries/data/subdivisions/BJ.yaml +22 -0
  59. data/lib/countries/data/subdivisions/BN.yaml +9 -0
  60. data/lib/countries/data/subdivisions/BO.yaml +35 -0
  61. data/lib/countries/data/subdivisions/BQ.yaml +4 -0
  62. data/lib/countries/data/subdivisions/BR.yaml +14 -0
  63. data/lib/countries/data/subdivisions/BS.yaml +24 -0
  64. data/lib/countries/data/subdivisions/BT.yaml +24 -0
  65. data/lib/countries/data/subdivisions/BW.yaml +24 -0
  66. data/lib/countries/data/subdivisions/BY.yaml +5 -0
  67. data/lib/countries/data/subdivisions/BZ.yaml +3 -0
  68. data/lib/countries/data/subdivisions/CA.yaml +24 -0
  69. data/lib/countries/data/subdivisions/CD.yaml +77 -0
  70. data/lib/countries/data/subdivisions/CF.yaml +15 -0
  71. data/lib/countries/data/subdivisions/CG.yaml +18 -0
  72. data/lib/countries/data/subdivisions/CH.yaml +92 -0
  73. data/lib/countries/data/subdivisions/CI.yaml +65 -0
  74. data/lib/countries/data/subdivisions/CL.yaml +45 -2
  75. data/lib/countries/data/subdivisions/CM.yaml +22 -0
  76. data/lib/countries/data/subdivisions/CN.yaml +98 -0
  77. data/lib/countries/data/subdivisions/CO.yaml +68 -0
  78. data/lib/countries/data/subdivisions/CR.yaml +14 -0
  79. data/lib/countries/data/subdivisions/CU.yaml +42 -0
  80. data/lib/countries/data/subdivisions/CV.yaml +32 -0
  81. data/lib/countries/data/subdivisions/CY.yaml +18 -0
  82. data/lib/countries/data/subdivisions/CZ.yaml +227 -0
  83. data/lib/countries/data/subdivisions/DE.yaml +31 -0
  84. data/lib/countries/data/subdivisions/DJ.yaml +16 -0
  85. data/lib/countries/data/subdivisions/DK.yaml +13 -0
  86. data/lib/countries/data/subdivisions/DM.yaml +1 -0
  87. data/lib/countries/data/subdivisions/DO.yaml +102 -0
  88. data/lib/countries/data/subdivisions/DZ.yaml +104 -0
  89. data/lib/countries/data/subdivisions/EC.yaml +72 -0
  90. data/lib/countries/data/subdivisions/EE.yaml +6 -0
  91. data/lib/countries/data/subdivisions/EG.yaml +54 -0
  92. data/lib/countries/data/subdivisions/ER.yaml +2 -0
  93. data/lib/countries/data/subdivisions/ES.yaml +252 -0
  94. data/lib/countries/data/subdivisions/ET.yaml +27 -0
  95. data/lib/countries/data/subdivisions/FI.yaml +78 -0
  96. data/lib/countries/data/subdivisions/FJ.yaml +30 -0
  97. data/lib/countries/data/subdivisions/FM.yaml +11 -0
  98. data/lib/countries/data/subdivisions/FR.yaml +332 -1
  99. data/lib/countries/data/subdivisions/GA.yaml +24 -0
  100. data/lib/countries/data/subdivisions/GB.yaml +488 -0
  101. data/lib/countries/data/subdivisions/GD.yaml +10 -0
  102. data/lib/countries/data/subdivisions/GE.yaml +34 -0
  103. data/lib/countries/data/subdivisions/GH.yaml +79 -0
  104. data/lib/countries/data/subdivisions/GL.yaml +58 -0
  105. data/lib/countries/data/subdivisions/GM.yaml +10 -0
  106. data/lib/countries/data/subdivisions/GN.yaml +65 -0
  107. data/lib/countries/data/subdivisions/GQ.yaml +36 -0
  108. data/lib/countries/data/subdivisions/GR.yaml +41 -0
  109. data/lib/countries/data/subdivisions/GW.yaml +24 -0
  110. data/lib/countries/data/subdivisions/GY.yaml +31 -0
  111. data/lib/countries/data/subdivisions/HN.yaml +21 -0
  112. data/lib/countries/data/subdivisions/HR.yaml +82 -0
  113. data/lib/countries/data/subdivisions/HT.yaml +14 -0
  114. data/lib/countries/data/subdivisions/HU.yaml +94 -0
  115. data/lib/countries/data/subdivisions/ID.yaml +99 -0
  116. data/lib/countries/data/subdivisions/IE.yaml +39 -0
  117. data/lib/countries/data/subdivisions/IL.yaml +15 -0
  118. data/lib/countries/data/subdivisions/IN.yaml +210 -0
  119. data/lib/countries/data/subdivisions/IQ.yaml +59 -0
  120. data/lib/countries/data/subdivisions/IR.yaml +2 -0
  121. data/lib/countries/data/subdivisions/IS.yaml +560 -0
  122. data/lib/countries/data/subdivisions/IT.yaml +321 -0
  123. data/lib/countries/data/subdivisions/JM.yaml +22 -0
  124. data/lib/countries/data/subdivisions/JO.yaml +16 -0
  125. data/lib/countries/data/subdivisions/JP.yaml +42 -0
  126. data/lib/countries/data/subdivisions/KE.yaml +298 -0
  127. data/lib/countries/data/subdivisions/KG.yaml +28 -0
  128. data/lib/countries/data/subdivisions/KH.yaml +108 -0
  129. data/lib/countries/data/subdivisions/KI.yaml +6 -0
  130. data/lib/countries/data/subdivisions/KM.yaml +4 -0
  131. data/lib/countries/data/subdivisions/KN.yaml +6 -0
  132. data/lib/countries/data/subdivisions/KP.yaml +42 -0
  133. data/lib/countries/data/subdivisions/KR.yaml +36 -0
  134. data/lib/countries/data/subdivisions/KW.yaml +5 -0
  135. data/lib/countries/data/subdivisions/KZ.yaml +113 -0
  136. data/lib/countries/data/subdivisions/LA.yaml +49 -0
  137. data/lib/countries/data/subdivisions/LB.yaml +28 -0
  138. data/lib/countries/data/subdivisions/LC.yaml +6 -0
  139. data/lib/countries/data/subdivisions/LI.yaml +37 -0
  140. data/lib/countries/data/subdivisions/LK.yaml +67 -0
  141. data/lib/countries/data/subdivisions/LR.yaml +16 -0
  142. data/lib/countries/data/subdivisions/LS.yaml +23 -0
  143. data/lib/countries/data/subdivisions/LT.yaml +315 -0
  144. data/lib/countries/data/subdivisions/LU.yaml +31 -0
  145. data/lib/countries/data/subdivisions/LV.yaml +83 -0
  146. data/lib/countries/data/subdivisions/LY.yaml +16 -0
  147. data/lib/countries/data/subdivisions/MA.yaml +827 -12
  148. data/lib/countries/data/subdivisions/MC.yaml +47 -0
  149. data/lib/countries/data/subdivisions/MD.yaml +41 -0
  150. data/lib/countries/data/subdivisions/ME.yaml +83 -0
  151. data/lib/countries/data/subdivisions/MG.yaml +21 -0
  152. data/lib/countries/data/subdivisions/MH.yaml +70 -0
  153. data/lib/countries/data/subdivisions/MK.yaml +505 -0
  154. data/lib/countries/data/subdivisions/ML.yaml +33 -0
  155. data/lib/countries/data/subdivisions/MM.yaml +51 -0
  156. data/lib/countries/data/subdivisions/MN.yaml +94 -0
  157. data/lib/countries/data/subdivisions/MR.yaml +32 -0
  158. data/lib/countries/data/subdivisions/MT.yaml +126 -0
  159. data/lib/countries/data/subdivisions/MU.yaml +21 -0
  160. data/lib/countries/data/subdivisions/MV.yaml +20 -0
  161. data/lib/countries/data/subdivisions/MW.yaml +52 -0
  162. data/lib/countries/data/subdivisions/MX.yaml +23 -0
  163. data/lib/countries/data/subdivisions/MY.yaml +24 -0
  164. data/lib/countries/data/subdivisions/MZ.yaml +20 -0
  165. data/lib/countries/data/subdivisions/NA.yaml +28 -0
  166. data/lib/countries/data/subdivisions/NE.yaml +9 -0
  167. data/lib/countries/data/subdivisions/NG.yaml +89 -0
  168. data/lib/countries/data/subdivisions/NI.yaml +25 -0
  169. data/lib/countries/data/subdivisions/NL.yaml +24 -0
  170. data/lib/countries/data/subdivisions/NO.yaml +138 -1
  171. data/lib/countries/data/subdivisions/NP.yaml +9 -0
  172. data/lib/countries/data/subdivisions/NR.yaml +19 -0
  173. data/lib/countries/data/subdivisions/NZ.yaml +34 -0
  174. data/lib/countries/data/subdivisions/OM.yaml +10 -0
  175. data/lib/countries/data/subdivisions/PA.yaml +27 -0
  176. data/lib/countries/data/subdivisions/PE.yaml +24 -0
  177. data/lib/countries/data/subdivisions/PG.yaml +46 -0
  178. data/lib/countries/data/subdivisions/PH.yaml +293 -0
  179. data/lib/countries/data/subdivisions/PK.yaml +22 -0
  180. data/lib/countries/data/subdivisions/PL.yaml +141 -0
  181. data/lib/countries/data/subdivisions/PS.yaml +41 -0
  182. data/lib/countries/data/subdivisions/PT.yaml +36 -0
  183. data/lib/countries/data/subdivisions/PW.yaml +24 -0
  184. data/lib/countries/data/subdivisions/PY.yaml +21 -0
  185. data/lib/countries/data/subdivisions/QA.yaml +26 -0
  186. data/lib/countries/data/subdivisions/RO.yaml +189 -0
  187. data/lib/countries/data/subdivisions/RS.yaml +112 -0
  188. data/lib/countries/data/subdivisions/RU.yaml +123 -0
  189. data/lib/countries/data/subdivisions/RW.yaml +7 -0
  190. data/lib/countries/data/subdivisions/SA.yaml +38 -0
  191. data/lib/countries/data/subdivisions/SB.yaml +11 -0
  192. data/lib/countries/data/subdivisions/SC.yaml +45 -0
  193. data/lib/countries/data/subdivisions/SD.yaml +15 -0
  194. data/lib/countries/data/subdivisions/SE.yaml +42 -0
  195. data/lib/countries/data/subdivisions/SG.yaml +8 -0
  196. data/lib/countries/data/subdivisions/SH.yaml +6 -0
  197. data/lib/countries/data/subdivisions/SI.yaml +735 -0
  198. data/lib/countries/data/subdivisions/SK.yaml +22 -0
  199. data/lib/countries/data/subdivisions/SL.yaml +7 -0
  200. data/lib/countries/data/subdivisions/SM.yaml +19 -0
  201. data/lib/countries/data/subdivisions/SN.yaml +43 -0
  202. data/lib/countries/data/subdivisions/SO.yaml +71 -0
  203. data/lib/countries/data/subdivisions/SR.yaml +17 -0
  204. data/lib/countries/data/subdivisions/SS.yaml +4 -0
  205. data/lib/countries/data/subdivisions/ST.yaml +127 -0
  206. data/lib/countries/data/subdivisions/SV.yaml +20 -0
  207. data/lib/countries/data/subdivisions/SY.yaml +53 -0
  208. data/lib/countries/data/subdivisions/SZ.yaml +18 -0
  209. data/lib/countries/data/subdivisions/TD.yaml +51 -0
  210. data/lib/countries/data/subdivisions/TG.yaml +13 -0
  211. data/lib/countries/data/subdivisions/TH.yaml +231 -0
  212. data/lib/countries/data/subdivisions/TJ.yaml +15 -0
  213. data/lib/countries/data/subdivisions/TL.yaml +38 -0
  214. data/lib/countries/data/subdivisions/TM.yaml +15 -0
  215. data/lib/countries/data/subdivisions/TN.yaml +25 -0
  216. data/lib/countries/data/subdivisions/TO.yaml +1 -0
  217. data/lib/countries/data/subdivisions/TR.yaml +93 -0
  218. data/lib/countries/data/subdivisions/TT.yaml +25 -0
  219. data/lib/countries/data/subdivisions/TV.yaml +25 -0
  220. data/lib/countries/data/subdivisions/TW.yaml +106 -0
  221. data/lib/countries/data/subdivisions/TZ.yaml +38 -0
  222. data/lib/countries/data/subdivisions/UA.yaml +86 -4
  223. data/lib/countries/data/subdivisions/UG.yaml +262 -0
  224. data/lib/countries/data/subdivisions/UM.yaml +4 -0
  225. data/lib/countries/data/subdivisions/US.yaml +118 -0
  226. data/lib/countries/data/subdivisions/UY.yaml +27 -0
  227. data/lib/countries/data/subdivisions/UZ.yaml +65 -0
  228. data/lib/countries/data/subdivisions/VC.yaml +6 -0
  229. data/lib/countries/data/subdivisions/VE.yaml +33 -0
  230. data/lib/countries/data/subdivisions/VN.yaml +131 -0
  231. data/lib/countries/data/subdivisions/VU.yaml +8 -0
  232. data/lib/countries/data/subdivisions/WS.yaml +18 -0
  233. data/lib/countries/data/subdivisions/YE.yaml +16 -0
  234. data/lib/countries/data/subdivisions/ZA.yaml +5 -0
  235. data/lib/countries/data/subdivisions/ZM.yaml +24 -0
  236. data/lib/countries/data/subdivisions/ZW.yaml +21 -0
  237. data/lib/countries/data.rb +19 -50
  238. data/lib/countries/global.rb +0 -1
  239. data/lib/countries/iso3166.rb +3 -0
  240. data/lib/countries/sources/cldr/subdivision.rb +1 -1
  241. data/lib/countries/subdivision.rb +5 -0
  242. data/lib/countries/tasks/postal_codes.rake +5 -1
  243. data/lib/countries/version.rb +1 -1
  244. data/spec/country_spec.rb +118 -22
  245. data/spec/data_spec.rb +12 -8
  246. data/spec/spec_helper.rb +4 -0
  247. data/spec/subdivision_spec.rb +8 -0
  248. metadata +23 -16
  249. data/.rubocop_todo.yml +0 -19
  250. data/lib/countries/tasks/geocoding.rake +0 -106
@@ -60,6 +60,9 @@
60
60
  ccp: "\U00011103\U0001112C\U0001110C\U00011134\U00011111\U0001112A\U00011120\U00011122\U00011134"
61
61
  yue: 河口省
62
62
  'no': Estuaire
63
+ cy: Talaith Estuaire
64
+ fa: استان استیوایر
65
+ zu: Estuaire Province
63
66
  comments:
64
67
  type: province
65
68
  '2':
@@ -122,6 +125,9 @@
122
125
  uk: Провінція Верхнє Огове
123
126
  yue: 上奧果韋省
124
127
  'no': Haut-Ogooué
128
+ cy: Talaith Haut-Ogooué
129
+ fa: استان هاوت اوگوئه
130
+ he: אוט-אוגואה
125
131
  comments:
126
132
  type: province
127
133
  '3':
@@ -183,6 +189,8 @@
183
189
  uk: Провінція Середнє Огове
184
190
  yue: 中奧果韋省
185
191
  'no': Moyen-Ogooué
192
+ cy: Talaith Moyen-Ogooué
193
+ fa: استان مویان-اوگوئه
186
194
  comments:
187
195
  type: province
188
196
  '4':
@@ -245,6 +253,8 @@
245
253
  uk: Провінція Нгуньє
246
254
  yue: 恩古涅省
247
255
  'no': Ngounié
256
+ cy: Talaith Ngounié
257
+ he: מחוז נגוני
248
258
  comments:
249
259
  type: province
250
260
  '5':
@@ -306,6 +316,9 @@
306
316
  uk: Провінція Ньянга
307
317
  yue: 尼揚加省
308
318
  'no': Nyanga
319
+ cy: Talaith Nyanga
320
+ fa: استان نیانگا
321
+ he: מחוז ניאנגה
309
322
  comments:
310
323
  type: province
311
324
  '6':
@@ -367,6 +380,9 @@
367
380
  uk: Провінція Огове-Івіндо
368
381
  yue: 奧果韋-伊溫多省
369
382
  'no': Ogooué-Ivindo
383
+ cy: Talaith Ogooué-Ivindo
384
+ fa: استان اوگوئه-ایویندو
385
+ he: אוגואה-איווינדו
370
386
  comments:
371
387
  type: province
372
388
  '7':
@@ -428,6 +444,10 @@
428
444
  uk: Провінція Огове-Лоло
429
445
  yue: 奧果韋-洛洛省
430
446
  'no': Ogooué-Lolo
447
+ cy: Talaith Ogooué-Lolo
448
+ fa: استان اوگوئه-لولو
449
+ he: אוגואה-לולו
450
+ hy: Օգուվե-Լոլո
431
451
  comments:
432
452
  type: province
433
453
  '8':
@@ -490,6 +510,8 @@
490
510
  uk: Провінція Огове-Марітім
491
511
  yue: 濱海奧果韋省
492
512
  'no': Ogooué-Maritime
513
+ cy: Talaith Ogooué-Maritime
514
+ fa: استان اوگوئه-مارتینتایم
493
515
  comments:
494
516
  type: province
495
517
  '9':
@@ -552,5 +574,7 @@
552
574
  ccp: "\U00011124\U00011123\U00011128\U00011105\U0001112A-\U00011111\U0001112C\U0001111F\U00011134"
553
575
  yue: 禾勒-恩特姆省
554
576
  'no': Woleu-Ntem
577
+ cy: Talaith Woleu-Ntem
578
+ he: וולו-נטם
555
579
  comments:
556
580
  type: province