countries 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.markdown +3 -4
- data/lib/countries/cache/countries.json +1 -1
- data/lib/countries/configuration.rb +13 -0
- data/lib/countries/country/currency_methods.rb +4 -1
- data/lib/countries/country/emoji.rb +3 -0
- data/lib/countries/country.rb +105 -5
- data/lib/countries/data/countries/IL.yaml +0 -2
- data/lib/countries/data/countries/KH.yaml +1 -1
- data/lib/countries/data/countries/TW.yaml +1 -1
- data/lib/countries/data.rb +5 -1
- data/lib/countries/global.rb +12 -0
- data/lib/countries/mongoid.rb +3 -0
- data/lib/countries/sources/cldr/downloader.rb +3 -0
- data/lib/countries/sources/cldr/subdivision.rb +1 -0
- data/lib/countries/sources/cldr/subdivision_updater.rb +1 -0
- data/lib/countries/sources/local/cached_loader.rb +2 -0
- data/lib/countries/sources/local/subdivision.rb +1 -0
- data/lib/countries/timezones.rb +4 -2
- data/lib/countries/translations.rb +2 -3
- data/lib/countries/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 678e46df92cdbff4228c25619b4a2314ce1d6226fff8a482ec0f9ed9a6bac464
|
4
|
+
data.tar.gz: fb5e189397d9af4855751ddcb0168156c84a9409c79bbd707b36cc91155051ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 161184e5015c11d10070be7d17bfe02c7292e5c1ff1fb68e9344f8fad39e23ed1fde5f7bef46f256999ef80a5503cdecb290e411343ce328bf085517e1a1a205
|
7
|
+
data.tar.gz: cb629c1eaf3626afe096159e170d5bf02c678db4ea4046623ed719cc5eea76983500ae38b8c7cb22146b32e7ddc91a006377bcace5e94d590ed85a70850ed67e
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
8
8
|
|
9
9
|
- Drop support for Ruby 2.5 and 2.6 [\#708](https://github.com/countries/countries/pull/708) ([pmor](https://github.com/pmor))
|
10
10
|
|
11
|
+
## [4.2.1](https://github.com/countries/countries/releases/tag/v4.2.0) (2022/01/11 12:39 +00:00)
|
12
|
+
|
13
|
+
- Missing update to cache files on release 4.2.0
|
14
|
+
- Update postal code regexes from rake task [\#734 ](https://github.com/countries/countries/pull/734 ) ([cover](https://github.com/cover))
|
15
|
+
|
16
|
+
|
11
17
|
## [4.2.0](https://github.com/countries/countries/releases/tag/v4.2.0) (2022/01/11 11:04 +00:00)
|
12
18
|
|
13
19
|
**Deprecations**
|
data/README.markdown
CHANGED
@@ -60,12 +60,11 @@ The `#name` and `#names` attributes, and corresponding finder methods will be re
|
|
60
60
|
|
61
61
|
For translated country names, we use data from [pkg-isocodes](https://salsa.debian.org/iso-codes-team/iso-codes), via the [i18n_data](https://github.com/grosser/i18n_data) gem, and these generally correspond to the expected "common names". These names and the corresponding methods have not been changed.
|
62
62
|
|
63
|
-
|
64
63
|
## Selective Loading of Locales
|
65
64
|
|
66
65
|
As of 2.0 you can selectively load locales to reduce memory usage in production.
|
67
66
|
|
68
|
-
By default we load I18n.available_locales if I18n is present, otherwise only [:en]
|
67
|
+
By default we load `I18n.available_locales` if I18n is present, otherwise only `[:en]`. This means almost any Rails environment will only bring in its supported translations.
|
69
68
|
|
70
69
|
You can add all the locales like this.
|
71
70
|
|
@@ -93,7 +92,7 @@ list = ISO3166::Country.find_all_countries_by_region('Americas')
|
|
93
92
|
c = ISO3166::Country.find_country_by_alpha3('can')
|
94
93
|
```
|
95
94
|
|
96
|
-
For a list of available attributes please see ISO3166::DEFAULT_COUNTRY_HASH
|
95
|
+
For a list of available attributes please see `ISO3166::DEFAULT_COUNTRY_HASH`.
|
97
96
|
Note: searches are *case insensitive and ignore accents*.
|
98
97
|
|
99
98
|
_Please note that `find_by_name`, `find_by_names`, `find_*_by_name` and `find_*_by_names` methods are deprecated and will be removed in 5.0. See [Upgrading to 4.2 and 5.x](#upgrading-to-4-2-and-5-x) above_
|
@@ -154,7 +153,7 @@ c.region # => "Americas"
|
|
154
153
|
c.subregion # => "Northern America"
|
155
154
|
```
|
156
155
|
|
157
|
-
Please note that `latitude_dec` and `longitude_dec`
|
156
|
+
Please note that `latitude_dec` and `longitude_dec` was be deprecated on release 4.2 and will be deleted in 5.0. These attributes have been redundant for several years, since the `latitude` and `longitude` fields have been switched decimal coordinates.
|
158
157
|
|
159
158
|
### Timezones **(optional)**
|
160
159
|
|