address_composer 0.1.4.pre → 0.1.7.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/main.yml +25 -0
- data/.gitignore +2 -0
- data/.gitmodules +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/address-formatting/.travis.yml +8 -6
- data/address-formatting/README.md +4 -1
- 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 +2 -2
- data/address-formatting/conf/abbreviations/uk.yaml +0 -3
- data/address-formatting/conf/abbreviations/vn.yaml +7 -0
- data/address-formatting/conf/components.yaml +20 -4
- data/address-formatting/conf/countries/worldwide.yaml +147 -120
- data/address-formatting/conf/country2lang.yaml +3 -3
- data/address-formatting/conf/county_codes.yaml +359 -12
- data/address-formatting/conf/state_codes.yaml +1297 -139
- 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 +75 -9
- data/address-formatting/testcases/countries/gg.yaml +2 -1
- data/address-formatting/testcases/countries/hk.yaml +18 -8
- 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/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 +38 -2
- data/address-formatting/testcases/other/xx.yaml +28 -0
- data/lib/address_composer/version.rb +1 -1
- data/lib/address_composer.rb +1 -1
- metadata +10 -6
- 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: c51465a502a9177e8c9a606f1c6757aeda1a667855293b1bd89bdfefb8201f16
|
|
4
|
+
data.tar.gz: 1a78c267e2a56d92f62b6244f5fab13f47131cd67693a302b59f2ff101a2a458
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4029029674ed182251a88cc85d33d498e323b3ab7615e7cf61ee6bf94493f52ddf2a05ccb9f90477a6a210407b3c25c6dd0cb85ec556379ca00218811f46527
|
|
7
|
+
data.tar.gz: 1d46f20b0933703dced5b77f510bb38dc5c1d94402e0c1ae99448fd282177be9e61f1071270644166e3aa6446a6f19c0943bb7e35c23fdda36ad8f4313f1475f
|
|
@@ -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
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=
|
|
@@ -7,6 +7,7 @@ This project contains templates and test cases for address formats used in terri
|
|
|
7
7
|
### Build Status
|
|
8
8
|
|
|
9
9
|
[](https://travis-ci.org/OpenCageData/address-formatting)
|
|
10
|
+
[](https://twitter.com/opencage)
|
|
10
11
|
|
|
11
12
|
### An example:
|
|
12
13
|
|
|
@@ -52,11 +53,13 @@ Our goal with this repository is a series of (programming) language independent
|
|
|
52
53
|
|
|
53
54
|
There are open-source implementations in
|
|
54
55
|
|
|
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)
|
|
58
60
|
* [Ruby](https://github.com/mirubiri/address_composer)
|
|
59
61
|
* [Rust](https://github.com/CanalTP/address-formatter-rs)
|
|
62
|
+
* [Scala](https://github.com/ben-willis/address-formatter)
|
|
60
63
|
|
|
61
64
|
We would love more language implementations. The more people who use the templates, the more likely bugs will be reported.
|
|
62
65
|
If you write a processor, please submit a pull request adding it to the list. Thanks.
|
|
@@ -72,7 +75,7 @@ As of `Sun 17 Feb 2019` coverage is:
|
|
|
72
75
|
|
|
73
76
|
This output is generated by `bin/coverage.pl`
|
|
74
77
|
|
|
75
|
-
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.
|
|
76
79
|
|
|
77
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`
|
|
78
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.
|
|
@@ -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,34 +24,45 @@ 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
|
|
36
41
|
- city_block
|
|
37
42
|
- residential
|
|
38
43
|
- commercial
|
|
39
44
|
- industrial
|
|
40
45
|
- houses
|
|
46
|
+
- subdistrict
|
|
41
47
|
- subdivision
|
|
48
|
+
- ward
|
|
49
|
+
---
|
|
50
|
+
name: postal_city
|
|
42
51
|
---
|
|
43
52
|
name: city
|
|
44
53
|
aliases:
|
|
45
54
|
- town
|
|
46
|
-
-
|
|
55
|
+
- township
|
|
47
56
|
---
|
|
48
|
-
name:
|
|
57
|
+
name: municipality
|
|
49
58
|
aliases:
|
|
50
59
|
- local_administrative_area
|
|
60
|
+
- subcounty
|
|
61
|
+
---
|
|
62
|
+
name: county
|
|
63
|
+
aliases:
|
|
51
64
|
- county_code
|
|
65
|
+
- department
|
|
52
66
|
---
|
|
53
67
|
name: state_district
|
|
54
68
|
---
|
|
@@ -65,6 +79,8 @@ name: region
|
|
|
65
79
|
---
|
|
66
80
|
name: island
|
|
67
81
|
---
|
|
82
|
+
name: archipelago
|
|
83
|
+
---
|
|
68
84
|
name: country
|
|
69
85
|
aliases:
|
|
70
86
|
- country_name
|