countries 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/tests.yml +5 -3
  3. data/CHANGELOG.md +34 -2
  4. data/README.markdown +7 -0
  5. data/lib/countries/cache/countries.json +1 -1
  6. data/lib/countries/cache/locales/tk.json +1 -1
  7. data/lib/countries/configuration.rb +1 -1
  8. data/lib/countries/country.rb +6 -0
  9. data/lib/countries/data/countries/HR.yaml +1 -1
  10. data/lib/countries/data/countries/TM.yaml +1 -1
  11. data/lib/countries/data/subdivisions/AE.yaml +6 -0
  12. data/lib/countries/data/subdivisions/AF.yaml +34 -0
  13. data/lib/countries/data/subdivisions/AG.yaml +8 -0
  14. data/lib/countries/data/subdivisions/AL.yaml +12 -0
  15. data/lib/countries/data/subdivisions/AM.yaml +10 -0
  16. data/lib/countries/data/subdivisions/AO.yaml +18 -0
  17. data/lib/countries/data/subdivisions/AR.yaml +23 -0
  18. data/lib/countries/data/subdivisions/AT.yaml +7 -0
  19. data/lib/countries/data/subdivisions/AU.yaml +8 -0
  20. data/lib/countries/data/subdivisions/AZ.yaml +77 -2
  21. data/lib/countries/data/subdivisions/BA.yaml +3 -0
  22. data/lib/countries/data/subdivisions/BB.yaml +11 -0
  23. data/lib/countries/data/subdivisions/BD.yaml +72 -0
  24. data/lib/countries/data/subdivisions/IR.yaml +31 -1
  25. data/lib/countries/data/subdivisions/KZ.yaml +14 -0
  26. data/lib/countries/data/subdivisions/PY.yaml +1 -1
  27. data/lib/countries/data/subdivisions/TJ.yaml +1 -1
  28. data/lib/countries/data/subdivisions/TM.yaml +1 -1
  29. data/lib/countries/data/subdivisions/UA.yaml +26 -1
  30. data/lib/countries/data/subdivisions/US.yaml +48 -3
  31. data/lib/countries/data/subdivisions/UZ.yaml +13 -1
  32. data/lib/countries/data/translations/countries-tk.yaml +88 -88
  33. data/lib/countries/iso3166.rb +0 -1
  34. data/lib/countries/version.rb +1 -1
  35. data/spec/country_spec.rb +33 -0
  36. metadata +3 -4
  37. data/lib/countries/kwarg_struct.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 390a35b1edb74f8d9405c605f761b4fa46785b11b5ea3a710a361189a45571f3
4
- data.tar.gz: 4d0cd084e793cfbe16ef4a6cfc76f231fe4906c64a9369643fee7814a1ebc491
3
+ metadata.gz: 252ec109abb3ff1fe5a7fb0b9db7da0643c0de24e4ba703169eee6f506d312af
4
+ data.tar.gz: b19a3c4035b5e8c2f684f39c7b8177d3492874e412c85fc05dbee04c3235e4aa
5
5
  SHA512:
6
- metadata.gz: c945ccce663ff2e03a638e85b25e0ddc93c2bd4f28098778ef94f6ead943f1c6dc87ee55205253146b90e6944f6a98b2ae26073540e9bf76e1cbb7f7154a8cc0
7
- data.tar.gz: 835e6e61e2bcd649194e71f739e0bf453ecf60de0a6ef254319d8774212dd9b1f8ef01390e428279860cb1d2849d4373c8fb7d9ea6f5538e3a793c40c939fb85
6
+ metadata.gz: 88987a266479ef34df66dc4c59cb2c59424a066891ae2fc1f7a7497085eadac3507ae632adc95e8dabb8eecb27785ce0d46e6e9b53b343823aa18b5c0948954e
7
+ data.tar.gz: a4f90a9a510fb7530d73ea3ce767ac209070e0c99a7134981ea96009b61cfcc0ad0163d79a32ffe8bc4f7a04690d9c0fc7f98711a94f8aa21c6222a75714448f
@@ -15,11 +15,13 @@ jobs:
15
15
  strategy:
16
16
  matrix:
17
17
  include:
18
- - ruby-version: 2.7.6
18
+ - ruby-version: 2.7.7
19
19
  bundler-version: default
20
- - ruby-version: 3.0.4
20
+ - ruby-version: 3.0.5
21
21
  bundler-version: default
22
- - ruby-version: 3.1.2
22
+ - ruby-version: 3.1.3
23
+ bundler-version: default
24
+ - ruby-version: 3.2.0
23
25
  bundler-version: default
24
26
  steps:
25
27
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -3,7 +3,39 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/).
5
5
 
6
- ## [5.2.0](https://github.com/countries/countries/releases/tag/v5.1.3') (2022/10/28 14:35 +00:00)
6
+ ## [5.3.0](https://github.com/countries/countries/releases/tag/v5.3.0') (2023/01/03 17:02 +00:00)
7
+
8
+ **Merged pull requests:**
9
+
10
+ * Remove dead code: KwargStruct [\#787](https://github.com/countries/countries/pull/787) ([pmor](https://github.com/pmor))
11
+ * Update data for Turkmenistan and add Turkmen translation [\#789](https://github.com/countries/countries/pull/789) ([msuliq](https://github.com/msuliq))
12
+ * Add Country#subdivision_names method [\#788](https://github.com/countries/countries/pull/788) ([pmor](https://github.com/pmor))
13
+
14
+ ## [5.2.1](https://github.com/countries/countries/releases/tag/v5.2.1') (2022/12/22 15:29 +00:00)
15
+
16
+ **Important changes**
17
+
18
+ * The Republic of Croatia will join the Eurozone and switch currency to `EUR` in Jan 1 2023. If you update this gem before that date and need to have correct currency codes as of 2022, I recommend using an initializer to re-register Croatia with `HRK`, which you could wrap with a check of the current date, eg:
19
+
20
+ ```ruby
21
+ # In an initializer
22
+ if Date.today.year == 2022
23
+ new_data = ISO3166::Country['HR'].data
24
+ new_data.transform_keys! &:to_sym
25
+ new_data[:currency_code] = 'HRK'
26
+ ISO3166::Data.register new_data
27
+ end
28
+ ```
29
+
30
+ **Merged pull requests:**
31
+
32
+ * Fix changelog to point to correct PR [\#778](https://github.com/countries/countries/pull/778) ([carlosantoniodasilva](https://github.com/carlosantoniodasilva))
33
+ * Document how to get country codes (alpha2) [ci skip] [\#781](https://github.com/countries/countries/pull/781) ([jean-francois-labbe](https://github.com/carlosantoniodasilva))
34
+ * Update Croatia's currency to EUR [\#784](https://github.com/countries/countries/pull/784) ([pmor](https://github.com/pmor))
35
+ * Duplicate `I18n.available_locales` into `default_locales` [\#785](https://github.com/countries/countries/pull/785) ([pmor](https://github.com/pmor))
36
+
37
+
38
+ ## [5.2.0](https://github.com/countries/countries/releases/tag/v5.2.0') (2022/10/28 14:35 +00:00)
7
39
 
8
40
  **Important changes**
9
41
 
@@ -52,7 +84,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
52
84
 
53
85
  **Merged pull requests:**
54
86
 
55
- * Remove i18n_data dependency [\#755](https://github.com/countries/countries/pull/755) ([pmor](https://github.com/pmor))
87
+ * Remove i18n_data dependency [\#756](https://github.com/countries/countries/pull/756) ([pmor](https://github.com/pmor))
56
88
  * Update subdivision YAML with codes [\#757](https://github.com/countries/countries/pull/757) ([pmor](https://github.com/pmor))
57
89
  * Add subdivision types from ISO3166-2 [\#758](https://github.com/countries/countries/pull/758) ([pmor](https://github.com/pmor))
58
90
 
data/README.markdown CHANGED
@@ -26,6 +26,13 @@ Simply load a new country object using Country.new(*alpha2*) or the shortcut Cou
26
26
  c = ISO3166::Country.new('US')
27
27
  ```
28
28
 
29
+ Get all country codes (*alpha2*).
30
+
31
+ ```ruby
32
+ ISO3166::Country.codes
33
+ # ["TJ", "JM", "HT",...]
34
+ ```
35
+
29
36
  ## Configuration
30
37
 
31
38
  ### Country Helper