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.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +5 -3
- data/CHANGELOG.md +34 -2
- data/README.markdown +7 -0
- data/lib/countries/cache/countries.json +1 -1
- data/lib/countries/cache/locales/tk.json +1 -1
- data/lib/countries/configuration.rb +1 -1
- data/lib/countries/country.rb +6 -0
- data/lib/countries/data/countries/HR.yaml +1 -1
- data/lib/countries/data/countries/TM.yaml +1 -1
- data/lib/countries/data/subdivisions/AE.yaml +6 -0
- data/lib/countries/data/subdivisions/AF.yaml +34 -0
- data/lib/countries/data/subdivisions/AG.yaml +8 -0
- data/lib/countries/data/subdivisions/AL.yaml +12 -0
- data/lib/countries/data/subdivisions/AM.yaml +10 -0
- data/lib/countries/data/subdivisions/AO.yaml +18 -0
- data/lib/countries/data/subdivisions/AR.yaml +23 -0
- data/lib/countries/data/subdivisions/AT.yaml +7 -0
- data/lib/countries/data/subdivisions/AU.yaml +8 -0
- data/lib/countries/data/subdivisions/AZ.yaml +77 -2
- data/lib/countries/data/subdivisions/BA.yaml +3 -0
- data/lib/countries/data/subdivisions/BB.yaml +11 -0
- data/lib/countries/data/subdivisions/BD.yaml +72 -0
- data/lib/countries/data/subdivisions/IR.yaml +31 -1
- data/lib/countries/data/subdivisions/KZ.yaml +14 -0
- data/lib/countries/data/subdivisions/PY.yaml +1 -1
- data/lib/countries/data/subdivisions/TJ.yaml +1 -1
- data/lib/countries/data/subdivisions/TM.yaml +1 -1
- data/lib/countries/data/subdivisions/UA.yaml +26 -1
- data/lib/countries/data/subdivisions/US.yaml +48 -3
- data/lib/countries/data/subdivisions/UZ.yaml +13 -1
- data/lib/countries/data/translations/countries-tk.yaml +88 -88
- data/lib/countries/iso3166.rb +0 -1
- data/lib/countries/version.rb +1 -1
- data/spec/country_spec.rb +33 -0
- metadata +3 -4
- data/lib/countries/kwarg_struct.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 252ec109abb3ff1fe5a7fb0b9db7da0643c0de24e4ba703169eee6f506d312af
|
4
|
+
data.tar.gz: b19a3c4035b5e8c2f684f39c7b8177d3492874e412c85fc05dbee04c3235e4aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88987a266479ef34df66dc4c59cb2c59424a066891ae2fc1f7a7497085eadac3507ae632adc95e8dabb8eecb27785ce0d46e6e9b53b343823aa18b5c0948954e
|
7
|
+
data.tar.gz: a4f90a9a510fb7530d73ea3ce767ac209070e0c99a7134981ea96009b61cfcc0ad0163d79a32ffe8bc4f7a04690d9c0fc7f98711a94f8aa21c6222a75714448f
|
data/.github/workflows/tests.yml
CHANGED
@@ -15,11 +15,13 @@ jobs:
|
|
15
15
|
strategy:
|
16
16
|
matrix:
|
17
17
|
include:
|
18
|
-
- ruby-version: 2.7.
|
18
|
+
- ruby-version: 2.7.7
|
19
19
|
bundler-version: default
|
20
|
-
- ruby-version: 3.0.
|
20
|
+
- ruby-version: 3.0.5
|
21
21
|
bundler-version: default
|
22
|
-
- ruby-version: 3.1.
|
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.
|
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 [\#
|
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
|