address_composer 0.1.2.pre → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/main.yml +25 -0
- data/.gitignore +2 -0
- data/.gitmodules +1 -1
- data/Gemfile.lock +24 -23
- data/README.md +3 -1
- data/address-formatting/.travis.yml +8 -6
- data/address-formatting/README.md +7 -3
- data/address-formatting/SECURITY.md +5 -0
- data/address-formatting/conf/abbreviations/{dk.yaml → da.yaml} +0 -3
- data/address-formatting/conf/abbreviations/de.yaml +0 -2
- data/address-formatting/conf/abbreviations/en.yaml +1 -1
- data/address-formatting/conf/abbreviations/fr.yaml +1 -1
- data/address-formatting/conf/abbreviations/hu.yaml +1 -2
- data/address-formatting/conf/abbreviations/nl.yaml +14 -1
- data/address-formatting/conf/abbreviations/no.yaml +16 -0
- data/address-formatting/conf/abbreviations/pl.yaml +24 -0
- data/address-formatting/conf/abbreviations/pt.yaml +0 -1
- data/address-formatting/conf/abbreviations/ru.yaml +45 -0
- data/address-formatting/conf/abbreviations/uk.yaml +0 -3
- data/address-formatting/conf/abbreviations/vn.yaml +7 -0
- data/address-formatting/conf/components.yaml +23 -4
- data/address-formatting/conf/countries/worldwide.yaml +166 -122
- data/address-formatting/conf/country2lang.yaml +3 -3
- data/address-formatting/conf/county_codes.yaml +369 -15
- data/address-formatting/conf/state_codes.yaml +1324 -129
- data/address-formatting/testcases/countries/as.yaml +7 -8
- data/address-formatting/testcases/countries/be.yaml +35 -0
- data/address-formatting/testcases/countries/bf.yaml +15 -1
- data/address-formatting/testcases/countries/ca.yaml +29 -5
- data/address-formatting/testcases/countries/cn.yaml +9 -0
- data/address-formatting/testcases/countries/de.yaml +1 -1
- data/address-formatting/testcases/countries/fr.yaml +81 -1
- data/address-formatting/testcases/countries/gb.yaml +90 -8
- data/address-formatting/testcases/countries/gg.yaml +2 -1
- data/address-formatting/testcases/countries/gu.yaml +2 -2
- data/address-formatting/testcases/countries/hk.yaml +18 -8
- data/address-formatting/testcases/countries/hm.yaml +1 -0
- data/address-formatting/testcases/countries/ie.yaml +45 -3
- data/address-formatting/testcases/countries/im.yaml +2 -1
- data/address-formatting/testcases/countries/je.yaml +2 -1
- data/address-formatting/testcases/countries/no.yaml +17 -0
- data/address-formatting/testcases/countries/pt.yaml +22 -0
- data/address-formatting/testcases/countries/ru.yaml +30 -0
- data/address-formatting/testcases/countries/sg.yaml +18 -1
- data/address-formatting/testcases/countries/sh.yaml +2 -1
- data/address-formatting/testcases/countries/ug.yaml +13 -0
- data/address-formatting/testcases/countries/um.yaml +1 -1
- data/address-formatting/testcases/countries/us.yaml +69 -2
- data/address-formatting/testcases/other/xx.yaml +28 -0
- data/address_composer.gemspec +4 -4
- data/lib/address_composer.rb +10 -9
- data/lib/address_composer/version.rb +1 -1
- metadata +24 -19
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 30e870bd8e39f5cf689942c7b4343f2d885f4de4ebdcb01878f8627c1b685039
|
4
|
+
data.tar.gz: '07117792510f3dd522c3443fabf1844f8039fbca6f08e94e550a59a86198244d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b2063f714d1f0100f71274808375364677430d213794b63e4d1eb4cfc95e8ac2e6eb56e7dd8464699da03a7614a6d3d7ac5578fa4106ea1bbcae1a605390dda
|
7
|
+
data.tar.gz: 385f17417dc4884f44ced76e8a5d48b631395a53213554e840ef87072315df43caddd5fde7515d3f5da75824c64f4de3bc8d288783e0419d2c9e6b29c9c7e9a0
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
rspec:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: [2.4, 2.5, 2.6, 2.7, 3.0]
|
10
|
+
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
with:
|
16
|
+
submodules: recursive
|
17
|
+
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
bundler-cache: true
|
23
|
+
|
24
|
+
- name: Run tests
|
25
|
+
run: bundle exec rake spec
|
data/.gitignore
CHANGED
data/.gitmodules
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,48 +1,49 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
address_composer (
|
4
|
+
address_composer (1.0.0)
|
5
5
|
mustache (~> 1.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
byebug (11.1.3)
|
11
|
-
coderay (1.1.
|
12
|
-
diff-lcs (1.
|
11
|
+
coderay (1.1.3)
|
12
|
+
diff-lcs (1.4.4)
|
13
13
|
method_source (1.0.0)
|
14
14
|
mustache (1.1.1)
|
15
|
-
pry (0.
|
15
|
+
pry (0.14.1)
|
16
16
|
coderay (~> 1.1)
|
17
17
|
method_source (~> 1.0)
|
18
|
-
pry-byebug (3.
|
18
|
+
pry-byebug (3.8.0)
|
19
19
|
byebug (~> 11.0)
|
20
|
-
pry (~> 0.
|
21
|
-
rake (13.0.
|
22
|
-
rspec (3.
|
23
|
-
rspec-core (~> 3.
|
24
|
-
rspec-expectations (~> 3.
|
25
|
-
rspec-mocks (~> 3.
|
26
|
-
rspec-core (3.
|
27
|
-
rspec-support (~> 3.
|
28
|
-
rspec-expectations (3.
|
20
|
+
pry (~> 0.10)
|
21
|
+
rake (13.0.6)
|
22
|
+
rspec (3.10.0)
|
23
|
+
rspec-core (~> 3.10.0)
|
24
|
+
rspec-expectations (~> 3.10.0)
|
25
|
+
rspec-mocks (~> 3.10.0)
|
26
|
+
rspec-core (3.10.1)
|
27
|
+
rspec-support (~> 3.10.0)
|
28
|
+
rspec-expectations (3.10.1)
|
29
29
|
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
-
rspec-support (~> 3.
|
31
|
-
rspec-mocks (3.
|
30
|
+
rspec-support (~> 3.10.0)
|
31
|
+
rspec-mocks (3.10.2)
|
32
32
|
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
-
rspec-support (~> 3.
|
34
|
-
rspec-support (3.
|
33
|
+
rspec-support (~> 3.10.0)
|
34
|
+
rspec-support (3.10.2)
|
35
35
|
|
36
36
|
PLATFORMS
|
37
37
|
ruby
|
38
|
+
x86_64-darwin-20
|
38
39
|
|
39
40
|
DEPENDENCIES
|
40
41
|
address_composer!
|
41
|
-
bundler (~>
|
42
|
-
pry (~> 0.
|
43
|
-
pry-byebug (~> 3.
|
42
|
+
bundler (~> 2.2)
|
43
|
+
pry (~> 0.14)
|
44
|
+
pry-byebug (~> 3.8)
|
44
45
|
rake (~> 13.0)
|
45
|
-
rspec (~> 3.
|
46
|
+
rspec (~> 3.10)
|
46
47
|
|
47
48
|
BUNDLED WITH
|
48
|
-
|
49
|
+
2.2.22
|
data/README.md
CHANGED
@@ -48,7 +48,9 @@ United States of America
|
|
48
48
|
|
49
49
|
## Development
|
50
50
|
|
51
|
-
After checking out the repo, run `
|
51
|
+
After checking out the repo, run `git submodule init` and `git submodule update` to fetch all the data from the submodule project and check out the mapped commit.
|
52
|
+
|
53
|
+
Then, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
52
54
|
|
53
55
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
54
56
|
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
2
|
-
language: 'perl'
|
1
|
+
language: perl
|
3
2
|
perl:
|
4
|
-
|
3
|
+
- '5.30'
|
5
4
|
env: PERL_CPANM_OPT="--notest --force --skip-satisfied"
|
6
5
|
install:
|
7
|
-
|
8
|
-
|
6
|
+
- cpanm File::Find::Rule~0.34
|
7
|
+
- cpanm Geo::Address::Formatter
|
9
8
|
script:
|
10
|
-
|
9
|
+
- bin/run_tests.t
|
10
|
+
notifications:
|
11
|
+
slack:
|
12
|
+
secure: M7U87fLJ7oXOPjFDBASOwhNZXqRoYsTYtPxVbAHlQfS1at38IfK7/6rWdf7yNUPCV0JqfRCsR7frWQNncR9BbjtYSoDFywY/IcdVMoOl3haZJqXbA/LfGgI9ZIBAx5nBUlZkBaaq/RhXoKlNbZ89p6zq3qyvsUIgmUSkNTGejRU=
|
@@ -6,7 +6,8 @@ This project contains templates and test cases for address formats used in terri
|
|
6
6
|
|
7
7
|
### Build Status
|
8
8
|
|
9
|
-
[![Build Status](https://travis-ci.
|
9
|
+
[![Build Status](https://travis-ci.com/OpenCageData/address-formatting.svg?branch=master)](https://travis-ci.com/OpenCageData/address-formatting)
|
10
|
+
[![Twitter Follow](https://img.shields.io/twitter/follow/OpenCage?label=Follow%20OpenCage&style=social)](https://twitter.com/opencage)
|
10
11
|
|
11
12
|
### An example:
|
12
13
|
|
@@ -51,11 +52,14 @@ Unlike [physical post (office) mail](http://www.bitboost.com/ref/international-a
|
|
51
52
|
Our goal with this repository is a series of (programming) language independent templates. Those templates can then be processed by whatever software you like.
|
52
53
|
|
53
54
|
There are open-source implementations in
|
54
|
-
|
55
|
+
* [Elixir](https://github.com/dkuku/ex_address_formatting)
|
56
|
+
* [Java](https://github.com/placemarkt/address-formatter-java)
|
55
57
|
* [Javascript](https://github.com/fragaria/address-formatter)
|
56
58
|
* [Perl](https://metacpan.org/release/Geo-Address-Formatter)
|
57
59
|
* [PHP](https://github.com/predicthq/address-formatter-php)
|
60
|
+
* [Ruby](https://github.com/mirubiri/address_composer)
|
58
61
|
* [Rust](https://github.com/CanalTP/address-formatter-rs)
|
62
|
+
* [Scala](https://github.com/ben-willis/address-formatter)
|
59
63
|
|
60
64
|
We would love more language implementations. The more people who use the templates, the more likely bugs will be reported.
|
61
65
|
If you write a processor, please submit a pull request adding it to the list. Thanks.
|
@@ -71,7 +75,7 @@ As of `Sun 17 Feb 2019` coverage is:
|
|
71
75
|
|
72
76
|
This output is generated by `bin/coverage.pl`
|
73
77
|
|
74
|
-
We need more language specific abbreviations. Please see `conf/abbreviations`. Pull requests
|
78
|
+
We need more language specific abbreviations. Please see `conf/abbreviations`. Pull requests gladly received.
|
75
79
|
|
76
80
|
A detailed breakdown of test and configuration coverage can be found by running `bin/coverage.pl -d`. A list of all known territories is in `conf/country_codes.yaml`
|
77
81
|
|
@@ -1,13 +1,26 @@
|
|
1
1
|
road:
|
2
|
+
Burgemeester: Burg
|
3
|
+
Docter: Dr
|
4
|
+
Dokter: Dr
|
5
|
+
Gebroeders: Gebr
|
6
|
+
Generaal: Gen
|
2
7
|
Gracht: Gr
|
8
|
+
Kardinaal: Kard
|
9
|
+
Kolonel: Kol
|
3
10
|
Kort: K
|
4
11
|
Korte: Kte
|
5
12
|
Laan: ln
|
6
13
|
Lange: L
|
7
14
|
Markt: mkt
|
15
|
+
Minister: Min
|
16
|
+
Monseigneur: Mgr
|
17
|
+
Pastoor: Past
|
18
|
+
Prins: Pr
|
19
|
+
Prinses: Pr
|
8
20
|
Professor: Prof
|
9
21
|
Sint: St
|
10
22
|
Straat: str
|
11
23
|
Van: v
|
24
|
+
Vrouwe: Vr
|
12
25
|
Weg: wg
|
13
|
-
|
26
|
+
Zuster: Zr
|
@@ -0,0 +1,24 @@
|
|
1
|
+
road:
|
2
|
+
Aleja: al.
|
3
|
+
Aleje: al.
|
4
|
+
Alei: al.
|
5
|
+
Alejach: al.
|
6
|
+
Aleją: al.
|
7
|
+
Biskupa: bpa.
|
8
|
+
Biskup: bp.
|
9
|
+
Doktora: dr.
|
10
|
+
Księcia: ks.
|
11
|
+
Księdza: ks.
|
12
|
+
Kardynała: kard.
|
13
|
+
Marszałka: marsz.
|
14
|
+
Majora: mjr.
|
15
|
+
Plac: pl.
|
16
|
+
Placu: pl.
|
17
|
+
Placem: pl.
|
18
|
+
Profesora: prof.
|
19
|
+
Pułkownika: płk.
|
20
|
+
Rotmistrza: rotm.
|
21
|
+
Ulica: ul.
|
22
|
+
Ulice: ul.
|
23
|
+
Ulicą: ul.
|
24
|
+
Ulicy: ul.
|
@@ -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
|
+
тупик: туп
|
@@ -7,6 +7,9 @@ name: house
|
|
7
7
|
aliases:
|
8
8
|
- building
|
9
9
|
- public_building
|
10
|
+
- isolated_dwelling
|
11
|
+
- farmland
|
12
|
+
- allotments
|
10
13
|
---
|
11
14
|
name: road
|
12
15
|
aliases:
|
@@ -21,37 +24,51 @@ aliases:
|
|
21
24
|
- square
|
22
25
|
- place
|
23
26
|
---
|
24
|
-
name:
|
27
|
+
name: hamlet
|
25
28
|
aliases:
|
26
|
-
- hamlet
|
27
29
|
- locality
|
28
30
|
- croft
|
29
31
|
---
|
32
|
+
name: village
|
33
|
+
---
|
30
34
|
name: neighbourhood
|
31
35
|
aliases:
|
32
36
|
- suburb
|
33
37
|
- city_district
|
34
38
|
- district
|
35
39
|
- quarter
|
40
|
+
- borough
|
41
|
+
- city_block
|
36
42
|
- residential
|
37
43
|
- commercial
|
38
44
|
- industrial
|
39
45
|
- houses
|
46
|
+
- subdistrict
|
40
47
|
- subdivision
|
48
|
+
- ward
|
49
|
+
---
|
50
|
+
name: postal_city
|
41
51
|
---
|
42
52
|
name: city
|
43
53
|
aliases:
|
44
54
|
- town
|
45
|
-
-
|
55
|
+
- township
|
46
56
|
---
|
47
|
-
name:
|
57
|
+
name: municipality
|
48
58
|
aliases:
|
49
59
|
- local_administrative_area
|
60
|
+
- subcounty
|
61
|
+
---
|
62
|
+
name: county
|
63
|
+
aliases:
|
50
64
|
- county_code
|
65
|
+
- department
|
51
66
|
---
|
52
67
|
name: state_district
|
53
68
|
---
|
54
69
|
name: postcode
|
70
|
+
aliases:
|
71
|
+
- partial_postcode
|
55
72
|
---
|
56
73
|
name: state
|
57
74
|
aliases:
|
@@ -62,6 +79,8 @@ name: region
|
|
62
79
|
---
|
63
80
|
name: island
|
64
81
|
---
|
82
|
+
name: archipelago
|
83
|
+
---
|
65
84
|
name: country
|
66
85
|
aliases:
|
67
86
|
- country_name
|