worlddb-models 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/worlddb/patterns.rb +11 -5
- data/lib/worlddb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653b054845b6d5911663fd17cb09b94a15999b82
|
4
|
+
data.tar.gz: bd6feaa857eb358c7f56ca64fa39a42746586915
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b2cdea187715a301f2ade0a9133552c30fb6da28417e3e458a3c518e32ab4de26b92e75725567a602643d54744028d09dd98974217169b38b8a5ed68bfcc1b3
|
7
|
+
data.tar.gz: bd94aa135b8773097d9cb0586049e0d918d384a5809ddc758e7a0cd08c9fa60584e8bd99a1fd6313ab3a80742eba094dc322f35496363bdf7fd930af818bd1f9
|
data/lib/worlddb/patterns.rb
CHANGED
@@ -26,11 +26,17 @@ module WorldDb
|
|
26
26
|
# move to notes regex|patterns on geraldb.github.io ??
|
27
27
|
#
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
## todo/check: allow country keys with single letter - why? why not?
|
30
|
+
## todo/check: allow country codes with single or two letters or with underscore - why? why not?
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
## todo/fix: change to COUNTRY_KEY_RE and make it regexp type!!
|
33
|
+
## todo/fix: change to COUNTRY_CODE_RE and make it regexp type!!
|
34
|
+
|
35
|
+
COUNTRY_KEY_PATTERN = '\A[a-z]{2,}\z' # allow two AND three letter keys e.g. at, mx, eng, sco, etc.
|
36
|
+
COUNTRY_KEY_PATTERN_MESSAGE = "expected two or more lowercase letters a-z /#{COUNTRY_KEY_PATTERN}/"
|
37
|
+
|
38
|
+
COUNTRY_CODE_PATTERN = '\A[A-Z]{3,}\z'
|
39
|
+
COUNTRY_CODE_PATTERN_MESSAGE = "expected three or more uppercase letters A-Z /#{COUNTRY_CODE_PATTERN}/"
|
34
40
|
|
35
41
|
|
36
42
|
STATE_KEY_PATTERN = '\A[a-z]+\z'
|
@@ -42,7 +48,7 @@ module WorldDb
|
|
42
48
|
|
43
49
|
CITY_KEY_PATTERN = '\A[a-z]{3,}\z'
|
44
50
|
CITY_KEY_PATTERN_MESSAGE = "expected three or more lowercase letters a-z' /#{CITY_KEY_PATTERN}/"
|
45
|
-
|
51
|
+
|
46
52
|
CITY_CODE_PATTERN = '\A[A-Z_]{3}\z'
|
47
53
|
CITY_CODE_PATTERN_MESSAGE = "expected three uppercase letters A-Z (and _)' /#{CITY_CODE_PATTERN}/"
|
48
54
|
|
data/lib/worlddb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: worlddb-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: props
|