countries 5.1.2 → 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 +2 -2
- data/CHANGELOG.md +47 -2
- data/README.markdown +8 -1
- data/countries.gemspec +1 -1
- data/lib/countries/cache/countries.json +1 -1
- data/lib/countries/cache/locales/ab.json +1 -1
- data/lib/countries/cache/locales/ak.json +1 -1
- data/lib/countries/cache/locales/an.json +1 -1
- data/lib/countries/cache/locales/ay.json +1 -1
- data/lib/countries/cache/locales/ba.json +1 -1
- data/lib/countries/cache/locales/bi.json +1 -1
- data/lib/countries/cache/locales/ch.json +1 -1
- data/lib/countries/cache/locales/de.json +1 -1
- data/lib/countries/cache/locales/ee.json +1 -1
- data/lib/countries/cache/locales/en.json +1 -1
- data/lib/countries/cache/locales/fr.json +1 -1
- data/lib/countries/cache/locales/gn.json +1 -1
- data/lib/countries/cache/locales/ki.json +1 -1
- data/lib/countries/cache/locales/kl.json +1 -1
- data/lib/countries/cache/locales/lt.json +1 -1
- data/lib/countries/cache/locales/sd.json +1 -1
- data/lib/countries/cache/locales/sw.json +1 -1
- data/lib/countries/cache/locales/tl.json +1 -1
- data/lib/countries/cache/locales/ve.json +1 -1
- data/lib/countries/cache/locales/xh.json +1 -1
- data/lib/countries/configuration.rb +1 -1
- data/lib/countries/country/class_methods.rb +3 -3
- data/lib/countries/country.rb +1 -1
- data/lib/countries/data/countries/HR.yaml +1 -1
- data/lib/countries/data/countries/TR.yaml +2 -2
- data/lib/countries/data/countries/TW.yaml +14 -12
- data/lib/countries/data/translations/countries-ab.yaml +1 -1
- data/lib/countries/data/translations/countries-ak.yaml +1 -1
- data/lib/countries/data/translations/countries-an.yaml +1 -1
- data/lib/countries/data/translations/countries-ay.yaml +1 -1
- data/lib/countries/data/translations/countries-ba.yaml +1 -1
- data/lib/countries/data/translations/countries-bi.yaml +1 -1
- data/lib/countries/data/translations/countries-ch.yaml +1 -1
- data/lib/countries/data/translations/countries-de.yaml +2 -2
- data/lib/countries/data/translations/countries-ee.yaml +1 -1
- data/lib/countries/data/translations/countries-en.yaml +1 -1
- data/lib/countries/data/translations/countries-fr.yaml +7 -7
- data/lib/countries/data/translations/countries-gn.yaml +1 -1
- data/lib/countries/data/translations/countries-ki.yaml +1 -1
- data/lib/countries/data/translations/countries-kl.yaml +1 -1
- data/lib/countries/data/translations/countries-lt.yaml +1 -1
- data/lib/countries/data/translations/countries-sd.yaml +1 -1
- data/lib/countries/data/translations/countries-sw.yaml +1 -1
- data/lib/countries/data/translations/countries-tl.yaml +1 -1
- data/lib/countries/data/translations/countries-ve.yaml +1 -1
- data/lib/countries/data/translations/countries-xh.yaml +1 -1
- data/lib/countries/version.rb +1 -1
- data/lib/countries.rb +0 -2
- data/spec/country_spec.rb +46 -6
- metadata +5 -5
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
@@ -19,10 +19,10 @@ jobs:
|
|
19
19
|
bundler-version: default
|
20
20
|
- ruby-version: 3.0.4
|
21
21
|
bundler-version: default
|
22
|
-
- ruby-version: 3.1.
|
22
|
+
- ruby-version: 3.1.3
|
23
23
|
bundler-version: default
|
24
24
|
steps:
|
25
|
-
- uses: actions/checkout@
|
25
|
+
- uses: actions/checkout@v3
|
26
26
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
27
27
|
uses: ruby/setup-ruby@v1
|
28
28
|
with:
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,52 @@
|
|
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.1
|
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)
|
31
|
+
|
32
|
+
**Important changes**
|
33
|
+
|
34
|
+
* The Republic of Turkey has officially changed its name to `The Republic of Türkiye`, short name `Türkiye`. Official name attributes have been updated, as well as several translations. This could be a breaking change if you rely on the old name.
|
35
|
+
|
36
|
+
* The `sixarm_ruby_unaccent` gem was replaced with `unaccent`. See [\#767](https://github.com/countries/countries/pull/767)
|
37
|
+
|
38
|
+
**Merged pull requests:**
|
39
|
+
|
40
|
+
* Ensure #translated_names is compacted [\#777](https://github.com/countries/countries/pull/777) ([pmor](https://github.com/pmor))
|
41
|
+
* Rename turkey to Türkiye [\#771](https://github.com/countries/countries/pull/771) ([larskuhnt](https://github.com/larskuhnt))
|
42
|
+
* Fix Upgrade.md route on README.markdown [\#766](https://github.com/countries/countries/pull/766) ([dmartingarcia](https://github.com/dmartingarcia))
|
43
|
+
* Update french, missing uppercase letters [\#769](https://github.com/countries/countries/pull/769) ([JulienItard](https://github.com/JulienItard))
|
44
|
+
* german translations for CI and CV [\#770](https://github.com/countries/countries/pull/770) ([larskuhnt](https://github.com/larskuhnt))
|
45
|
+
* Fix Czechia name in LT translation [\#773](https://github.com/countries/countries/pull/773) ([tomukas](https://github.com/tomukas))
|
46
|
+
* Updated Taiwan unofficial names [\#772](https://github.com/countries/countries/pull/772) ([Tzenda](https://github.com/Tzenda))
|
47
|
+
* Replace sixarm_ruby_unaccent with unaccent [\#767](https://github.com/countries/countries/pull/767) ([jonian](https://github.com/jonian))
|
48
|
+
|
49
|
+
## [5.1.2](https://github.com/countries/countries/releases/tag/v5.1.2') (2022/08/11 14:35 +00:00)
|
50
|
+
|
51
|
+
**Merged pull requests:**
|
7
52
|
|
8
53
|
* Missing unofficial translations, addresses the remaining translations in [\#580](https://github.com/countries/countries/issues/580) - [\#764](https://github.com/countries/countries/pull/764) ([pmor](https://github.com/pmor))
|
9
54
|
|
@@ -31,7 +76,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
31
76
|
|
32
77
|
**Merged pull requests:**
|
33
78
|
|
34
|
-
* Remove i18n_data dependency [\#
|
79
|
+
* Remove i18n_data dependency [\#756](https://github.com/countries/countries/pull/756) ([pmor](https://github.com/pmor))
|
35
80
|
* Update subdivision YAML with codes [\#757](https://github.com/countries/countries/pull/757) ([pmor](https://github.com/pmor))
|
36
81
|
* Add subdivision types from ISO3166-2 [\#758](https://github.com/countries/countries/pull/758) ([pmor](https://github.com/pmor))
|
37
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
|
@@ -69,7 +76,7 @@ c = ISO3166::Country.find_country_by_alpha2("FR")
|
|
69
76
|
For a list of available attributes please see `ISO3166::DEFAULT_COUNTRY_HASH`.
|
70
77
|
Note: searches are *case insensitive and ignore accents*.
|
71
78
|
|
72
|
-
_Please note that `find_by_name`, `find_by_names`, `find_*_by_name` and `find_*_by_names` methods were removed in 5.0. See [UPGRADE.md](../
|
79
|
+
_Please note that `find_by_name`, `find_by_names`, `find_*_by_name` and `find_*_by_names` methods were removed in 5.0. See [UPGRADE.md](../master/UPGRADE.md) for more information_
|
73
80
|
|
74
81
|
## Country Info
|
75
82
|
|
data/countries.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
|
|
23
23
|
|
24
24
|
gem.required_ruby_version = '>= 2.7'
|
25
25
|
|
26
|
-
gem.add_dependency('
|
26
|
+
gem.add_dependency('unaccent', '~> 0.3')
|
27
27
|
gem.add_development_dependency('activesupport', '>= 3')
|
28
28
|
gem.add_development_dependency('nokogiri', '>= 1.8')
|
29
29
|
gem.add_development_dependency('rspec', '>= 3')
|