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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 390a35b1edb74f8d9405c605f761b4fa46785b11b5ea3a710a361189a45571f3
4
- data.tar.gz: 4d0cd084e793cfbe16ef4a6cfc76f231fe4906c64a9369643fee7814a1ebc491
3
+ metadata.gz: 29decb615bd839a613742131109d3bdc48c14222435991e61e065ab7753c69a9
4
+ data.tar.gz: 58f962d821d13637e32c8dcfc25a348a28b12fdebf097ed6646326e9760a6e14
5
5
  SHA512:
6
- metadata.gz: c945ccce663ff2e03a638e85b25e0ddc93c2bd4f28098778ef94f6ead943f1c6dc87ee55205253146b90e6944f6a98b2ae26073540e9bf76e1cbb7f7154a8cc0
7
- data.tar.gz: 835e6e61e2bcd649194e71f739e0bf453ecf60de0a6ef254319d8774212dd9b1f8ef01390e428279860cb1d2849d4373c8fb7d9ea6f5538e3a793c40c939fb85
6
+ metadata.gz: '0952b16b26c6ee09a166813bd2b44270e6c1bfec42b519f421aecb3baad10d9530dd2142c759cf2b9c01c6bfb21e7822eac9a4f5d0a6e8f0b4bc029cdfe87448'
7
+ data.tar.gz: 4548ae892a3c711901b244ae1be32e3156bac81eb46e4a921a5ce3f2ebba16a430f1bf981c3255551b17191e469bdfd8916d6d87ec3d4307ada2a9c07cc58456
@@ -19,7 +19,7 @@ jobs:
19
19
  bundler-version: default
20
20
  - ruby-version: 3.0.4
21
21
  bundler-version: default
22
- - ruby-version: 3.1.2
22
+ - ruby-version: 3.1.3
23
23
  bundler-version: default
24
24
  steps:
25
25
  - uses: actions/checkout@v3
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.0](https://github.com/countries/countries/releases/tag/v5.1.3') (2022/10/28 14:35 +00:00)
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 [\#755](https://github.com/countries/countries/pull/755) ([pmor](https://github.com/pmor))
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