worldwide 0.6.6 → 0.6.8

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: 51a5d3466269ee42ab651b2e5023677ebc5292677d1e54d89ed110147ae2d862
4
- data.tar.gz: 7af385162e0d95d225502a8a2d79ebaf0763bef425c4d22d13c6e7557841b5e3
3
+ metadata.gz: bc21061379ab6f17ea3528d1f19b83f81275c8f9b5eb3c89d4f652f49faa2367
4
+ data.tar.gz: 5d5d8fd0716a26b5d856432950077a2722efc72daeddef4d128a9f346b861286
5
5
  SHA512:
6
- metadata.gz: be8196967f8199532ca24ce1f41169ea00a4ced3546d76f1a77c30fd2a9a07f7a2a7c308e3f9411766e4748ffb51e0e48f691043f8be974d7d1c05d59c1f4ec6
7
- data.tar.gz: 9fed50b289cce57b4d009358264dfdd8aaaef6695e10af32343c5a9875ae183cfb9c3400b6fbf7d674ba172b324eb5469c837abb258dde8828efaa067ca6eada
6
+ metadata.gz: 8a2279dad4234b6f6ee3c69db576660b37a24ae9a63852b13322cb9d7a33d3650f9df3ef5fab199eb42e03694b7967014b0203582ac40aa38c99665c63630b87
7
+ data.tar.gz: 3d897410ee24c31a9b4a58cb1e6888f82e67fa67732e7073f1f2863de8c5b27c27877561651ed196e1d0b17a646ecaae6f9b416716e9e145e682961adf1ebe8d
data/CHANGELOG.md CHANGED
@@ -31,6 +31,15 @@ nil.
31
31
 
32
32
  ---
33
33
 
34
+ [0.6.8] - 2024-01-31
35
+
36
+ - Prefer "SAR" over "SAR China" in Chinese-language names for regions `HK` and `MO`. [#79](https://github.com/Shopify/worldwide/pull/79).
37
+ - Add Worldwide::Field.valid_key? method. [#80](https://github.com/Shopify/worldwide/pull/80)
38
+
39
+ [0.6.7] - 2024-01-30
40
+
41
+ - Patch some territory names (BQ, NL, TF, TR) [#77](https://github.com/Shopify/worldwide/pull/77)
42
+
34
43
  [0.6.6] - 2024-01-25
35
44
 
36
45
  - Allow building numbers on address2 field for Portugal addresses [#73](https://github.com/Shopify/worldwide/pull/73)
data/Gemfile.lock CHANGED
@@ -13,9 +13,9 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- worldwide (0.6.6)
16
+ worldwide (0.6.8)
17
17
  activesupport (~> 7.0)
18
- i18n (~> 1.12.0)
18
+ i18n
19
19
  phonelib (~> 0.8)
20
20
 
21
21
  GEM
@@ -40,7 +40,7 @@ GEM
40
40
  connection_pool (2.4.1)
41
41
  drb (2.1.1)
42
42
  ruby2_keywords
43
- i18n (1.12.0)
43
+ i18n (1.14.1)
44
44
  concurrent-ruby (~> 1.0)
45
45
  json (2.6.3)
46
46
  language_server-protocol (3.17.0.3)
@@ -62,7 +62,7 @@ da:
62
62
  BM: Bermuda
63
63
  BN: Brunei
64
64
  BO: Bolivia
65
- BQ: De tidligere Nederlandske Antiller
65
+ BQ: Caribisk Nederlandene
66
66
  BR: Brasilien
67
67
  BS: Bahamas
68
68
  BT: Bhutan
@@ -204,7 +204,7 @@ da:
204
204
  NF: Norfolk Island
205
205
  NG: Nigeria
206
206
  NI: Nicaragua
207
- NL: Holland
207
+ NL: Holland (Nederlandene)
208
208
  'NO': Norge
209
209
  NP: Nepal
210
210
  NR: Nauru
@@ -256,7 +256,7 @@ da:
256
256
  TA: Tristan da Cunha
257
257
  TC: Turks- og Caicosøerne
258
258
  TD: Tchad
259
- TF: De Franske Besiddelser i Det Sydlige Indiske Ocean og Antarktis
259
+ TF: Franske sydlige territorier
260
260
  TG: Togo
261
261
  TH: Thailand
262
262
  TJ: Tadsjikistan
@@ -256,7 +256,7 @@ de:
256
256
  TA: Tristan da Cunha
257
257
  TC: Turks- und Caicosinseln
258
258
  TD: Tschad
259
- TF: Französische Süd- und Antarktisgebiete
259
+ TF: Französische Südgebiete
260
260
  TG: Togo
261
261
  TH: Thailand
262
262
  TJ: Tadschikistan
@@ -265,7 +265,7 @@ en:
265
265
  TM: Turkmenistan
266
266
  TN: Tunisia
267
267
  TO: Tonga
268
- TR: Turkey
268
+ TR: Türkiye
269
269
  TT: Trinidad & Tobago
270
270
  TV: Tuvalu
271
271
  TW: Taiwan
@@ -132,7 +132,7 @@ zh:
132
132
  GU: 关岛
133
133
  GW: 几内亚比绍
134
134
  GY: 圭亚那
135
- HK: 中国香港特别行政区
135
+ HK: 香港特别行政区
136
136
  HM: 赫德岛和麦克唐纳群岛
137
137
  HN: 洪都拉斯
138
138
  HR: 克罗地亚
@@ -186,7 +186,7 @@ zh:
186
186
  ML: 马里
187
187
  MM: 缅甸
188
188
  MN: 蒙古
189
- MO: 中国澳门特别行政区
189
+ MO: 澳门特别行政区
190
190
  MP: 北马里亚纳群岛
191
191
  MQ: 马提尼克
192
192
  MR: 毛里塔尼亚
@@ -20,6 +20,12 @@ module Worldwide
20
20
  :address,
21
21
  ]
22
22
 
23
+ class << self
24
+ def valid_key?(key)
25
+ VALID_KEYS.include?(key.to_sym)
26
+ end
27
+ end
28
+
23
29
  def initialize(country_code:, field_key:)
24
30
  @country_code = country_code.upcase.to_sym
25
31
  @field_key = field_key.downcase.to_sym
@@ -242,7 +242,7 @@ module Worldwide
242
242
  # https://www.unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats
243
243
  # > N is divided by the type, after removing the number of zeros in the pattern, less 1.
244
244
  def compact_format_scale_factor(matched_type, style:)
245
- compact_number_format = Worldwide::Cldr.t("#{COMPACT_DECIMAL_BASE_KEY}.#{style}.standard.#{matched_type}", count: 1, locale: locale)
245
+ compact_number_format = Worldwide::Cldr.t("#{COMPACT_DECIMAL_BASE_KEY}.#{style}.standard.#{matched_type}", count: 5, locale: locale)
246
246
 
247
247
  return 1 if compact_number_format == DEFAULT_COMPACT_PATTERN
248
248
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "0.6.6"
4
+ VERSION = "0.6.8"
5
5
  end
data/worldwide.gemspec CHANGED
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = ">= 3.0.0"
28
28
 
29
29
  spec.add_dependency("activesupport", "~> 7.0")
30
- spec.add_dependency("i18n", "~> 1.12.0")
30
+ spec.add_dependency("i18n")
31
31
  spec.add_dependency("phonelib", "~> 0.8")
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worldwide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-25 00:00:00.000000000 Z
11
+ date: 2024-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: i18n
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.12.0
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.12.0
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: phonelib
43
43
  requirement: !ruby/object:Gem::Requirement