worldwide 0.11.0 → 0.11.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 +8 -2
- data/Gemfile.lock +2 -2
- data/db/data/regions/CH.yml +1 -0
- data/db/data/regions/IN.yml +2 -2
- data/db/data/regions/NF.yml +1 -1
- data/lib/worldwide/region.rb +1 -3
- data/lib/worldwide/version.rb +1 -1
- data/lib/worldwide/zip.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94f52548c00b327fa3649904eb25487d9e029fc34512e0edc4cf42e82690845b
|
4
|
+
data.tar.gz: aa1b423717212544a46c9286d3ffdcb1683071fd09a9ef54a372920fe9042dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08ba06ef3c1a28929ee81b7e32143b572ac5b80c869244b724a22c33ca89038e23220ecc7f6bc7cf28f56f6599f84887dabbd5d3db1dd68661991c75bd3745ff'
|
7
|
+
data.tar.gz: 78fc15cb9692b9086a3bf0c3627b8285cba0acd396dc8287e0a260b2dc1168dc3e9d24091123cf0907d001f44d9a04203485b5b707d1a206deeb1a0949a56afc
|
data/CHANGELOG.md
CHANGED
@@ -27,10 +27,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
27
27
|
|
28
28
|
## [Unreleased]
|
29
29
|
|
30
|
-
- Nil.
|
31
|
-
|
32
30
|
---
|
33
31
|
|
32
|
+
## [0.11.1] - 2024-05-13
|
33
|
+
|
34
|
+
- Handle blank strings for Region, country_code parameter in Zip normalization
|
35
|
+
[#138](https://github.com/Shopify/worldwide/pull/138)
|
36
|
+
- Reposition zip in NF show: format to come after country, not before city. [#142](https://github.com/Shopify/worldwide/pull/142)
|
37
|
+
- Allow building number on address2 for CH [#143](https://github.com/Shopify/worldwide/pull/143)
|
38
|
+
- Attempt to fix stringio incompatibility with Ruby 3.3 (deployment error) [#145](https://github.com/Shopify/worldwide/pull/145)
|
39
|
+
|
34
40
|
## [0.11.0] - 2024-04-11
|
35
41
|
|
36
42
|
- Add country_prefix to phone [#133](https://github.com/Shopify/worldwide/pull/133)
|
data/Gemfile.lock
CHANGED
@@ -13,7 +13,7 @@ GIT
|
|
13
13
|
PATH
|
14
14
|
remote: .
|
15
15
|
specs:
|
16
|
-
worldwide (0.11.
|
16
|
+
worldwide (0.11.1)
|
17
17
|
activesupport (~> 7.0)
|
18
18
|
i18n
|
19
19
|
phonelib (~> 0.8)
|
@@ -104,7 +104,7 @@ GEM
|
|
104
104
|
ruby2_keywords (0.0.5)
|
105
105
|
rubyzip (2.3.2)
|
106
106
|
sorbet-runtime (0.5.10648)
|
107
|
-
stringio (3.0
|
107
|
+
stringio (3.1.0)
|
108
108
|
syntax_tree (5.3.0)
|
109
109
|
prettier_print (>= 1.2.0)
|
110
110
|
thor (1.2.1)
|
data/db/data/regions/CH.yml
CHANGED
data/db/data/regions/IN.yml
CHANGED
@@ -141,8 +141,8 @@ zones:
|
|
141
141
|
zip_prefixes:
|
142
142
|
- '49'
|
143
143
|
# Dadra and Nagar Haveli was merged with Daman and Diu in 2020, and uses the new ISO code DH for the combined zone.
|
144
|
-
# But, we need to upgrade our version of CLDR before
|
145
|
-
# TODO: import new CLDR in
|
144
|
+
# But, we need to upgrade our version of CLDR before worldwide will recognize DH.
|
145
|
+
# TODO: import new CLDR in worldwide, merge DD and DN into new zone DH
|
146
146
|
- name: Dadra and Nagar Haveli
|
147
147
|
code: DN
|
148
148
|
tax: 0.18
|
data/db/data/regions/NF.yml
CHANGED
@@ -12,7 +12,7 @@ phone_number_prefix: 672
|
|
12
12
|
zip_autofill_enabled: true
|
13
13
|
format:
|
14
14
|
edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{city}_{phone}"
|
15
|
-
show: "{firstName} {lastName}_{company}_{address1}_{address2}_{
|
15
|
+
show: "{firstName} {lastName}_{company}_{address1}_{address2}_{city}_{country} {zip}_{phone}"
|
16
16
|
emoji: 🇳🇫
|
17
17
|
languages:
|
18
18
|
- en
|
data/lib/worldwide/region.rb
CHANGED
@@ -75,7 +75,7 @@ module Worldwide
|
|
75
75
|
|
76
76
|
# The string that results from appending " Countries" to the adjectival form of the {group_name}
|
77
77
|
# @example
|
78
|
-
#
|
78
|
+
# Worldwide.region(code: "CA").group == "North American Countries"
|
79
79
|
attr_accessor :group
|
80
80
|
|
81
81
|
# The continent that this region is part of.
|
@@ -101,13 +101,11 @@ module Worldwide
|
|
101
101
|
# The code used by the legacy Shopify ecosystem for this region.
|
102
102
|
# E.g., for MX-CMX it will return "DF".
|
103
103
|
# This code should _never_ be shown in the user interface.
|
104
|
-
# This is the code that was traditionally returned by "country_db".
|
105
104
|
attr_reader :legacy_code
|
106
105
|
|
107
106
|
# The name used by the legacy Shopify ecosystem for this region.
|
108
107
|
# E.g., "Sao Tome And[sic] Principe" for "ST".
|
109
108
|
# This name should _never_ be shown in the user interface.
|
110
|
-
# This name is the name that was traditionally returned by "country_db".
|
111
109
|
attr_reader :legacy_name
|
112
110
|
|
113
111
|
# Other names that may be used to refer to this region.
|
data/lib/worldwide/version.rb
CHANGED
data/lib/worldwide/zip.rb
CHANGED
@@ -85,7 +85,7 @@ module Worldwide
|
|
85
85
|
def normalize(country_code:, zip:, allow_autofill: true, strip_extraneous_characters: false)
|
86
86
|
input = zip # preserve the original zip, in case we need to fall back to it
|
87
87
|
|
88
|
-
return input if
|
88
|
+
return input if Util.blank?(country_code)
|
89
89
|
|
90
90
|
country = Worldwide.region(code: country_code)
|
91
91
|
return zip if country.nil? || NORMALIZATION_DISABLED_COUNTRIES.include?(country.iso_code)
|
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.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -8233,7 +8233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
8233
8233
|
- !ruby/object:Gem::Version
|
8234
8234
|
version: '0'
|
8235
8235
|
requirements: []
|
8236
|
-
rubygems_version: 3.5.
|
8236
|
+
rubygems_version: 3.5.10
|
8237
8237
|
signing_key:
|
8238
8238
|
specification_version: 4
|
8239
8239
|
summary: Internationalization and localization APIs
|