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.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/main.yml +25 -0
  3. data/.gitignore +2 -0
  4. data/.gitmodules +1 -1
  5. data/Gemfile.lock +1 -1
  6. data/README.md +3 -1
  7. data/address-formatting/.travis.yml +8 -6
  8. data/address-formatting/README.md +4 -1
  9. data/address-formatting/SECURITY.md +5 -0
  10. data/address-formatting/conf/abbreviations/{dk.yaml → da.yaml} +0 -3
  11. data/address-formatting/conf/abbreviations/de.yaml +0 -2
  12. data/address-formatting/conf/abbreviations/en.yaml +1 -1
  13. data/address-formatting/conf/abbreviations/fr.yaml +1 -1
  14. data/address-formatting/conf/abbreviations/hu.yaml +1 -2
  15. data/address-formatting/conf/abbreviations/nl.yaml +14 -1
  16. data/address-formatting/conf/abbreviations/no.yaml +16 -0
  17. data/address-formatting/conf/abbreviations/pl.yaml +24 -0
  18. data/address-formatting/conf/abbreviations/pt.yaml +0 -1
  19. data/address-formatting/conf/abbreviations/ru.yaml +2 -2
  20. data/address-formatting/conf/abbreviations/uk.yaml +0 -3
  21. data/address-formatting/conf/abbreviations/vn.yaml +7 -0
  22. data/address-formatting/conf/components.yaml +20 -4
  23. data/address-formatting/conf/countries/worldwide.yaml +147 -120
  24. data/address-formatting/conf/country2lang.yaml +3 -3
  25. data/address-formatting/conf/county_codes.yaml +359 -12
  26. data/address-formatting/conf/state_codes.yaml +1297 -139
  27. data/address-formatting/testcases/countries/be.yaml +35 -0
  28. data/address-formatting/testcases/countries/bf.yaml +15 -1
  29. data/address-formatting/testcases/countries/ca.yaml +29 -5
  30. data/address-formatting/testcases/countries/cn.yaml +9 -0
  31. data/address-formatting/testcases/countries/de.yaml +1 -1
  32. data/address-formatting/testcases/countries/fr.yaml +81 -1
  33. data/address-formatting/testcases/countries/gb.yaml +75 -9
  34. data/address-formatting/testcases/countries/gg.yaml +2 -1
  35. data/address-formatting/testcases/countries/hk.yaml +18 -8
  36. data/address-formatting/testcases/countries/ie.yaml +45 -3
  37. data/address-formatting/testcases/countries/im.yaml +2 -1
  38. data/address-formatting/testcases/countries/je.yaml +2 -1
  39. data/address-formatting/testcases/countries/no.yaml +17 -0
  40. data/address-formatting/testcases/countries/pt.yaml +22 -0
  41. data/address-formatting/testcases/countries/sh.yaml +2 -1
  42. data/address-formatting/testcases/countries/ug.yaml +13 -0
  43. data/address-formatting/testcases/countries/um.yaml +1 -1
  44. data/address-formatting/testcases/countries/us.yaml +38 -2
  45. data/address-formatting/testcases/other/xx.yaml +28 -0
  46. data/lib/address_composer/version.rb +1 -1
  47. data/lib/address_composer.rb +1 -1
  48. metadata +10 -6
  49. data/.ruby-version +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f51d8002a7fe546e3ceb4ccef4dc20d998e60495
4
- data.tar.gz: db7a8b613c2df380ea7eac633fc715594b592c74
2
+ SHA256:
3
+ metadata.gz: c51465a502a9177e8c9a606f1c6757aeda1a667855293b1bd89bdfefb8201f16
4
+ data.tar.gz: 1a78c267e2a56d92f62b6244f5fab13f47131cd67693a302b59f2ff101a2a458
5
5
  SHA512:
6
- metadata.gz: 5839e91856f2043ee4afeca9623259df5beb80f1ba3848ca868799278183f3d85c52aa3d1fb635e256f66f8fa14d3b12636150fc802410a8765777df5dbe2c4c
7
- data.tar.gz: fc1babb20fa8743984781f6392e484938df8906dd0c09a029b74d126b8b1b32d1d5c2d6b0c8b94c1c7ef4ef307af5b6d644a0090811a3857b3bd3239ad3f7b82
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
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ .ruby-version
data/.gitmodules CHANGED
@@ -1,3 +1,3 @@
1
1
  [submodule "address-formatting"]
2
2
  path = address-formatting
3
- url = git@github.com:OpenCageData/address-formatting.git
3
+ url = https://github.com/OpenCageData/address-formatting.git
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- address_composer (0.1.4.pre)
4
+ address_composer (0.1.7.pre)
5
5
  mustache (~> 1.1)
6
6
 
7
7
  GEM
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 `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.
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
- - "5.26" # Ubuntu 18
3
+ - '5.30'
5
4
  env: PERL_CPANM_OPT="--notest --force --skip-satisfied"
6
5
  install:
7
- - cpanm File::Find::Rule~0.34
8
- - cpanm Geo::Address::Formatter~1.76
6
+ - cpanm File::Find::Rule~0.34
7
+ - cpanm Geo::Address::Formatter
9
8
  script:
10
- - bin/run_tests.t
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
  [![Build Status](https://travis-ci.org/OpenCageData/address-formatting.svg?branch=master)](https://travis-ci.org/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
 
@@ -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 wil lbe glaldy received.
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
 
@@ -0,0 +1,5 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Please see the [OpenCage security bounty page](https://opencagedata.com/security-bounty)
@@ -12,6 +12,3 @@ road:
12
12
  Vestre: V
13
13
  Øster: Ø
14
14
  Østre: Ø
15
-
16
-
17
-
@@ -3,5 +3,3 @@ road:
3
3
  Sankt: St
4
4
  Straße: Str
5
5
  Strasse: Str
6
-
7
-
@@ -28,4 +28,4 @@ road:
28
28
  Square: Sq
29
29
  Street: St
30
30
  Terrace: Tce
31
- Throughway: TRWY
31
+ Throughway: TRWY
@@ -7,4 +7,4 @@ road:
7
7
  Rue: r
8
8
  Saint: St
9
9
  Sainte: Ste
10
- Zone industrielle: Z.I
10
+ Zone industrielle: Z.I
@@ -1,4 +1,3 @@
1
1
  road:
2
2
  utca: u
3
-
4
-
3
+ körút: krt
@@ -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,16 @@
1
+ road:
2
+ gata: g
3
+ gate: g
4
+ gaten: g
5
+ plass: pl
6
+ plassen: pl
7
+ sving: sv
8
+ svingen: sv
9
+ veg: v
10
+ vegen: v
11
+ vei: v
12
+ veien: v
13
+
14
+
15
+
16
+
@@ -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.
@@ -28,4 +28,3 @@ road:
28
28
  Urbanização: Urb
29
29
  Vila: Vl
30
30
  Zona: Zn
31
-
@@ -24,8 +24,8 @@ village:
24
24
  местечко: м
25
25
  село: с
26
26
  станица: ст-ца
27
- поселок городского типа: пгт
28
- посёлок городского типа: пгт
27
+ поселок городского типа: пгт
28
+ посёлок городского типа: пгт
29
29
  neighbourhood:
30
30
  квартал: кв-л
31
31
  район: р-н
@@ -6,6 +6,3 @@ road:
6
6
  проспект: просп
7
7
  шосе: ш
8
8
  вулиця: вул
9
-
10
-
11
-
@@ -0,0 +1,7 @@
1
+ road:
2
+ Công trường: CT
3
+ Đại lộ: ĐL
4
+ Đường: D
5
+ Quảng trường: QT
6
+
7
+
@@ -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: village
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
- - municipality
55
+ - township
47
56
  ---
48
- name: county
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