address_composer 0.1.3.pre → 0.1.4.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/address-formatting/README.md +1 -0
- data/address-formatting/conf/abbreviations/ru.yaml +45 -0
- data/address-formatting/conf/components.yaml +3 -0
- data/address-formatting/conf/countries/worldwide.yaml +11 -3
- data/address-formatting/conf/county_codes.yaml +10 -3
- data/address-formatting/conf/state_codes.yaml +55 -18
- data/address-formatting/testcases/countries/gb.yaml +18 -2
- data/address-formatting/testcases/countries/hm.yaml +1 -0
- data/address-formatting/testcases/countries/ru.yaml +30 -0
- data/lib/address_composer.rb +1 -1
- data/lib/address_composer/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f51d8002a7fe546e3ceb4ccef4dc20d998e60495
|
4
|
+
data.tar.gz: db7a8b613c2df380ea7eac633fc715594b592c74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5839e91856f2043ee4afeca9623259df5beb80f1ba3848ca868799278183f3d85c52aa3d1fb635e256f66f8fa14d3b12636150fc802410a8765777df5dbe2c4c
|
7
|
+
data.tar.gz: fc1babb20fa8743984781f6392e484938df8906dd0c09a029b74d126b8b1b32d1d5c2d6b0c8b94c1c7ef4ef307af5b6d644a0090811a3857b3bd3239ad3f7b82
|
data/Gemfile.lock
CHANGED
@@ -55,6 +55,7 @@ There are open-source implementations in
|
|
55
55
|
* [Javascript](https://github.com/fragaria/address-formatter)
|
56
56
|
* [Perl](https://metacpan.org/release/Geo-Address-Formatter)
|
57
57
|
* [PHP](https://github.com/predicthq/address-formatter-php)
|
58
|
+
* [Ruby](https://github.com/mirubiri/address_composer)
|
58
59
|
* [Rust](https://github.com/CanalTP/address-formatter-rs)
|
59
60
|
|
60
61
|
We would love more language implementations. The more people who use the templates, the more likely bugs will be reported.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
country:
|
2
|
+
Российская Федерация: РФ
|
3
|
+
state:
|
4
|
+
автономный округ: АО
|
5
|
+
автономная область: Аобл
|
6
|
+
область: обл
|
7
|
+
Республика: Респ
|
8
|
+
county:
|
9
|
+
городской округ: г.о.
|
10
|
+
сельский округ: с.о.
|
11
|
+
район: р-н
|
12
|
+
city:
|
13
|
+
город: г
|
14
|
+
сельское поселение: с.п.
|
15
|
+
сельский совет: с.с.
|
16
|
+
village:
|
17
|
+
поселок: пос
|
18
|
+
посёлок: пос
|
19
|
+
дачный поселок: дп
|
20
|
+
дачный посёлок: дп
|
21
|
+
деревня: д
|
22
|
+
курортный поселок: кп
|
23
|
+
курортный посёлок: кп
|
24
|
+
местечко: м
|
25
|
+
село: с
|
26
|
+
станица: ст-ца
|
27
|
+
поселок городского типа: пгт
|
28
|
+
посёлок городского типа: пгт
|
29
|
+
neighbourhood:
|
30
|
+
квартал: кв-л
|
31
|
+
район: р-н
|
32
|
+
микрорайон: мкр
|
33
|
+
road:
|
34
|
+
улица: ул
|
35
|
+
дорога: дор
|
36
|
+
переулок: пер
|
37
|
+
шоссе: ш
|
38
|
+
проспект: пр-кт
|
39
|
+
проезд: пр
|
40
|
+
площадь: пл
|
41
|
+
бульвар: б-р
|
42
|
+
набережная: наб
|
43
|
+
корпус: корп
|
44
|
+
строение: стр
|
45
|
+
тупик: туп
|
@@ -33,6 +33,7 @@ aliases:
|
|
33
33
|
- city_district
|
34
34
|
- district
|
35
35
|
- quarter
|
36
|
+
- city_block
|
36
37
|
- residential
|
37
38
|
- commercial
|
38
39
|
- industrial
|
@@ -52,6 +53,8 @@ aliases:
|
|
52
53
|
name: state_district
|
53
54
|
---
|
54
55
|
name: postcode
|
56
|
+
aliases:
|
57
|
+
- partial_postcode
|
55
58
|
---
|
56
59
|
name: state
|
57
60
|
aliases:
|
@@ -79,7 +79,7 @@ generic10: &generic10 |
|
|
79
79
|
{{{attention}}}
|
80
80
|
{{{house}}}
|
81
81
|
{{{road}}} {{{house_number}}}
|
82
|
-
{{{suburb}}}
|
82
|
+
{{#first}} {{{suburb}}} || {{{city_district}}} {{/first}}
|
83
83
|
{{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
|
84
84
|
{{{state}}}
|
85
85
|
{{{country}}}
|
@@ -191,7 +191,7 @@ fallback1: &fallback1 |
|
|
191
191
|
{{{attention}}}
|
192
192
|
{{{house}}}
|
193
193
|
{{{road}}} {{{house_number}}}
|
194
|
-
{{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
|
194
|
+
{{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{island}}} {{/first}}
|
195
195
|
{{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
|
196
196
|
{{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
|
197
197
|
{{{country}}}
|
@@ -208,7 +208,7 @@ fallback3: &fallback3 |
|
|
208
208
|
{{{attention}}}
|
209
209
|
{{{house}}}
|
210
210
|
{{{road}}} {{{house_number}}}
|
211
|
-
{{{suburb}}}
|
211
|
+
{{#first}} {{{suburb}}} || {{{island}}} {{/first}}
|
212
212
|
{{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
|
213
213
|
{{{county}}}
|
214
214
|
{{{state}}}
|
@@ -1621,6 +1621,14 @@ RS:
|
|
1621
1621
|
# Russia
|
1622
1622
|
RU:
|
1623
1623
|
address_template: *generic10
|
1624
|
+
fallback_template: |
|
1625
|
+
{{{attention}}}
|
1626
|
+
{{{house}}}
|
1627
|
+
{{{road}}} {{{house_number}}}
|
1628
|
+
{{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{island}}} || {{{village}}} {{/first}}
|
1629
|
+
{{#first}} {{{city}}} || {{{town}}} {{/first}}
|
1630
|
+
{{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
|
1631
|
+
{{{country}}}
|
1624
1632
|
|
1625
1633
|
# Rwanda
|
1626
1634
|
RW:
|
@@ -3,7 +3,9 @@ ES:
|
|
3
3
|
AB: Albacete
|
4
4
|
AL: Almería
|
5
5
|
AV: Ávila
|
6
|
-
B:
|
6
|
+
B:
|
7
|
+
default: Barcelonés
|
8
|
+
alt_ca: Barcelonès
|
7
9
|
BA: Badajoz
|
8
10
|
BI: Vizcaya
|
9
11
|
BU: Burgos
|
@@ -15,13 +17,18 @@ ES:
|
|
15
17
|
CS: Castellón
|
16
18
|
CU: Cuenca
|
17
19
|
GC: Las Palmas
|
18
|
-
GI:
|
20
|
+
GI:
|
21
|
+
default: Gironés
|
22
|
+
alt_ca: Gironès
|
23
|
+
alt_en: Girona
|
19
24
|
GR: Granada
|
20
25
|
GU: Guadalajara
|
21
26
|
H: Huelva
|
22
27
|
HU: Huesca
|
23
28
|
J: Jaén
|
24
|
-
L:
|
29
|
+
L:
|
30
|
+
default: Lérida
|
31
|
+
alt_ca: Lleida
|
25
32
|
LE: León
|
26
33
|
LO: La Rioja
|
27
34
|
LU: Lugo
|
@@ -505,7 +505,9 @@ DE:
|
|
505
505
|
BB: Brandenburg
|
506
506
|
BE: Berlin
|
507
507
|
BW: Baden-Württemberg
|
508
|
-
BY:
|
508
|
+
BY:
|
509
|
+
default: Bayern
|
510
|
+
alt_en: Bavaria
|
509
511
|
HB: Bremen
|
510
512
|
HE: Hessen
|
511
513
|
HH: Hamburg
|
@@ -559,7 +561,10 @@ ES:
|
|
559
561
|
CL : Castilla y León
|
560
562
|
CM : Castilla-La Mancha
|
561
563
|
CN : Canarias
|
562
|
-
CT :
|
564
|
+
CT :
|
565
|
+
default: Cataluña
|
566
|
+
alt_ca: Catalunya
|
567
|
+
alt_en: Catalonia
|
563
568
|
EX : Extremadura
|
564
569
|
GA : Galicia
|
565
570
|
IB : Islas Baleares
|
@@ -1145,22 +1150,54 @@ PK:
|
|
1145
1150
|
SD: Sindh
|
1146
1151
|
TA: Federally Administered Tribal Areas
|
1147
1152
|
PL:
|
1148
|
-
DS:
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1153
|
+
DS:
|
1154
|
+
default: województwo dolnośląskie
|
1155
|
+
alt_en: Lower Silesian Voivodeship
|
1156
|
+
KP:
|
1157
|
+
default: województwo kujawsko-pomorskie
|
1158
|
+
alt_en: Kuyavian-Pomeranian Voivodeship
|
1159
|
+
LB:
|
1160
|
+
default: województwo lubuskie
|
1161
|
+
alt_en: Lubusz Voivodeship
|
1162
|
+
LD:
|
1163
|
+
default: województwo łódzkie
|
1164
|
+
alt_en: Łódź Voivodeship
|
1165
|
+
LU:
|
1166
|
+
default: województwo lubelskie
|
1167
|
+
alt_en: Lublin Voivodeship
|
1168
|
+
MA:
|
1169
|
+
default: województwo mazowieckie
|
1170
|
+
alt_en: Masovian Voivodeship
|
1171
|
+
MP:
|
1172
|
+
default: województwo małopolskie
|
1173
|
+
alt_en: Lesser Poland Voivodeship
|
1174
|
+
OP:
|
1175
|
+
default: województwo opolskie
|
1176
|
+
alt_en: Opole Voivodeship
|
1177
|
+
PD:
|
1178
|
+
default: województwo podlaskie
|
1179
|
+
alt_en: Podlaskie Voivodeship
|
1180
|
+
PK:
|
1181
|
+
default: województwo podkarpackie
|
1182
|
+
alt_en: Subcarpathian Voivodeship
|
1183
|
+
PM:
|
1184
|
+
default: województwo pomorskie
|
1185
|
+
alt_en: Pomeranian Voivodeship
|
1186
|
+
SK:
|
1187
|
+
default: województwo świętokrzyskie
|
1188
|
+
alt_en: Świętokrzyskie Voivodeship
|
1189
|
+
SL:
|
1190
|
+
default: województwo śląskie
|
1191
|
+
alt_en: Silesian Voivodeship
|
1192
|
+
WM:
|
1193
|
+
default: województwo warmińsko-mazurskie
|
1194
|
+
alt_en: Warmian-Masurian Voivodeship
|
1195
|
+
WP:
|
1196
|
+
default: województwo wielkopolskie
|
1197
|
+
alt_en: Greater Poland Voivodeship
|
1198
|
+
ZP:
|
1199
|
+
default: województwo zachodniopomorskie
|
1200
|
+
alt_en: West Pomeranian Voivodeship
|
1164
1201
|
RO:
|
1165
1202
|
AB: Alba
|
1166
1203
|
AG: Argeş
|
@@ -143,5 +143,21 @@ expected: |
|
|
143
143
|
64 Melbourne Road
|
144
144
|
London E10
|
145
145
|
United Kingdom
|
146
|
-
|
147
|
-
|
146
|
+
---
|
147
|
+
description: London Borough of Waltham Forest - partial_postcode
|
148
|
+
components:
|
149
|
+
city: London
|
150
|
+
country: United Kingdom
|
151
|
+
country_code: gb
|
152
|
+
county: London Borough of Waltham Forest
|
153
|
+
house_number: 64
|
154
|
+
neighbourhood: Walthamstow Village
|
155
|
+
partial_postcode: E10
|
156
|
+
road: Melbourne Road
|
157
|
+
state: England
|
158
|
+
state_district: Greater London
|
159
|
+
suburb: Leyton
|
160
|
+
expected: |
|
161
|
+
64 Melbourne Road
|
162
|
+
London E10
|
163
|
+
United Kingdom
|
@@ -20,3 +20,33 @@ expected: |
|
|
20
20
|
Санкт-Петербург
|
21
21
|
Российская Федерация
|
22
22
|
190000
|
23
|
+
---
|
24
|
+
description: village 55.8931701, 63.7019487
|
25
|
+
components:
|
26
|
+
city : Батуринский сельсовет
|
27
|
+
country : Россия
|
28
|
+
country_code : ru
|
29
|
+
county : Шадринский район
|
30
|
+
hamlet : Камчатка
|
31
|
+
state : Курганская область
|
32
|
+
expected: |
|
33
|
+
Камчатка
|
34
|
+
Батуринский сельсовет
|
35
|
+
Шадринский район
|
36
|
+
Россия
|
37
|
+
---
|
38
|
+
# island
|
39
|
+
description: use island name
|
40
|
+
components:
|
41
|
+
city : Малиновараккское сельское поселение
|
42
|
+
country : Россия
|
43
|
+
country_code : ru
|
44
|
+
county : Лоухский район
|
45
|
+
island : Ярославль
|
46
|
+
state : Республика Карелия
|
47
|
+
expected: |
|
48
|
+
Ярославль
|
49
|
+
Малиновараккское сельское поселение
|
50
|
+
Лоухский район
|
51
|
+
Россия
|
52
|
+
|
data/lib/address_composer.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: address_composer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Arrufat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mustache
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- address-formatting/conf/abbreviations/nl.yaml
|
134
134
|
- address-formatting/conf/abbreviations/pt.yaml
|
135
135
|
- address-formatting/conf/abbreviations/ro.yaml
|
136
|
+
- address-formatting/conf/abbreviations/ru.yaml
|
136
137
|
- address-formatting/conf/abbreviations/se.yaml
|
137
138
|
- address-formatting/conf/abbreviations/sk.yaml
|
138
139
|
- address-formatting/conf/abbreviations/tr.yaml
|