countries 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +1 -1
- data/CHANGELOG.md +26 -2
- data/README.markdown +7 -0
- data/lib/countries/cache/countries.json +1 -1
- data/lib/countries/configuration.rb +1 -1
- data/lib/countries/data/countries/HR.yaml +1 -1
- data/lib/countries/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29decb615bd839a613742131109d3bdc48c14222435991e61e065ab7753c69a9
|
4
|
+
data.tar.gz: 58f962d821d13637e32c8dcfc25a348a28b12fdebf097ed6646326e9760a6e14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0952b16b26c6ee09a166813bd2b44270e6c1bfec42b519f421aecb3baad10d9530dd2142c759cf2b9c01c6bfb21e7822eac9a4f5d0a6e8f0b4bc029cdfe87448'
|
7
|
+
data.tar.gz: 4548ae892a3c711901b244ae1be32e3156bac81eb46e4a921a5ce3f2ebba16a430f1bf981c3255551b17191e469bdfd8916d6d87ec3d4307ada2a9c07cc58456
|
data/.github/workflows/tests.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,31 @@
|
|
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.
|
6
|
+
## [5.2.1](https://github.com/countries/countries/releases/tag/v5.2.1') (2022/12/22 15:29 +00:00)
|
7
|
+
|
8
|
+
**Important changes**
|
9
|
+
|
10
|
+
* 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:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
# In an initializer
|
14
|
+
if Date.today.year == 2022
|
15
|
+
new_data = ISO3166::Country['HR'].data
|
16
|
+
new_data.transform_keys! &:to_sym
|
17
|
+
new_data[:currency_code] = 'HRK'
|
18
|
+
ISO3166::Data.register new_data
|
19
|
+
end
|
20
|
+
```
|
21
|
+
|
22
|
+
**Merged pull requests:**
|
23
|
+
|
24
|
+
* Fix changelog to point to correct PR [\#778](https://github.com/countries/countries/pull/778) ([carlosantoniodasilva](https://github.com/carlosantoniodasilva))
|
25
|
+
* Document how to get country codes (alpha2) [ci skip] [\#781](https://github.com/countries/countries/pull/781) ([jean-francois-labbe](https://github.com/carlosantoniodasilva))
|
26
|
+
* Update Croatia's currency to EUR [\#784](https://github.com/countries/countries/pull/784) ([pmor](https://github.com/pmor))
|
27
|
+
* Duplicate `I18n.available_locales` into `default_locales` [\#785](https://github.com/countries/countries/pull/785) ([pmor](https://github.com/pmor))
|
28
|
+
|
29
|
+
|
30
|
+
## [5.2.0](https://github.com/countries/countries/releases/tag/v5.2.0') (2022/10/28 14:35 +00:00)
|
7
31
|
|
8
32
|
**Important changes**
|
9
33
|
|
@@ -52,7 +76,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
52
76
|
|
53
77
|
**Merged pull requests:**
|
54
78
|
|
55
|
-
* Remove i18n_data dependency [\#
|
79
|
+
* Remove i18n_data dependency [\#756](https://github.com/countries/countries/pull/756) ([pmor](https://github.com/pmor))
|
56
80
|
* Update subdivision YAML with codes [\#757](https://github.com/countries/countries/pull/757) ([pmor](https://github.com/pmor))
|
57
81
|
* Add subdivision types from ISO3166-2 [\#758](https://github.com/countries/countries/pull/758) ([pmor](https://github.com/pmor))
|
58
82
|
|
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
|