addressing 0.7.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/data/address_formats.dump +0 -0
- data/data/address_formats.json +10 -10
- data/data/country/hi-Latn.json +1 -1
- data/data/subdivision/UA.json +31 -31
- data/lib/addressing/country.rb +2 -2
- data/lib/addressing/postal_label_formatter.rb +1 -1
- data/lib/addressing/version.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8233bf8cb2abbf1e8d8fca6a882ee00505806169c94963c8ab896af7b41c0e48
|
4
|
+
data.tar.gz: 3c48631e3abe58f8a9c8be302937ac1216ca64f7414de2a18488dae48f445e56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4d1ebb1ac87064dc5be3a9680e07bcc2884744f2d0cbc14686b2944dabc98c1384a57af43e32357b59e0d9321c6c3321f31a25e6691fb5f499d0054d12b71cf
|
7
|
+
data.tar.gz: 88ded891be8e5c5e4ebcb13c7015280bf6f73b7249498d28f80fb13d37d2beaf911a9bccf0975196513aa288a2666cb83093dfdbdab99ae46bf99fcff049cf18
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
A Ruby addressing library, powered by CLDR and Google's address data.
|
4
4
|
|
5
|
-
- Countries, with translations for over 250 locales. Powered by [CLDR](http://cldr.unicode.org)
|
5
|
+
- Countries, with translations for over 250 locales. Powered by [CLDR](http://cldr.unicode.org) v45.
|
6
6
|
- Address formats for over 200 countries.
|
7
7
|
- Subdivisions (administrative areas, localities, dependent localities) for 60 countries.
|
8
8
|
- Both latin and local subdivision names, when relevant (e.g: Okinawa / 沖縄県).
|
data/data/address_formats.dump
CHANGED
Binary file
|
data/data/address_formats.json
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
{"country_code":"AX","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","required_fields":["address_line1","locality","postal_code"],"postal_code_pattern":"22\\d{3}","postal_code_prefix":"AX-"}
|
14
14
|
{"country_code":"AZ","format":"%given_name %additional_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{4}","postal_code_prefix":"AZ "}
|
15
15
|
{"country_code":"BA","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{5}"}
|
16
|
-
{"country_code":"BB","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality, %administrative_area %postal_code","administrative_area_type":"parish","postal_code_pattern":"BB\\d{5}","subdivision_depth":1}
|
16
|
+
{"country_code":"BB","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality, %administrative_area %postal_code","required_fields":["address_line1","locality","administrative_area"],"administrative_area_type":"parish","postal_code_pattern":"BB\\d{5}","subdivision_depth":1}
|
17
17
|
{"country_code":"BD","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality - %postal_code","postal_code_pattern":"\\d{4}"}
|
18
18
|
{"country_code":"BE","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","required_fields":["address_line1","locality","postal_code"],"postal_code_pattern":"\\d{4}"}
|
19
19
|
{"country_code":"BF","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %sorting_code"}
|
@@ -32,12 +32,12 @@
|
|
32
32
|
{"country_code":"CC","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code","uppercase_fields":["locality"],"postal_code_pattern":"6799"}
|
33
33
|
{"country_code":"CH","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":[],"postal_code_pattern":"\\d{4}"}
|
34
34
|
{"country_code":"CI","format":"%given_name %family_name\n%organization\n%sorting_code %address_line1\n%address_line2\n%address_line3 %locality %sorting_code"}
|
35
|
-
{"country_code":"CL","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality\n%administrative_area","postal_code_pattern":"\\d{7}","subdivision_depth":2}
|
35
|
+
{"country_code":"CL","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality\n%administrative_area","required_fields":["address_line1","locality","administrative_area"],"administrative_area_type":"region","postal_code_pattern":"\\d{7}","subdivision_depth":2}
|
36
36
|
{"country_code":"CN","locale":"zh-Hans","format":"%family_name %given_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality\n%locality\n%administrative_area, %postal_code","local_format":"%postal_code\n%administrative_area%locality%dependent_locality\n%address_line1\n%address_line2\n%address_line3\n%organization\n%family_name %given_name","required_fields":["address_line1","locality","administrative_area","postal_code"],"uppercase_fields":["administrative_area"],"dependent_locality_type":"district","postal_code_pattern":"\\d{6}","subdivision_depth":3}
|
37
37
|
{"country_code":"CO","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality, %administrative_area, %postal_code","required_fields":["address_line1","locality","administrative_area"],"administrative_area_type":"department","postal_code_pattern":"\\d{6}","subdivision_depth":1}
|
38
38
|
{"country_code":"CR","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%administrative_area, %locality\n%postal_code","required_fields":["address_line1","locality","administrative_area"],"postal_code_pattern":"\\d{4,5}|\\d{3}-\\d{4}","subdivision_depth":1}
|
39
39
|
{"country_code":"CU","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %administrative_area\n%postal_code","postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
40
|
-
{"country_code":"CV","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality\n%administrative_area","administrative_area_type":"island","postal_code_pattern":"\\d{4}","subdivision_depth":1}
|
40
|
+
{"country_code":"CV","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality\n%administrative_area","required_fields":["address_line1","locality","administrative_area"],"administrative_area_type":"island","postal_code_pattern":"\\d{4}","subdivision_depth":1}
|
41
41
|
{"country_code":"CX","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code","uppercase_fields":["locality"],"postal_code_pattern":"6798"}
|
42
42
|
{"country_code":"CY","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{4}"}
|
43
43
|
{"country_code":"CZ","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","required_fields":["address_line1","locality","postal_code"],"postal_code_pattern":"\\d{3} ?\\d{2}"}
|
@@ -47,7 +47,7 @@
|
|
47
47
|
{"country_code":"DZ","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{5}"}
|
48
48
|
{"country_code":"EC","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code\n%locality","uppercase_fields":["locality","postal_code"],"postal_code_pattern":"\\d{6}"}
|
49
49
|
{"country_code":"EE","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality %administrative_area","required_fields":["address_line1","locality","postal_code"],"administrative_area_type":"county","postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
50
|
-
{"country_code":"EG","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%administrative_area\n%postal_code","postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
50
|
+
{"country_code":"EG","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%administrative_area\n%postal_code","required_fields":["address_line1","locality","administrative_area"],"postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
51
51
|
{"country_code":"EH","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{5}"}
|
52
52
|
{"country_code":"ES","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality %administrative_area","required_fields":["address_line1","locality","administrative_area","postal_code"],"uppercase_fields":["locality","administrative_area"],"postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
53
53
|
{"country_code":"ET","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{4}"}
|
@@ -82,7 +82,7 @@
|
|
82
82
|
{"country_code":"IN","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code\n%administrative_area","required_fields":["address_line1","locality","administrative_area","postal_code"],"administrative_area_type":"state","postal_code_type":"pin","postal_code_pattern":"\\d{6}","subdivision_depth":1}
|
83
83
|
{"country_code":"IO","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["locality","postal_code"],"postal_code_pattern":"BBND 1ZZ"}
|
84
84
|
{"country_code":"IQ","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%locality, %administrative_area\n%postal_code","required_fields":["address_line1","locality","administrative_area"],"uppercase_fields":["locality","administrative_area"],"postal_code_pattern":"\\d{5}"}
|
85
|
-
{"country_code":"IR","format":"%organization\n%given_name %family_name\n%administrative_area\n%locality, %dependent_locality\n%address_line1\n%address_line2\n%address_line3\n%postal_code","dependent_locality_type":"neighborhood","postal_code_pattern":"\\d{5}-?\\d{5}","subdivision_depth":1}
|
85
|
+
{"country_code":"IR","format":"%organization\n%given_name %family_name\n%administrative_area\n%locality, %dependent_locality\n%address_line1\n%address_line2\n%address_line3\n%postal_code","required_fields":["address_line1","locality","administrative_area"],"dependent_locality_type":"neighborhood","postal_code_pattern":"\\d{5}-?\\d{5}","subdivision_depth":1}
|
86
86
|
{"country_code":"IS","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{3}"}
|
87
87
|
{"country_code":"IT","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality %administrative_area","required_fields":["address_line1","locality","administrative_area","postal_code"],"uppercase_fields":["locality","administrative_area"],"postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
88
88
|
{"country_code":"JE","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["locality","postal_code"],"postal_code_pattern":"JE\\d[\\dA-Z]? ?\\d[ABD-HJLN-UW-Z]{2}"}
|
@@ -92,7 +92,7 @@
|
|
92
92
|
{"country_code":"KE","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","postal_code_pattern":"\\d{5}"}
|
93
93
|
{"country_code":"KG","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{6}"}
|
94
94
|
{"country_code":"KH","format":"%family_name %given_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code","postal_code_pattern":"\\d{5,6}"}
|
95
|
-
{"country_code":"KI","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%administrative_area\n%locality","uppercase_fields":["address_line1","address_line2","address_line3","locality","family_name","additional_name","given_name","organization","administrative_area"],"administrative_area_type":"island","subdivision_depth":1}
|
95
|
+
{"country_code":"KI","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%administrative_area\n%locality","required_fields":["address_line1","locality","administrative_area"],"uppercase_fields":["address_line1","address_line2","address_line3","locality","family_name","additional_name","given_name","organization","administrative_area"],"administrative_area_type":"island","subdivision_depth":1}
|
96
96
|
{"country_code":"KM","uppercase_fields":["address_line1","address_line2","address_line3","locality"]}
|
97
97
|
{"country_code":"KN","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality, %administrative_area","required_fields":["address_line1","locality","administrative_area"],"administrative_area_type":"island","subdivision_depth":1}
|
98
98
|
{"country_code":"KP","locale":"ko","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%administrative_area, %postal_code","local_format":"%postal_code\n%administrative_area\n%locality\n%address_line1\n%address_line2\n%address_line3\n%organization\n%given_name %family_name","subdivision_depth":1}
|
@@ -128,7 +128,7 @@
|
|
128
128
|
{"country_code":"MV","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code","postal_code_pattern":"\\d{5}"}
|
129
129
|
{"country_code":"MW","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %sorting_code"}
|
130
130
|
{"country_code":"MX","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality\n%postal_code %locality, %administrative_area","required_fields":["address_line1","locality","administrative_area","postal_code"],"uppercase_fields":["locality","administrative_area","postal_code"],"administrative_area_type":"state","dependent_locality_type":"neighborhood","postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
131
|
-
{"country_code":"MY","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality\n%postal_code %locality\n%administrative_area","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["locality","administrative_area"],"administrative_area_type":"state","dependent_locality_type":"village_township","postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
131
|
+
{"country_code":"MY","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality\n%postal_code %locality\n%administrative_area","required_fields":["address_line1","locality","administrative_area","postal_code"],"uppercase_fields":["locality","administrative_area"],"administrative_area_type":"state","dependent_locality_type":"village_township","postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
132
132
|
{"country_code":"MZ","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality%administrative_area","postal_code_pattern":"\\d{4}","subdivision_depth":1}
|
133
133
|
{"country_code":"NA","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","postal_code_pattern":"\\d{5}"}
|
134
134
|
{"country_code":"NC","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["address_line1","address_line2","address_line3","locality"],"postal_code_pattern":"988\\d{2}"}
|
@@ -143,7 +143,7 @@
|
|
143
143
|
{"country_code":"NZ","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality\n%locality %postal_code","required_fields":["address_line1","locality","postal_code"],"locality_type":"town_city","postal_code_pattern":"\\d{4}"}
|
144
144
|
{"country_code":"OM","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code\n%locality","postal_code_pattern":"(?:PC )?\\d{3}"}
|
145
145
|
{"country_code":"PA","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%administrative_area","uppercase_fields":["locality","administrative_area"],"subdivision_depth":1}
|
146
|
-
{"country_code":"PE","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code\n%administrative_area","locality_type":"district","postal_code_pattern":"
|
146
|
+
{"country_code":"PE","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code\n%administrative_area","required_fields":["address_line1","locality","administrative_area"],"locality_type":"district","postal_code_pattern":"[0-2]\\d{4}","subdivision_depth":1}
|
147
147
|
{"country_code":"PF","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality %administrative_area","required_fields":["address_line1","locality","administrative_area","postal_code"],"uppercase_fields":["locality","administrative_area"],"administrative_area_type":"island","postal_code_pattern":"987\\d{2}"}
|
148
148
|
{"country_code":"PG","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code %administrative_area","required_fields":["address_line1","locality","administrative_area"],"postal_code_pattern":"\\d{3}","subdivision_depth":1}
|
149
149
|
{"country_code":"PH","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality, %locality\n%postal_code %administrative_area","postal_code_pattern":"\\d{4}","subdivision_depth":1}
|
@@ -179,7 +179,7 @@
|
|
179
179
|
{"country_code":"SZ","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","uppercase_fields":["address_line1","address_line2","address_line3","locality","postal_code"],"postal_code_pattern":"[HLMS]\\d{3}"}
|
180
180
|
{"country_code":"TA","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","postal_code_pattern":"TDCU 1ZZ"}
|
181
181
|
{"country_code":"TC","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["locality","postal_code"],"postal_code_pattern":"TKCA 1ZZ"}
|
182
|
-
{"country_code":"TH","locale":"th","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality, %locality\n%administrative_area %postal_code","local_format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality %locality\n%administrative_area %postal_code","uppercase_fields":["administrative_area"],"postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
182
|
+
{"country_code":"TH","locale":"th","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality, %locality\n%administrative_area %postal_code","local_format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%dependent_locality %locality\n%administrative_area %postal_code","required_fields":["address_line1","locality","administrative_area"],"uppercase_fields":["administrative_area"],"postal_code_pattern":"\\d{5}","subdivision_depth":1}
|
183
183
|
{"country_code":"TJ","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{6}"}
|
184
184
|
{"country_code":"TM","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{6}"}
|
185
185
|
{"country_code":"TN","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"\\d{4}"}
|
@@ -197,7 +197,7 @@
|
|
197
197
|
{"country_code":"VE","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code, %administrative_area","required_fields":["address_line1","locality","administrative_area"],"uppercase_fields":["locality","administrative_area"],"administrative_area_type":"state","postal_code_pattern":"\\d{4}","subdivision_depth":1}
|
198
198
|
{"country_code":"VG","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%postal_code","required_fields":["address_line1"],"postal_code_pattern":"VG\\d{4}"}
|
199
199
|
{"country_code":"VI","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality %postal_code","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["address_line1","address_line2","address_line3","locality","family_name","additional_name","given_name","organization"],"postal_code_type":"zip","postal_code_pattern":"(008(?:(?:[0-4]\\d)|(?:5[01])))(?:[ \\-](\\d{4}))?"}
|
200
|
-
{"country_code":"VN","format":"%family_name %given_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%administrative_area %postal_code","postal_code_pattern":"\\d{5}\\d?","subdivision_depth":1}
|
200
|
+
{"country_code":"VN","format":"%family_name %given_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%locality\n%administrative_area %postal_code","required_fields":["address_line1","locality","administrative_area"],"postal_code_pattern":"\\d{5}\\d?","subdivision_depth":1}
|
201
201
|
{"country_code":"WF","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["address_line1","address_line2","address_line3","locality"],"postal_code_pattern":"986\\d{2}"}
|
202
202
|
{"country_code":"XK","format":"%given_name %family_name\n%organization\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","postal_code_pattern":"[1-7]\\d{4}"}
|
203
203
|
{"country_code":"YT","format":"%organization\n%given_name %family_name\n%address_line1\n%address_line2\n%address_line3\n%postal_code %locality","required_fields":["address_line1","locality","postal_code"],"uppercase_fields":["address_line1","address_line2","address_line3","locality"],"postal_code_pattern":"976\\d{2}"}
|
data/data/country/hi-Latn.json
CHANGED
@@ -25,6 +25,7 @@
|
|
25
25
|
"BZ": "Belize",
|
26
26
|
"BJ": "Benin",
|
27
27
|
"BM": "Bermuda",
|
28
|
+
"IN": "Bharat",
|
28
29
|
"BT": "Bhutan",
|
29
30
|
"BO": "Bolivia",
|
30
31
|
"BA": "Bosnia & Herzegovina",
|
@@ -107,7 +108,6 @@
|
|
107
108
|
"HK": "Hong Kong SAR China",
|
108
109
|
"HU": "Hungary",
|
109
110
|
"IS": "Iceland",
|
110
|
-
"IN": "India",
|
111
111
|
"ID": "Indonesia",
|
112
112
|
"IR": "Iran",
|
113
113
|
"IQ": "Iraq",
|
data/data/subdivision/UA.json
CHANGED
@@ -3,115 +3,115 @@
|
|
3
3
|
"locale": "uk",
|
4
4
|
"subdivisions": {
|
5
5
|
"43": {
|
6
|
-
"name": "
|
6
|
+
"name": "Avtonomna Respublika Krym",
|
7
7
|
"local_name": "Автономна Республіка Крим"
|
8
8
|
},
|
9
9
|
"05": {
|
10
|
-
"name": "
|
10
|
+
"name": "Vinnytska oblast",
|
11
11
|
"local_name": "Вінницька область"
|
12
12
|
},
|
13
13
|
"07": {
|
14
|
-
"name": "
|
14
|
+
"name": "Volynska oblast",
|
15
15
|
"local_name": "Волинська область"
|
16
16
|
},
|
17
17
|
"12": {
|
18
|
-
"name": "
|
18
|
+
"name": "Dnipropetrovska oblast",
|
19
19
|
"local_name": "Дніпропетровська область"
|
20
20
|
},
|
21
21
|
"14": {
|
22
|
-
"name": "
|
22
|
+
"name": "Donetska oblast",
|
23
23
|
"local_name": "Донецька область"
|
24
24
|
},
|
25
25
|
"18": {
|
26
|
-
"name": "
|
26
|
+
"name": "Zhytomyrska oblast",
|
27
27
|
"local_name": "Житомирська область"
|
28
28
|
},
|
29
29
|
"21": {
|
30
|
-
"name": "
|
30
|
+
"name": "Zakarpatska oblast",
|
31
31
|
"local_name": "Закарпатська область"
|
32
32
|
},
|
33
33
|
"23": {
|
34
|
-
"name": "
|
34
|
+
"name": "Zaporizka oblast",
|
35
35
|
"local_name": "Запорізька область"
|
36
36
|
},
|
37
37
|
"26": {
|
38
|
-
"name": "Ivano-
|
38
|
+
"name": "Ivano-Frankivska oblast",
|
39
39
|
"local_name": "Івано-Франківська область"
|
40
40
|
},
|
41
41
|
"30": {
|
42
|
-
"code": "Kyiv
|
43
|
-
"local_code": "
|
44
|
-
"name": "Kyiv
|
42
|
+
"code": "Misto Kyiv",
|
43
|
+
"local_code": "Місто Київ",
|
44
|
+
"name": "Kyiv",
|
45
45
|
"local_name": "Київ"
|
46
46
|
},
|
47
47
|
"32": {
|
48
|
-
"name": "
|
48
|
+
"name": "Kyivska oblast",
|
49
49
|
"local_name": "Київська область"
|
50
50
|
},
|
51
51
|
"35": {
|
52
|
-
"name": "
|
52
|
+
"name": "Kirovohradska oblast",
|
53
53
|
"local_name": "Кіровоградська область"
|
54
54
|
},
|
55
55
|
"09": {
|
56
|
-
"name": "
|
56
|
+
"name": "Luhanska oblast",
|
57
57
|
"local_name": "Луганська область"
|
58
58
|
},
|
59
59
|
"46": {
|
60
|
-
"name": "
|
60
|
+
"name": "Lvivska oblast",
|
61
61
|
"local_name": "Львівська область"
|
62
62
|
},
|
63
63
|
"48": {
|
64
|
-
"name": "
|
64
|
+
"name": "Mykolaivska oblast",
|
65
65
|
"local_name": "Миколаївська область"
|
66
66
|
},
|
67
67
|
"51": {
|
68
|
-
"name": "
|
68
|
+
"name": "Odeska oblast",
|
69
69
|
"local_name": "Одеська область"
|
70
70
|
},
|
71
71
|
"53": {
|
72
|
-
"name": "
|
72
|
+
"name": "Poltavska oblast",
|
73
73
|
"local_name": "Полтавська область"
|
74
74
|
},
|
75
75
|
"56": {
|
76
|
-
"name": "
|
76
|
+
"name": "Rivnenska oblast",
|
77
77
|
"local_name": "Рівненська область"
|
78
78
|
},
|
79
79
|
"40": {
|
80
|
-
"code": "Sevastopol
|
81
|
-
"local_code": "
|
82
|
-
"name": "Sevastopol
|
80
|
+
"code": "Misto Sevastopol",
|
81
|
+
"local_code": "Місто Севастополь",
|
82
|
+
"name": "Sevastopol",
|
83
83
|
"local_name": "Севастополь"
|
84
84
|
},
|
85
85
|
"59": {
|
86
|
-
"name": "
|
86
|
+
"name": "Sumska oblast",
|
87
87
|
"local_name": "Сумська область"
|
88
88
|
},
|
89
89
|
"61": {
|
90
|
-
"name": "
|
90
|
+
"name": "Ternopilska oblast",
|
91
91
|
"local_name": "Тернопільська область"
|
92
92
|
},
|
93
93
|
"63": {
|
94
|
-
"name": "
|
94
|
+
"name": "Kharkivska oblast",
|
95
95
|
"local_name": "Харківська область"
|
96
96
|
},
|
97
97
|
"65": {
|
98
|
-
"name": "
|
98
|
+
"name": "Khersonska oblast",
|
99
99
|
"local_name": "Херсонська область"
|
100
100
|
},
|
101
101
|
"68": {
|
102
|
-
"name": "
|
102
|
+
"name": "Khmelnytska oblast",
|
103
103
|
"local_name": "Хмельницька область"
|
104
104
|
},
|
105
105
|
"71": {
|
106
|
-
"name": "
|
106
|
+
"name": "Cherkaska oblast",
|
107
107
|
"local_name": "Черкаська область"
|
108
108
|
},
|
109
109
|
"77": {
|
110
|
-
"name": "
|
110
|
+
"name": "Chernivetska oblast",
|
111
111
|
"local_name": "Чернівецька область"
|
112
112
|
},
|
113
113
|
"74": {
|
114
|
-
"name": "
|
114
|
+
"name": "Chernihivska oblast",
|
115
115
|
"local_name": "Чернігівська область"
|
116
116
|
}
|
117
117
|
}
|
data/lib/addressing/country.rb
CHANGED
@@ -139,7 +139,7 @@ module Addressing
|
|
139
139
|
"CR" => ["CRI", "188", "CRC"],
|
140
140
|
"CU" => ["CUB", "192", "CUP"],
|
141
141
|
"CV" => ["CPV", "132", "CVE"],
|
142
|
-
"CW" => ["CUW", "531", "
|
142
|
+
"CW" => ["CUW", "531", "XCG"],
|
143
143
|
"CX" => ["CXR", "162", "AUD"],
|
144
144
|
"CY" => ["CYP", "196", "EUR"],
|
145
145
|
"CZ" => ["CZE", "203", "CZK"],
|
@@ -300,7 +300,7 @@ module Addressing
|
|
300
300
|
"SS" => ["SSD", "728", "SSP"],
|
301
301
|
"ST" => ["STP", "678", "STN"],
|
302
302
|
"SV" => ["SLV", "222", "USD"],
|
303
|
-
"SX" => ["SXM", "534", "
|
303
|
+
"SX" => ["SXM", "534", "XCG"],
|
304
304
|
"SY" => ["SYR", "760", "SYP"],
|
305
305
|
"SZ" => ["SWZ", "748", "SZL"],
|
306
306
|
"TA" => ["TAA", nil, "GBP"],
|
@@ -15,7 +15,7 @@ module Addressing
|
|
15
15
|
def build_view(address, address_format, options)
|
16
16
|
raise ArgumentError, "The origin_country option cannot be empty." if options[:origin_country].empty?
|
17
17
|
|
18
|
-
view = super
|
18
|
+
view = super
|
19
19
|
view = view.map do |key, element|
|
20
20
|
# Uppercase fields where required by the format.
|
21
21
|
element[:value] = element[:value].upcase if address_format.uppercase_fields.include?(key)
|
data/lib/addressing/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: addressing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin van der Vleuten
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: robinvdvleuten@gmail.com
|
@@ -724,7 +724,9 @@ files:
|
|
724
724
|
homepage: https://github.com/robinvdvleuten/addressing
|
725
725
|
licenses:
|
726
726
|
- MIT
|
727
|
-
metadata:
|
727
|
+
metadata:
|
728
|
+
bug_tracker_uri: https://github.com/robinvdvleuten/addressing/issues
|
729
|
+
changelog_uri: https://github.com/robinvdvleuten/addressing/blob/main/CHANGELOG.md
|
728
730
|
post_install_message:
|
729
731
|
rdoc_options: []
|
730
732
|
require_paths:
|
@@ -733,14 +735,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
733
735
|
requirements:
|
734
736
|
- - ">="
|
735
737
|
- !ruby/object:Gem::Version
|
736
|
-
version: '3.
|
738
|
+
version: '3.1'
|
737
739
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
738
740
|
requirements:
|
739
741
|
- - ">="
|
740
742
|
- !ruby/object:Gem::Version
|
741
743
|
version: '0'
|
742
744
|
requirements: []
|
743
|
-
rubygems_version: 3.
|
745
|
+
rubygems_version: 3.5.6
|
744
746
|
signing_key:
|
745
747
|
specification_version: 4
|
746
748
|
summary: Addressing library powered by CLDR and Google's address data
|