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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c088cf8b57df5d8d9de377cee8b3b0e29517c5b997fe0bf70ee3b8970499f97d
4
- data.tar.gz: 90ae4641252f4a7f2a8262794782f7287fc176253cf62047f24a24e447580a56
3
+ metadata.gz: 94f52548c00b327fa3649904eb25487d9e029fc34512e0edc4cf42e82690845b
4
+ data.tar.gz: aa1b423717212544a46c9286d3ffdcb1683071fd09a9ef54a372920fe9042dc0
5
5
  SHA512:
6
- metadata.gz: 0156d547c2c0fba8c5d7b89bde2cdc441a05e8dceb7285cf990e6b79cbd1d7d6564e52a8cc5ce873e247147ed7caeeaf2f28515f047146b5c200a041548edb0e
7
- data.tar.gz: '09cbfa47fd5e9b79dbb129cda279d2da44aa98f7bfc3800439830fbdfbb4d1bfb9cba420d25530679f24c7d91af47975a6e6bdc25633fddf3d8e4c7dfad077e5'
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.0)
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.6)
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)
@@ -14,6 +14,7 @@ zip_example: '2544'
14
14
  zip_regex: "^((CH( |-)?)?(([1-8]\\d{3})|(9[012356789]\\d{2})|(94[01234567]\\d)))$"
15
15
  phone_number_prefix: 41
16
16
  building_number_required: true
17
+ building_number_may_be_in_address2: true
17
18
  week_start_day: monday
18
19
  languages:
19
20
  - de
@@ -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 shopify-i18n will recognize DH.
145
- # TODO: import new CLDR in shopify-i18n, merge DD and DN into new zone DH
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
@@ -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}_{zip} {city}_{country}_{phone}"
15
+ show: "{firstName} {lastName}_{company}_{address1}_{address2}_{city}_{country} {zip}_{phone}"
16
16
  emoji: 🇳🇫
17
17
  languages:
18
18
  - en
@@ -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
- # CountryDb.country(code: "CA").group == "North American Countries"
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "0.11.0"
4
+ VERSION = "0.11.1"
5
5
  end
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 country_code.nil?
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.0
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-04-11 00:00:00.000000000 Z
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.7
8236
+ rubygems_version: 3.5.10
8237
8237
  signing_key:
8238
8238
  specification_version: 4
8239
8239
  summary: Internationalization and localization APIs