carmen 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +15 -0
- data/README.md +1 -5
- data/iso_data/base/world/mx.yml +2 -2
- data/iso_data/overlay/world/br.yml +3 -0
- data/iso_data/overlay/world/ke.yml +109 -0
- data/iso_data/overlay/world/nz.yml +37 -0
- data/lib/carmen/querying.rb +2 -2
- data/lib/carmen/region.rb +1 -1
- data/lib/carmen/version.rb +1 -1
- data/locale/base/en/world/mx.yml +2 -2
- data/locale/overlay/en/world/ke.yml +98 -0
- data/locale/overlay/en/world/nz.yml +38 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 98c864386fa9689c3416dd85a84eb207933a9306b3cdeb90b95170248d3a8163
|
4
|
+
data.tar.gz: e2cb1bbbc30e24d9b5e4364831dd4377976b0687a96444ad3b224d5764afc635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dca76d63bc8951a98c8b26fafa8c1ab92418885387de0adab693c92ed52f1fdfe49dc5bdd8ae5d2e1dcf941bc7cb60b1d8dab50b349d79ff886c18bfdd571392
|
7
|
+
data.tar.gz: 126521b64422b49fd3d937673db773a864f4da1865f7a4816846a45435750cd454166496ef1eb67506919a99f1b9cba07c91667105a7aab4abd393f031d13fa1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
### master (unreleased)
|
2
2
|
|
3
|
+
### 1.1.1 (May 7, 2018)
|
4
|
+
* [#250](https://github.com/carmen-ruby/carmen/pull/250) Add better fuzzy
|
5
|
+
searching when using `Querying#named`. Calling this method with `fuzzy:
|
6
|
+
true` does better with dashes, apostrophes, and spaces ([@raj](https://github.com/raj))
|
7
|
+
|
8
|
+
##### Geographic Modifications
|
9
|
+
* [#256](https://github.com/carmen-ruby/carmen/pull/256) Fix Brazilian regions - remove `Fernando de Noronha` ([@guicruzzs](https://github.com/guicruzzs))
|
10
|
+
* [#252](https://github.com/carmen-ruby/carmen/pull/252) Update Kenya
|
11
|
+
subregions to match ISO standard ([@gyarra](https://github.com/gyarra))
|
12
|
+
* [#249](https://github.com/carmen-ruby/carmen/pull/249) Rename Mexico's
|
13
|
+
Distrito Federal and make it a state
|
14
|
+
([@jtapia](https://github.com/jtapia))
|
15
|
+
* [#247](https://github.com/carmen-ruby/carmen/pull/247) Fix New Zealand regions
|
16
|
+
to match 2015-11-27 ISO correction ([@louim](https://github.com/louim))
|
17
|
+
|
3
18
|
### 1.1.0 (November 7, 2017)
|
4
19
|
* [#231](https://github.com/carmen-ruby/carmen/pull/231) Base ISO data has been updated for the first time since October 25, 2014
|
5
20
|
* [#233](https://github.com/carmen-ruby/carmen/pull/233) Revert removing Puerto Rico as a country code
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
> A repository of geographic regions for Ruby
|
4
4
|
|
5
|
-
[![Build Status](https://secure.travis-ci.org/
|
5
|
+
[![Build Status](https://secure.travis-ci.org/carmen-ruby/carmen.png?branch=master)](http://travis-ci.org/carmen-ruby/carmen)
|
6
6
|
|
7
7
|
Carmen features the following:
|
8
8
|
|
@@ -10,10 +10,6 @@ Carmen features the following:
|
|
10
10
|
* Complete countries & regions data from the iso-codes Debian package
|
11
11
|
* A sane approach to internationalization
|
12
12
|
|
13
|
-
## Ruby on Rails
|
14
|
-
|
15
|
-
If you are using Carmen with Rails, you should check out the [carmen-rails](http://github.com/jim/carmen-rails) library.
|
16
|
-
|
17
13
|
# How to Use Carmen
|
18
14
|
|
19
15
|
Carmen is designed to make it easy to access Country and region data.
|
data/iso_data/base/world/mx.yml
CHANGED
@@ -0,0 +1,109 @@
|
|
1
|
+
---
|
2
|
+
- code: '01'
|
3
|
+
type: county
|
4
|
+
- code: '02'
|
5
|
+
type: county
|
6
|
+
- code: '03'
|
7
|
+
type: county
|
8
|
+
- code: '04'
|
9
|
+
type: county
|
10
|
+
- code: '05'
|
11
|
+
type: county
|
12
|
+
- code: '06'
|
13
|
+
type: county
|
14
|
+
- code: '07'
|
15
|
+
type: county
|
16
|
+
- code: '08'
|
17
|
+
type: county
|
18
|
+
- code: '09'
|
19
|
+
type: county
|
20
|
+
- code: '10'
|
21
|
+
type: county
|
22
|
+
- code: '11'
|
23
|
+
type: county
|
24
|
+
- code: '12'
|
25
|
+
type: county
|
26
|
+
- code: '13'
|
27
|
+
type: county
|
28
|
+
- code: '14'
|
29
|
+
type: county
|
30
|
+
- code: '15'
|
31
|
+
type: county
|
32
|
+
- code: '16'
|
33
|
+
type: county
|
34
|
+
- code: '17'
|
35
|
+
type: county
|
36
|
+
- code: '18'
|
37
|
+
type: county
|
38
|
+
- code: '19'
|
39
|
+
type: county
|
40
|
+
- code: '20'
|
41
|
+
type: county
|
42
|
+
- code: '21'
|
43
|
+
type: county
|
44
|
+
- code: '22'
|
45
|
+
type: county
|
46
|
+
- code: '23'
|
47
|
+
type: county
|
48
|
+
- code: '24'
|
49
|
+
type: county
|
50
|
+
- code: '25'
|
51
|
+
type: county
|
52
|
+
- code: '26'
|
53
|
+
type: county
|
54
|
+
- code: '27'
|
55
|
+
type: county
|
56
|
+
- code: '28'
|
57
|
+
type: county
|
58
|
+
- code: '29'
|
59
|
+
type: county
|
60
|
+
- code: '30'
|
61
|
+
type: county
|
62
|
+
- code: '31'
|
63
|
+
type: county
|
64
|
+
- code: '32'
|
65
|
+
type: county
|
66
|
+
- code: '33'
|
67
|
+
type: county
|
68
|
+
- code: '34'
|
69
|
+
type: county
|
70
|
+
- code: '35'
|
71
|
+
type: county
|
72
|
+
- code: '36'
|
73
|
+
type: county
|
74
|
+
- code: '37'
|
75
|
+
type: county
|
76
|
+
- code: '38'
|
77
|
+
type: county
|
78
|
+
- code: '39'
|
79
|
+
type: county
|
80
|
+
- code: '40'
|
81
|
+
type: county
|
82
|
+
- code: '41'
|
83
|
+
type: county
|
84
|
+
- code: '42'
|
85
|
+
type: county
|
86
|
+
- code: '43'
|
87
|
+
type: county
|
88
|
+
- code: '44'
|
89
|
+
type: county
|
90
|
+
- code: '45'
|
91
|
+
type: county
|
92
|
+
- code: '46'
|
93
|
+
type: county
|
94
|
+
- code: '47'
|
95
|
+
type: county
|
96
|
+
- code: '110'
|
97
|
+
_enabled: false
|
98
|
+
- code: '200'
|
99
|
+
_enabled: false
|
100
|
+
- code: '300'
|
101
|
+
_enabled: false
|
102
|
+
- code: '400'
|
103
|
+
_enabled: false
|
104
|
+
- code: '500'
|
105
|
+
_enabled: false
|
106
|
+
- code: '700'
|
107
|
+
_enabled: false
|
108
|
+
- code: '800'
|
109
|
+
_enabled: false
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
- code: AUK
|
3
|
+
type: region
|
4
|
+
- code: BOP
|
5
|
+
type: region
|
6
|
+
- code: CAN
|
7
|
+
type: region
|
8
|
+
- code: GIS
|
9
|
+
type: region
|
10
|
+
- code: HKB
|
11
|
+
type: region
|
12
|
+
- code: MWT
|
13
|
+
type: region
|
14
|
+
- code: MBH
|
15
|
+
type: region
|
16
|
+
- code: NSN
|
17
|
+
type: region
|
18
|
+
- code: NTL
|
19
|
+
type: region
|
20
|
+
- code: OTA
|
21
|
+
type: region
|
22
|
+
- code: STL
|
23
|
+
type: region
|
24
|
+
- code: TKI
|
25
|
+
type: region
|
26
|
+
- code: TAS
|
27
|
+
type: region
|
28
|
+
- code: WGN
|
29
|
+
type: region
|
30
|
+
- code: WKO
|
31
|
+
type: region
|
32
|
+
- code: WTC
|
33
|
+
type: region
|
34
|
+
- code: N
|
35
|
+
_enabled: false
|
36
|
+
- code: S
|
37
|
+
_enabled: false
|
data/lib/carmen/querying.rb
CHANGED
@@ -34,8 +34,8 @@ module Carmen
|
|
34
34
|
# These only need to be built once
|
35
35
|
name = case_fold ? name.mb_chars.downcase.normalize : name
|
36
36
|
# For now, "fuzzy" just means substring, optionally case-insensitive (the second argument looks for nil, not falseness)
|
37
|
-
regexp = options[:fuzzy] ? Regexp.new(name, options[:case] ? nil : true) : nil
|
38
|
-
|
37
|
+
regexp = options[:fuzzy] ? Regexp.new(name.split(/[-'\s]/).join("[-'\s]"), options[:case] ? nil : true) : nil
|
38
|
+
|
39
39
|
query_collection.find do |region|
|
40
40
|
found_literal = name === (case_fold && region.name ? region.name.mb_chars.downcase.normalize : region.name)
|
41
41
|
found_literal || options[:fuzzy] && regexp === region.name
|
data/lib/carmen/region.rb
CHANGED
data/lib/carmen/version.rb
CHANGED
data/locale/base/en/world/mx.yml
CHANGED
@@ -0,0 +1,98 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
world:
|
4
|
+
ke:
|
5
|
+
'01':
|
6
|
+
name: Baringo
|
7
|
+
'02':
|
8
|
+
name: Bomet
|
9
|
+
'03':
|
10
|
+
name: Bungoma
|
11
|
+
'04':
|
12
|
+
name: Busia
|
13
|
+
'05':
|
14
|
+
name: 'Elgeyo/Marakwet'
|
15
|
+
'06':
|
16
|
+
name: Embu
|
17
|
+
'07':
|
18
|
+
name: Garissa
|
19
|
+
'08':
|
20
|
+
name: Homa Bay
|
21
|
+
'09':
|
22
|
+
name: Isiolo
|
23
|
+
'10':
|
24
|
+
name: Kajiado
|
25
|
+
'11':
|
26
|
+
name: Kakamega
|
27
|
+
'12':
|
28
|
+
name: Kericho
|
29
|
+
'13':
|
30
|
+
name: Kiambu
|
31
|
+
'14':
|
32
|
+
name: Kilifi
|
33
|
+
'15':
|
34
|
+
name: Kirinyaga
|
35
|
+
'16':
|
36
|
+
name: Kisii
|
37
|
+
'17':
|
38
|
+
name: Kisumu
|
39
|
+
'18':
|
40
|
+
name: Kitui
|
41
|
+
'19':
|
42
|
+
name: Kwale
|
43
|
+
'20':
|
44
|
+
name: Laikipia
|
45
|
+
'21':
|
46
|
+
name: Lamu
|
47
|
+
'22':
|
48
|
+
name: Machakos
|
49
|
+
'23':
|
50
|
+
name: Makueni
|
51
|
+
'24':
|
52
|
+
name: Mandera
|
53
|
+
'25':
|
54
|
+
name: Marsabit
|
55
|
+
'26':
|
56
|
+
name: Meru
|
57
|
+
'27':
|
58
|
+
name: Migori
|
59
|
+
'28':
|
60
|
+
name: Mombasa
|
61
|
+
'29':
|
62
|
+
name: Murang'a
|
63
|
+
'30':
|
64
|
+
name: Nairobi City
|
65
|
+
'31':
|
66
|
+
name: Nakuru
|
67
|
+
'32':
|
68
|
+
name: Nandi
|
69
|
+
'33':
|
70
|
+
name: Narok
|
71
|
+
'34':
|
72
|
+
name: Nyamira
|
73
|
+
'35':
|
74
|
+
name: Nyandarua
|
75
|
+
'36':
|
76
|
+
name: Nyeri
|
77
|
+
'37':
|
78
|
+
name: Samburu
|
79
|
+
'38':
|
80
|
+
name: Siaya
|
81
|
+
'39':
|
82
|
+
name: Taita/Taveta
|
83
|
+
'40':
|
84
|
+
name: Tana River
|
85
|
+
'41':
|
86
|
+
name: Tharaka-Nithi
|
87
|
+
'42':
|
88
|
+
name: Trans Nzoia
|
89
|
+
'43':
|
90
|
+
name: Turkana
|
91
|
+
'44':
|
92
|
+
name: Uasin Gishu
|
93
|
+
'45':
|
94
|
+
name: Vihiga
|
95
|
+
'46':
|
96
|
+
name: Wajir
|
97
|
+
'47':
|
98
|
+
name: West Pokot
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
world:
|
4
|
+
nz:
|
5
|
+
auk:
|
6
|
+
name: Auckland
|
7
|
+
bop:
|
8
|
+
name: Bay of Plenty
|
9
|
+
can:
|
10
|
+
name: Canterbury
|
11
|
+
cit:
|
12
|
+
name: Chatham Islands Territory
|
13
|
+
gis:
|
14
|
+
name: Gisborne
|
15
|
+
hkb:
|
16
|
+
name: Hawke's Bay
|
17
|
+
mwt:
|
18
|
+
name: Manawatu-Wanganui
|
19
|
+
mbh:
|
20
|
+
name: Marlborough
|
21
|
+
nsn:
|
22
|
+
name: Nelson
|
23
|
+
ntl:
|
24
|
+
name: Northland
|
25
|
+
ota:
|
26
|
+
name: Otago
|
27
|
+
stl:
|
28
|
+
name: Southland
|
29
|
+
tki:
|
30
|
+
name: Taranaki
|
31
|
+
tas:
|
32
|
+
name: Tasman
|
33
|
+
wgn:
|
34
|
+
name: Wellington
|
35
|
+
wko:
|
36
|
+
name: Waikato
|
37
|
+
wtc:
|
38
|
+
name: West Coast
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carmen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Benton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -490,10 +490,12 @@ files:
|
|
490
490
|
- iso_data/overlay/world/ar.yml
|
491
491
|
- iso_data/overlay/world/bd.yml
|
492
492
|
- iso_data/overlay/world/bm.yml
|
493
|
+
- iso_data/overlay/world/br.yml
|
493
494
|
- iso_data/overlay/world/ca/qc.yml
|
494
495
|
- iso_data/overlay/world/gb.yml
|
495
496
|
- iso_data/overlay/world/id/ka.yml
|
496
497
|
- iso_data/overlay/world/in.yml
|
498
|
+
- iso_data/overlay/world/ke.yml
|
497
499
|
- iso_data/overlay/world/mx/agu.yml
|
498
500
|
- iso_data/overlay/world/mx/bcn.yml
|
499
501
|
- iso_data/overlay/world/mx/bcs.yml
|
@@ -526,6 +528,7 @@ files:
|
|
526
528
|
- iso_data/overlay/world/mx/ver.yml
|
527
529
|
- iso_data/overlay/world/mx/yuc.yml
|
528
530
|
- iso_data/overlay/world/mx/zac.yml
|
531
|
+
- iso_data/overlay/world/nz.yml
|
529
532
|
- iso_data/overlay/world/us.yml
|
530
533
|
- lib/carmen.rb
|
531
534
|
- lib/carmen/country.rb
|
@@ -972,6 +975,7 @@ files:
|
|
972
975
|
- locale/overlay/en/world/gb.yml
|
973
976
|
- locale/overlay/en/world/id/ka.yml
|
974
977
|
- locale/overlay/en/world/in.yml
|
978
|
+
- locale/overlay/en/world/ke.yml
|
975
979
|
- locale/overlay/en/world/mx/agu.yml
|
976
980
|
- locale/overlay/en/world/mx/bcn.yml
|
977
981
|
- locale/overlay/en/world/mx/bcs.yml
|
@@ -1005,6 +1009,7 @@ files:
|
|
1005
1009
|
- locale/overlay/en/world/mx/yuc.yml
|
1006
1010
|
- locale/overlay/en/world/mx/zac.yml
|
1007
1011
|
- locale/overlay/en/world/mz.yml
|
1012
|
+
- locale/overlay/en/world/nz.yml
|
1008
1013
|
- locale/overlay/en/world/us.yml
|
1009
1014
|
- locale/overlay/es/world.yml
|
1010
1015
|
- locale/overlay/fi/world.yml
|
@@ -1049,7 +1054,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1049
1054
|
version: 1.3.6
|
1050
1055
|
requirements: []
|
1051
1056
|
rubyforge_project:
|
1052
|
-
rubygems_version: 2.
|
1057
|
+
rubygems_version: 2.7.4
|
1053
1058
|
signing_key:
|
1054
1059
|
specification_version: 4
|
1055
1060
|
summary: A collection of geographic region data for Ruby
|