worldwide 0.10.0 → 0.10.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: 92a2a9654555fd98e50b8ee308be1ca7043a600e0e7dbf77a3d79bf1c984cb29
4
- data.tar.gz: f1e51431a9dea46f0772ac58428f345f43f35e5ba5cd060dc027983fbed86738
3
+ metadata.gz: 62121ee34de749333f10c44de8e21eadd930ed61503570d4937d56335204971b
4
+ data.tar.gz: 792b1cc7f0cecfaadc82be3558d0d5d65984ada73af22fdfa955bb389c69d6a3
5
5
  SHA512:
6
- metadata.gz: fc8b16f9c2cbf2020b2f0bbc2aa3d3f64060a7ffa5901b18379788bdcc6b4ec113d18510d105bff2ae885be2b5ae6cdcdc040f629392716efbae07a91a69dc2b
7
- data.tar.gz: 4390bcc82bd0431442f6eb9d026155f0ed00fdd18bed175788a3696da8842a482b54a8d1114fd2ab9ea4f11920673d1492afd995348ada1bc7e62b5ebb053459
6
+ metadata.gz: ceec029c1672b2f05616943011c87278ff293f657dbd670f30d4b3d6cfd858b4e265549c66ca09495bcd2e7753de39d71fc9fcc9eaf314a4ca79d6b9be0a2fb5
7
+ data.tar.gz: 000ded0140e9c47a2d06565025e54f11ccec4841c8718517dafe6756faf6192a7747f3b7bc91fe79a0aef7481d8e2485aa31ce6d5ffb3418481b79a86671f748
data/CHANGELOG.md CHANGED
@@ -31,6 +31,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
31
31
 
32
32
  ---
33
33
 
34
+ [0.10.1] - 2024-02-27
35
+
36
+ - Return early if country_code is nil Zip::Normalize [#110](https://github.com/Shopify/worldwide/pull/110)
37
+
34
38
  [0.10.0] - 2024-02-13
35
39
 
36
40
  - New UTC long timezone format [#103](https://github.com/shopify/worldwide/pull/103)
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- worldwide (0.10.0)
16
+ worldwide (0.10.1)
17
17
  activesupport (~> 7.0)
18
18
  i18n
19
19
  phonelib (~> 0.8)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "0.10.0"
4
+ VERSION = "0.10.1"
5
5
  end
data/lib/worldwide/zip.rb CHANGED
@@ -85,6 +85,8 @@ 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?
89
+
88
90
  country = Worldwide.region(code: country_code)
89
91
  return zip if country.nil? || NORMALIZATION_DISABLED_COUNTRIES.include?(country.iso_code)
90
92
 
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.10.0
4
+ version: 0.10.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-02-13 00:00:00.000000000 Z
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport