worldwide 1.15.0 → 1.15.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: d10d81c9b857f86106cd5bd152abbe999ca045435d904a932eb8f3df69a52293
4
- data.tar.gz: 7a2fa0a560b361db7ab472c6cc5676c9dd68518dc6fe49fe3b1c98f3dea1b98f
3
+ metadata.gz: c3cf97e1bcdf0999cdec177c2d6627b190ed8d8cd55598a676dee463f1cf86ff
4
+ data.tar.gz: a7f767ba103009a596ca24c969ed7459e0a6f3235d2cbd75a137cd4d2afdfe29
5
5
  SHA512:
6
- metadata.gz: e672163556eacb4fcdbbdef8859242fdd26f8575ed6c4d9c0c24fe16938b06d6c8e125fb2c8876f36829efe08ec3f09bbe78e8a3aab0d3ea763708f26c3422e7
7
- data.tar.gz: 7dda9172548c84533eb716b1c84fb26bf6383d5b31afc69da71efe7128b34a7ac72cfbc2b9231e9ebc415e57e91bf975067f28ae2a48d5186ffd883c8f29c4ad
6
+ metadata.gz: 85217f6eae5ff93bffa23de787d6131e22daa5614a61560c115d3b45c701b70e905543bc7385a3b20d144003cdae4e93eddb72a3db026927cc12cd4eff59576a
7
+ data.tar.gz: ac164a247f5eb618b189ead2912d427069f33d98911e45317919ce1fd127835bf432192480a77f386c6c7809428d1a983514a9f2c4acda35dbca3f96d2c3a9d1
data/CHANGELOG.md CHANGED
@@ -31,6 +31,12 @@ Nil.
31
31
 
32
32
  ---
33
33
 
34
+ ## [1.15.1] - 2024-12-20
35
+ - Set Malaysia and Singapore as tax_inclusive [#323](https://github.com/Shopify/worldwide/pull/323)
36
+ - Update or correct example zips [#324](https://github.com/Shopify/worldwide/pull/324)
37
+ - Correct zip regex patterns and make them Javascript-compatible [#325](https://github.com/Shopify/worldwide/pull/325)
38
+ ---
39
+
34
40
  ## [1.15.0] - 2024-12-16
35
41
  - Add zip requirement and tax inclusive methods to country regions [#320](https://github.com/Shopify/worldwide/pull/320)
36
42
  - Set Ireland (IE) zip as a required address field [#321](https://github.com/Shopify/worldwide/pull/321)
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- worldwide (1.15.0)
16
+ worldwide (1.15.1)
17
17
  activesupport (>= 7.0)
18
18
  i18n
19
19
  phonelib (~> 0.8)
data/data/regions/AC.yml CHANGED
@@ -10,7 +10,7 @@ code: AC
10
10
  unit_system: metric
11
11
  currency: SHP
12
12
  zip_example: ASCN 1ZZ
13
- zip_regex: "\\A[Aa][Ss][Cc][Nn]\\s*1[Zz][Zz]\\z"
13
+ zip_regex: "^[Aa][Ss][Cc][Nn]\\s*1[Zz][Zz]$"
14
14
  phone_number_prefix: 247
15
15
  zip_autofill_enabled: true
16
16
  format:
data/data/regions/BB.yml CHANGED
@@ -7,7 +7,7 @@ unit_system: metric
7
7
  tax_name: VAT
8
8
  group: Central American Countries
9
9
  group_name: Central America
10
- zip_example: BB2306
10
+ zip_example: BB15028
11
11
  zip_regex: "^(BB-?)?\\d{5,5}$"
12
12
  zip_requirement: optional
13
13
  phone_number_prefix: 1
data/data/regions/BF.yml CHANGED
@@ -8,7 +8,7 @@ tax_name: VAT
8
8
  group: African Countries
9
9
  group_name: Africa
10
10
  zip_regex: "^[1-9]\\d{4}$"
11
- zip_example: 10010
11
+ zip_example: "10010"
12
12
  zip_requirement: optional
13
13
  phone_number_prefix: 226
14
14
  format:
data/data/regions/BL.yml CHANGED
@@ -11,8 +11,8 @@ unit_system: metric
11
11
  tags:
12
12
  - EU-OCT
13
13
  currency: EUR
14
- zip_example: '97100'
15
- zip_regex: "^(BL-?)?97133$"
14
+ zip_example: '97091'
15
+ zip_regex: "^(BL-?)?(97133|9709\\d)$"
16
16
  phone_number_prefix: 590
17
17
  format:
18
18
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
data/data/regions/CA.yml CHANGED
@@ -5,7 +5,7 @@ tax: 0.05
5
5
  currency: CAD
6
6
  unit_system: metric
7
7
  tax_name: GST
8
- zip_regex: "\\A[A-Za-z]\\d[A-Za-z]\\s*\\d[A-Za-z]\\d\\z"
8
+ zip_regex: "^[A-Za-z]\\d[A-Za-z]\\s*\\d[A-Za-z]\\d$"
9
9
  partial_zip_regex: "^[A-Z][0-9][A-Z]$"
10
10
  group: North American Countries
11
11
  group_name: North America
data/data/regions/CR.yml CHANGED
@@ -7,7 +7,7 @@ unit_system: metric
7
7
  tax_name: VAT
8
8
  group: Central American Countries
9
9
  group_name: Central America
10
- zip_example: '1000'
10
+ zip_example: '10108'
11
11
  phone_number_prefix: 506
12
12
  week_start_day: sunday
13
13
  format:
data/data/regions/GB.yml CHANGED
@@ -11,7 +11,7 @@ ignore_zones: true
11
11
  group: European Countries
12
12
  group_name: Europe
13
13
  zip_label: Postcode
14
- zip_regex: '\A[A-Za-z]{1,2}[\d]{1,2}(?:[A-Za-z])?\s?[\d][A-Za-z]{2}\z'
14
+ zip_regex: "^[A-Za-z]{1,2}[\\d]{1,2}(?:[A-Za-z])?\\s?[\\d][A-Za-z]{2}$"
15
15
  partial_zip_regex: "^[A-Z]{1,2}[0-9]{1,2}[A-Z]?$"
16
16
  zip_example: SE22 8DL
17
17
  phone_number_prefix: 44
data/data/regions/IN.yml CHANGED
@@ -8,7 +8,7 @@ tax_name: CGST
8
8
  tax_inclusive: true
9
9
  group: Asian Countries
10
10
  group_name: Asia
11
- zip_regex: "\\A\\d{6}\\z"
11
+ zip_regex: "^\\d{6}$"
12
12
  zip_example: '110034'
13
13
  phone_number_prefix: 91
14
14
  week_start_day: monday
data/data/regions/JE.yml CHANGED
@@ -9,8 +9,8 @@ tax_inclusive: true
9
9
  group: European Countries
10
10
  group_name: Europe
11
11
  zip_example: JE1 1AA
12
- zip_regex: "^JE[1-6] {0,2}\\d[A-Z]{2}$"
13
- partial_zip_regex: "^JE[1-6]$"
12
+ zip_regex: "^JE\\d{1,2} {0,2}\\d[A-Z]{2}$"
13
+ partial_zip_regex: "^JE\\d{1,2}$"
14
14
  phone_number_prefix: 44
15
15
  format:
16
16
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{city}{zip}_{phone}"
data/data/regions/JP.yml CHANGED
@@ -9,8 +9,8 @@ tax_inclusive: true
9
9
  group: Asian Countries
10
10
  group_name: Asia
11
11
  zip_example: 154-0023
12
- zip_regex: "\\A〒?(\\d{7}|[0-9|0-9]{3}(-|ー)[0-9|0-9]{4})\\z"
13
- partial_zip_regex: "\\A〒?([0-9|0-9]{0,3})(-|ー?)([0-9|0-9]{0,4})\\z"
12
+ zip_regex: "^〒?(\\d{7}|[0-9|0-9]{3}(-|ー)[0-9|0-9]{4})$"
13
+ partial_zip_regex: "^〒?([0-9|0-9]{0,3})(-|ー?)([0-9|0-9]{0,4})$"
14
14
  phone_number_prefix: 81
15
15
  building_number_required: true
16
16
  building_number_may_be_in_address2: true
data/data/regions/KH.yml CHANGED
@@ -7,7 +7,7 @@ unit_system: metric
7
7
  tax_name: VAT
8
8
  group: Asian Countries
9
9
  group_name: Asia
10
- zip_example: '12203'
10
+ zip_example: '120203'
11
11
  phone_number_prefix: 855
12
12
  format:
13
13
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{city}{zip}_{phone}"
data/data/regions/KR.yml CHANGED
@@ -7,7 +7,7 @@ unit_system: metric
7
7
  tax_name: VAT
8
8
  group: Asian Countries
9
9
  group_name: Asia
10
- zip_regex: "(\\A\\d{5}\\z|\\A\\d{3}-\\d{3}\\z)"
10
+ zip_regex: "^(\\d{5}|\\d{3}-\\d{3})$"
11
11
  zip_example: '01600'
12
12
  phone_number_prefix: 82
13
13
  week_start_day: sunday
data/data/regions/MM.yml CHANGED
@@ -7,7 +7,7 @@ unit_system: metric
7
7
  tax_name: GST
8
8
  group: Asian Countries
9
9
  group_name: Asia
10
- zip_example: '11181'
10
+ zip_example: '1508203'
11
11
  phone_number_prefix: 95
12
12
  format:
13
13
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{city}{zip}_{phone}"
data/data/regions/MQ.yml CHANGED
@@ -13,14 +13,14 @@ group_name: Central America
13
13
  tags:
14
14
  - EU-OMR
15
15
  zip_example: '97220'
16
- zip_regex: "\\A(MQ-?)?((972)\\d{2,2})\\Z"
16
+ zip_regex: "^(MQ-?)?((972)\\d{2,2})$"
17
17
  phone_number_prefix: 596
18
18
  format:
19
19
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
20
20
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
21
21
  # The only flag with official standing in Martinique is the French flag.
22
22
  # The emoji flag sequence MQ renders as the "snake flag", which is resented by some as a symbol
23
- # of the slave trade. A new local flag, the Iséité flag, was brought into use in 2019, but
23
+ # of the slave trade. A new local flag, the Iséité flag, was brought into use in 2019, but
24
24
  # revoked in 2021. At this point, the safest course of action seems to be to use the French flag.
25
25
  # Sources: https://en.wikipedia.org/wiki/Flag_of_Martinique
26
26
  # https://www.rci.fm/martinique/infos/Justice/La-justice-annule-lutilisation-du-drapeau-et-de-lhymne-choisis-en-2019-par-la-CTM#
data/data/regions/MS.yml CHANGED
@@ -7,7 +7,7 @@ code: MS
7
7
  unit_system: metric
8
8
  currency: XCD
9
9
  zip_regex: "^MSR ?1[1-3][1235]0$"
10
- zip_example: MSR 1210
10
+ zip_example: MSR1210
11
11
  phone_number_prefix: 1
12
12
  format:
13
13
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{city}{zip}_{phone}"
data/data/regions/MU.yml CHANGED
@@ -8,7 +8,7 @@ tax_name: VAT
8
8
  tax_inclusive: true
9
9
  group: African Countries
10
10
  group_name: Africa
11
- zip_example: 11106
11
+ zip_example: "11106"
12
12
  zip_regex: "^[1-9AR]\\d{4}$"
13
13
  zip_requirement: optional
14
14
  phone_number_prefix: 230
data/data/regions/MW.yml CHANGED
@@ -11,7 +11,7 @@ group_name: Africa
11
11
  # https://macra.mw/malawi-post-codes/
12
12
  # https://www.grcdi.nl/gsb/malawi.html
13
13
  zip_regex: "^[1-3]\\d{5}$"
14
- zip_example: 207201
14
+ zip_example: "207201"
15
15
  zip_requirement: optional
16
16
  phone_number_prefix: 265
17
17
  format:
data/data/regions/MY.yml CHANGED
@@ -2,6 +2,7 @@
2
2
  name: Malaysia
3
3
  code: MY
4
4
  tax: 0.1
5
+ tax_inclusive: true
5
6
  currency: MYR
6
7
  unit_system: metric
7
8
  tax_name: SST
data/data/regions/NL.yml CHANGED
@@ -10,7 +10,7 @@ group: European Countries
10
10
  group_name: Europe
11
11
  tags:
12
12
  - EU-member
13
- zip_regex: "(?-mix:\\A[1-9][0-9]{3} ?[A-Z]{2}\\z)"
13
+ zip_regex: "^[1-9][0-9]{3} ?[A-Z]{2}$"
14
14
  partial_zip_regex: "^\\d{4}$"
15
15
  zip_example: 1065 AM
16
16
  phone_number_prefix: 31
data/data/regions/NZ.yml CHANGED
@@ -8,7 +8,7 @@ tax_name: GST
8
8
  tax_inclusive: true
9
9
  group: Oceanian Countries
10
10
  group_name: Oceania
11
- zip_regex: "\\A\\d{4}\\z"
11
+ zip_regex: "^\\d{4}$"
12
12
  zip_example: '6001'
13
13
  phone_number_prefix: 64
14
14
  building_number_required: true
data/data/regions/PH.yml CHANGED
@@ -8,7 +8,7 @@ tax_name: VAT
8
8
  zone_key: province
9
9
  group: Asian Countries
10
10
  group_name: Asia
11
- zip_regex: "\\A\\d{4}\\z"
11
+ zip_regex: "^\\d{4}$"
12
12
  zip_example: '1008'
13
13
  phone_number_prefix: 63
14
14
  week_start_day: sunday
data/data/regions/PM.yml CHANGED
@@ -12,7 +12,7 @@ tags:
12
12
  - EU-OCT
13
13
  zip_example: '97500'
14
14
  phone_number_prefix: 508
15
- zip_regex: "\\A(PM-?)?((975)\\d{2,2})\\Z"
15
+ zip_regex: "^(PM-?)?((975)\\d{2,2})$"
16
16
  format:
17
17
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
18
18
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
data/data/regions/PY.yml CHANGED
@@ -5,7 +5,7 @@ tax: 0.1
5
5
  currency: PYG
6
6
  unit_system: metric
7
7
  tax_name: IVA
8
- zip_example: '1536'
8
+ zip_example: '001015'
9
9
  group: South American Countries
10
10
  group_name: South America
11
11
  phone_number_prefix: 595
data/data/regions/SA.yml CHANGED
@@ -5,7 +5,7 @@ tax: 0.15
5
5
  currency: SAR
6
6
  unit_system: metric
7
7
  tax_name: VAT
8
- zip_regex: "(?-mix:\\A\\d{5}(-\\d{4})?\\z)"
8
+ zip_regex: "^\\d{5}(-\\d{4})?$"
9
9
  zip_requirement: optional
10
10
  group: Asian Countries
11
11
  group_name: Asia
data/data/regions/SG.yml CHANGED
@@ -2,6 +2,7 @@
2
2
  name: Singapore
3
3
  code: SG
4
4
  tax: 0.09
5
+ tax_inclusive: true
5
6
  currency: SGD
6
7
  unit_system: metric
7
8
  tax_name: GST
data/data/regions/SS.yml CHANGED
@@ -11,7 +11,7 @@ group_name: Africa
11
11
  # It is possible that some people may still be using old Sudan postcodes for addresses in South Sudan.
12
12
  # For that reason, we permit the entry of a postal code, but it is optional.
13
13
  zip_regex: "^\\d{5}$"
14
- zip_example: 81111 # Juba
14
+ zip_example: "81111" # Juba
15
15
  zip_requirement: optional
16
16
  phone_number_prefix: 211
17
17
  format:
data/data/regions/TA.yml CHANGED
@@ -9,7 +9,7 @@ unit_system: metric
9
9
  # Source: https://en.wikipedia.org/wiki/Saint_Helena_pound
10
10
  currency: GBP
11
11
  zip_example: TDCU 1ZZ
12
- zip_regex: "\\A[Tt][Dd][Cc][Uu]\\s*1[Zz][Zz]\\z"
12
+ zip_regex: "^[Tt][Dd][Cc][Uu]\\s*1[Zz][Zz]$"
13
13
  phone_number_prefix: 2908
14
14
  zip_autofill_enabled: true
15
15
  autofill_city_enabled: true
data/data/regions/UA.yml CHANGED
@@ -9,7 +9,7 @@ tax_inclusive: true
9
9
  group: European Countries
10
10
  group_name: Europe
11
11
  zip_example: '15432'
12
- zip_regex: "\\A\\d{5}\\z"
12
+ zip_regex: "^\\d{5}$"
13
13
  phone_number_prefix: 380
14
14
  week_start_day: monday
15
15
  format:
data/data/regions/US.yml CHANGED
@@ -10,7 +10,7 @@ group_name: North America
10
10
  name_alternates:
11
11
  - United States of America
12
12
  zip_label: Zip code
13
- zip_regex: "(?-mix:\\A\\d{5}(-\\d{4})?\\z)|(?i-mx:\\AFPO\\s*A[A-Z]\\s*\\d{5}-\\d{4}\\z)"
13
+ zip_regex: "^\\d{5}(-\\d{4})?$"
14
14
  zip_example: '90210'
15
15
  phone_number_prefix: 1
16
16
  building_number_required: true
data/data/regions/UZ.yml CHANGED
@@ -7,7 +7,7 @@ unit_system: metric
7
7
  tax_name: VAT
8
8
  group: Asian Countries
9
9
  group_name: Asia
10
- zip_example: '702100'
10
+ zip_example: '140100'
11
11
  zip_regex: "^(100|11[0-2]|12[01]|13[01]|14[01]|15[01]|16[01]|17[01]|18[01]|19[01]|20[01]|21[01]|22[01]|23[01])\\d{3}$"
12
12
  zip_requirement: optional
13
13
  phone_number_prefix: 998
data/data/regions/XK.yml CHANGED
@@ -11,7 +11,7 @@ tax_inclusive: true
11
11
  group: European Countries
12
12
  group_name: Europe
13
13
  zip_regex: "^((RKS|XK)-?)?[1-7]\\d{4}$"
14
- zip_example: 10000
14
+ zip_example: "10000"
15
15
  phone_number_prefix: 383
16
16
  week_start_day: monday
17
17
  zip_requirement: recommended
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "1.15.0"
4
+ VERSION = "1.15.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worldwide
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-12-16 00:00:00.000000000 Z
10
+ date: 2025-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -8494,7 +8493,6 @@ licenses: []
8494
8493
  metadata:
8495
8494
  allowed_push_host: https://rubygems.org/
8496
8495
  changelog_uri: https://github.com/Shopify/worldwide/blob/main/CHANGELOG.md
8497
- post_install_message:
8498
8496
  rdoc_options: []
8499
8497
  require_paths:
8500
8498
  - lib
@@ -8509,8 +8507,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
8509
8507
  - !ruby/object:Gem::Version
8510
8508
  version: '0'
8511
8509
  requirements: []
8512
- rubygems_version: 3.5.23
8513
- signing_key:
8510
+ rubygems_version: 3.6.2
8514
8511
  specification_version: 4
8515
8512
  summary: Internationalization and localization APIs
8516
8513
  test_files: []