From d479d12ddde72a6dd0e6fc35582d8cb85347270c Mon Sep 17 00:00:00 2001 From: Matt Garcia <32943094+itsgarcia@users.noreply.github.com> Date: Sun, 16 Dec 2018 16:42:21 -0500 Subject: [PATCH 1/2] Add Vanuatu (VU) to countries without postal codes As per https://github.com/Shopify/active_utils/pull/95 adds Vanuatu (VU) to list of countries not requiring postal codes. Refs: https://en.wikipedia.org/wiki/List_of_postal_codes - indicates no postal codes in Vanuatu https://www.iso.org/obp/ui/#iso:code:3166:VU - ISO code confirmation http://www.upu.int/fileadmin/documentsFiles/activities/addressingUnit/vutEn.pdf - UPU check as per previous review Based on https://github.com/Shopify/shopify/issues/182522 --- lib/active_utils/country.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_utils/country.rb b/lib/active_utils/country.rb index a88b3a4..76b9728 100644 --- a/lib/active_utils/country.rb +++ b/lib/active_utils/country.rb @@ -320,7 +320,7 @@ def to_s COUNTRIES_THAT_DO_NOT_USE_POSTALCODES = %w( QA BZ BS BF BJ AG AE AI AO AW HK FJ ML MW JM ZW YE UG TV TT TG TD PA - CW GH SS BO + CW GH SS BO VU ) def uses_postal_codes? From f77b27b6ddff606c7b782a8a646a77dfa2a203da Mon Sep 17 00:00:00 2001 From: Matt Garcia <32943094+itsgarcia@users.noreply.github.com> Date: Sun, 16 Dec 2018 16:52:11 -0500 Subject: [PATCH 2/2] Update country_test.rb --- test/unit/country_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/country_test.rb b/test/unit/country_test.rb index c9c4982..8b75ad5 100644 --- a/test/unit/country_test.rb +++ b/test/unit/country_test.rb @@ -72,7 +72,7 @@ def test_countries_that_do_not_use_postalcodes_are_unique def test_change_to_countries_that_do_not_use_postalcodes_is_intentional country_codes = Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES - assert_equal(country_codes.length, 27) + assert_equal(country_codes.length, 28) end def test_canada_uses_postal_codes