worlddb 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +23 -2
- data/db/be/cities.rb +10 -0
- data/db/by/cities.rb +9 -0
- data/db/ca/cities.rb +31 -0
- data/db/ch/cities.rb +9 -0
- data/db/cy/cities.rb +11 -0
- data/db/{countries.rb → de.countries.rb} +5 -0
- data/db/dk/cities.rb +9 -0
- data/db/en.countries.rb +115 -0
- data/db/en/cities.rb +22 -0
- data/db/es/cities.rb +13 -0
- data/db/fr/cities.rb +12 -0
- data/db/gr/cities.rb +9 -0
- data/db/hr/cities.rb +9 -0
- data/db/it/cities.rb +11 -0
- data/db/mx/cities.rb +23 -0
- data/db/nl/cities.rb +11 -0
- data/db/pt/cities.rb +11 -0
- data/db/ro/cities.rb +9 -0
- data/db/ru/cities.rb +11 -0
- data/db/sc/cities.rb +10 -0
- data/db/tr/cities.rb +9 -0
- data/db/ua/cities.rb +11 -0
- data/db/us/cities.rb +38 -0
- data/lib/worlddb/version.rb +1 -1
- metadata +27 -6
- data/db/cities.rb +0 -263
data/Manifest.txt
CHANGED
@@ -4,9 +4,30 @@ README.markdown
|
|
4
4
|
Rakefile
|
5
5
|
bin/worlddb
|
6
6
|
db/at/cities.rb
|
7
|
-
db/cities.rb
|
8
|
-
db/
|
7
|
+
db/be/cities.rb
|
8
|
+
db/by/cities.rb
|
9
|
+
db/ca/cities.rb
|
10
|
+
db/ch/cities.rb
|
11
|
+
db/cy/cities.rb
|
12
|
+
db/de.countries.rb
|
9
13
|
db/de/cities.rb
|
14
|
+
db/dk/cities.rb
|
15
|
+
db/en.countries.rb
|
16
|
+
db/en/cities.rb
|
17
|
+
db/es/cities.rb
|
18
|
+
db/fr/cities.rb
|
19
|
+
db/gr/cities.rb
|
20
|
+
db/hr/cities.rb
|
21
|
+
db/it/cities.rb
|
22
|
+
db/mx/cities.rb
|
23
|
+
db/nl/cities.rb
|
24
|
+
db/pt/cities.rb
|
25
|
+
db/ro/cities.rb
|
26
|
+
db/ru/cities.rb
|
27
|
+
db/sc/cities.rb
|
28
|
+
db/tr/cities.rb
|
29
|
+
db/ua/cities.rb
|
30
|
+
db/us/cities.rb
|
10
31
|
lib/worlddb.rb
|
11
32
|
lib/worlddb/cli/opts.rb
|
12
33
|
lib/worlddb/cli/runner.rb
|
data/db/be/cities.rb
ADDED
data/db/by/cities.rb
ADDED
data/db/ca/cities.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
|
4
|
+
ca = Country.find_by_key!( 'ca' )
|
5
|
+
|
6
|
+
|
7
|
+
regions_ca = [
|
8
|
+
['on', 'Ontario'],
|
9
|
+
['qc', 'Quebec'],
|
10
|
+
['ns', 'Nova Scotia'],
|
11
|
+
['nb', 'New Brunswick'],
|
12
|
+
['mb', 'Manitoba'],
|
13
|
+
['bc', 'British Columbia'],
|
14
|
+
['pe', 'Prince Edward Island'],
|
15
|
+
['sk', 'Saskatchewan'],
|
16
|
+
['ab', 'Alberta'],
|
17
|
+
['nl', 'Newfoundland and Labrador']
|
18
|
+
]
|
19
|
+
|
20
|
+
cities_ca = [
|
21
|
+
['montreal', 'Montreal', 'region:qc'],
|
22
|
+
['ottawa', 'Ottawa', 'region:on'],
|
23
|
+
['toronto', 'Toronto', 'region:on'],
|
24
|
+
['winnipeg', 'Winnipeg', 'region:mb'],
|
25
|
+
['calgary', 'Calgary', 'region:ab'],
|
26
|
+
['edmonton', 'Edmonton', 'region:ab'],
|
27
|
+
['vancouver', 'Vancouver', 'region:bc']
|
28
|
+
]
|
29
|
+
|
30
|
+
Region.create_from_ary!( regions_ca, country: ca )
|
31
|
+
City.create_from_ary!( cities_ca, country: ca )
|
data/db/ch/cities.rb
ADDED
data/db/cy/cities.rb
ADDED
@@ -55,7 +55,11 @@ countries = [
|
|
55
55
|
[ 'sk', 'Slowakei', 'SVK' ],
|
56
56
|
[ 'tr', 'Türkei', 'TUR' ],
|
57
57
|
[ 'ua', 'Ukraine', 'UKR' ],
|
58
|
+
[ 'mk', 'Mazedonien', 'MKD' ],
|
59
|
+
[ 'no', 'Norwegen', 'NOR' ],
|
60
|
+
[ 'is', 'Island', 'ISL' ],
|
58
61
|
|
62
|
+
|
59
63
|
##############
|
60
64
|
## south america
|
61
65
|
|
@@ -95,6 +99,7 @@ countries = [
|
|
95
99
|
[ 'jp', 'Japan', 'JPN' ],
|
96
100
|
[ 'kp', 'Nordkorea', 'PRK' ],
|
97
101
|
[ 'kr', 'Südkorea', 'KOR' ],
|
102
|
+
[ 'in', 'Indien', 'IND' ],
|
98
103
|
|
99
104
|
###############################
|
100
105
|
## oceania
|
data/db/dk/cities.rb
ADDED
data/db/en.countries.rb
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
## NB: for keys use internet domain/iso two letter code
|
4
|
+
#
|
5
|
+
# more info about iso country codes:
|
6
|
+
# -> http://en.wikipedia.org/wiki/ISO_3166-1
|
7
|
+
# two letter codes -> http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
8
|
+
# three letter codes -> http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
|
9
|
+
#
|
10
|
+
# for three letter codes use fifa code or iso code
|
11
|
+
# - fifa three letter country codes
|
12
|
+
# -> http://en.wikipedia.org/wiki/List_of_FIFA_country_codes
|
13
|
+
# -> differences (fifa,ioc,iso) -> http://en.wikipedia.org/wiki/Comparison_of_IOC,_FIFA,_and_ISO_3166_country_codes
|
14
|
+
|
15
|
+
|
16
|
+
### english version
|
17
|
+
|
18
|
+
countries = [
|
19
|
+
|
20
|
+
####################
|
21
|
+
### europe
|
22
|
+
|
23
|
+
[ 'ad', 'Andorra', 'AND' ],
|
24
|
+
[ 'al', 'Albania', 'ALB' ],
|
25
|
+
[ 'am', 'Armenia', 'ARM' ],
|
26
|
+
[ 'at', 'Austria', 'AUT' ],
|
27
|
+
[ 'be', 'Belgium', 'BEL' ],
|
28
|
+
[ 'bg', 'Bulgaria', 'BUL' ], # NB: ISO (BGR) <> FIFA (BUL)
|
29
|
+
[ 'by', 'Belarus', 'BLR' ],
|
30
|
+
[ 'ch', 'Switzerland', 'SUI' ], # NB: ISO (CHE) <> FIFA (SUI)
|
31
|
+
[ 'cy', 'Cyprus', 'CYP' ],
|
32
|
+
[ 'cz', 'Czech Republic', 'CZE' ],
|
33
|
+
[ 'de', 'Germany', 'GER' ], # NB: ISO (DEU) <> FIFA (GER)
|
34
|
+
[ 'dk', 'Denmark', 'DEN' ], # NB: ISO (DNK) <> FIFA (DEN)
|
35
|
+
[ 'en', 'England', 'ENG' ], # NB: FIFA (ENG); not a valid iso country n internet domain / it's uk - what to use - anything better?
|
36
|
+
[ 'es', 'Spain', 'ESP' ],
|
37
|
+
[ 'fi', 'Finland', 'FIN' ],
|
38
|
+
[ 'fo', 'Faroe Islands', 'FRO' ],
|
39
|
+
[ 'fr', 'France', 'FRA' ],
|
40
|
+
[ 'ge', 'Georgia', 'GEO' ],
|
41
|
+
[ 'gr', 'Greece', 'GRE' ], # NB: ISO (GRC) <> FIFA (GRE)
|
42
|
+
[ 'hr', 'Croatia', 'CRO' ], # NB: ISO (HRV) <> FIFA (CRO); local name: Hrvatska
|
43
|
+
[ 'hu', 'Hungary', 'HUN' ],
|
44
|
+
[ 'ie', 'Irland', 'IRL' ],
|
45
|
+
[ 'it', 'Italy', 'ITA' ],
|
46
|
+
[ 'kz', 'Kazakhstan', 'KAZ' ],
|
47
|
+
[ 'mt', 'Malta', 'MLT' ],
|
48
|
+
[ 'nl', 'Netherlands', 'NED' ], # NB: ISO (NLD) <> FIFA (NED)
|
49
|
+
[ 'pl', 'Poland', 'POL' ],
|
50
|
+
[ 'pt', 'Portugal', 'POR' ], # NB: ISO (PRT) <> FIFA (POR)
|
51
|
+
[ 'ro', 'Romania', 'ROU' ],
|
52
|
+
[ 'rs', 'Serbia', 'SRB' ],
|
53
|
+
[ 'ru', 'Russia', 'RUS' ],
|
54
|
+
[ 'sc', 'Scotland', 'SCO' ], # NB: FIFA (SCO); not a valid iso country/internet domain - it's uk - what to use - anything better?
|
55
|
+
[ 'se', 'Sweden', 'SWE' ],
|
56
|
+
[ 'si', 'Slovenia', 'SVN' ],
|
57
|
+
[ 'sk', 'Slovakia', 'SVK' ],
|
58
|
+
[ 'tr', 'Turkey', 'TUR' ],
|
59
|
+
[ 'ua', 'Ukraine', 'UKR' ],
|
60
|
+
[ 'mk', 'Macedonia', 'MKD' ],
|
61
|
+
[ 'no', 'Norway', 'NOR' ],
|
62
|
+
[ 'is', 'Iceland', 'ISL' ],
|
63
|
+
|
64
|
+
##############
|
65
|
+
## south america
|
66
|
+
|
67
|
+
[ 'ar', 'Argentina', 'ARG' ],
|
68
|
+
[ 'br', 'Brazil', 'BRA' ],
|
69
|
+
[ 'cl', 'Chile', 'CHI' ],
|
70
|
+
[ 'py', 'Paraguay', 'PAR' ],
|
71
|
+
[ 'uy', 'Uruguay', 'URU' ],
|
72
|
+
[ 'ec', 'Ecuador', 'ECU' ],
|
73
|
+
[ 'co', 'Colombia', 'COL' ],
|
74
|
+
|
75
|
+
#####################
|
76
|
+
#### north/central america & caribbean islands
|
77
|
+
|
78
|
+
[ 'ca', 'Canada', 'CAN' ],
|
79
|
+
[ 'mx', 'Mexico', 'MEX' ],
|
80
|
+
[ 'us', 'United States', 'USA' ],
|
81
|
+
[ 'hn', 'Honduras', 'HON' ],
|
82
|
+
[ 'cr', 'Costa Rica', 'CRC' ],
|
83
|
+
[ 'sv', 'El Salvador', 'SLV' ],
|
84
|
+
[ 'gy', 'Guyana', 'GUY' ],
|
85
|
+
|
86
|
+
########################
|
87
|
+
## africa
|
88
|
+
|
89
|
+
[ 'dz', 'Algeria', 'ALG' ],
|
90
|
+
[ 'ci', "Côte d'Ivoire", 'CIV' ],
|
91
|
+
[ 'gh', 'Ghana', 'GHA' ],
|
92
|
+
[ 'cm', 'Cameroon', 'CMR' ],
|
93
|
+
[ 'ng', 'Nigeria', 'NGA' ],
|
94
|
+
[ 'za', 'South Africa', 'RSA' ],
|
95
|
+
|
96
|
+
#############################
|
97
|
+
## asia w/ australia
|
98
|
+
|
99
|
+
[ 'au', 'Australia', 'AUS' ],
|
100
|
+
[ 'jp', 'Japan', 'JPN' ],
|
101
|
+
[ 'kp', 'North Korea', 'PRK' ],
|
102
|
+
[ 'kr', 'South Korea', 'KOR' ],
|
103
|
+
[ 'in', 'India', 'IND' ],
|
104
|
+
|
105
|
+
###############################
|
106
|
+
## oceania
|
107
|
+
|
108
|
+
[ 'nz', 'New Zealand', 'NZL' ]
|
109
|
+
]
|
110
|
+
|
111
|
+
|
112
|
+
Country.create_from_ary!( countries )
|
113
|
+
|
114
|
+
|
115
|
+
Prop.create!( key: 'db.countries.version', value: '1' )
|
data/db/en/cities.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
en = Country.find_by_key!( 'en' )
|
4
|
+
|
5
|
+
|
6
|
+
cities_en = [
|
7
|
+
['manchester', 'Manchester'],
|
8
|
+
['london', 'London'],
|
9
|
+
['liverpool', 'Liverpool'],
|
10
|
+
['birmingham', 'Birmingham'], # e.g.Aston Villa
|
11
|
+
['westbrom', 'West Bromwich'],
|
12
|
+
['newcastle', 'Newcastle upon Tyne'],
|
13
|
+
['stoke', 'Stoke-on-Trent'],
|
14
|
+
['sunderland', 'Sunderland'],
|
15
|
+
['wigan', 'Wigan'],
|
16
|
+
['southampton', 'Southampton'],
|
17
|
+
['reading', 'Reading'],
|
18
|
+
['norwich', 'Norwich'],
|
19
|
+
['swansea', 'Swansea']
|
20
|
+
]
|
21
|
+
|
22
|
+
City.create_from_ary!( cities_en, country: en )
|
data/db/es/cities.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
es = Country.find_by_key!( 'es' )
|
4
|
+
|
5
|
+
cities_es = [
|
6
|
+
['bilbao', 'Bilbao'],
|
7
|
+
['valencia', 'Valencia'],
|
8
|
+
['barcelona', 'Barcelona'],
|
9
|
+
['madrid', 'Madrid'],
|
10
|
+
['malaga', 'Málaga']
|
11
|
+
]
|
12
|
+
|
13
|
+
City.create_from_ary!( cities_es, country: es )
|
data/db/fr/cities.rb
ADDED
data/db/gr/cities.rb
ADDED
data/db/hr/cities.rb
ADDED
data/db/it/cities.rb
ADDED
data/db/mx/cities.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
mx = Country.find_by_key!( 'mx' )
|
4
|
+
|
5
|
+
cities_mx = [
|
6
|
+
['mexico', 'México' ],
|
7
|
+
['cancun', 'Cancún' ],
|
8
|
+
['guadalajara', 'Guadalajara' ],
|
9
|
+
['tuxtla', 'Tuxtla Gutiérrez' ],
|
10
|
+
['leon', 'León' ],
|
11
|
+
['morelia', 'Morelia' ],
|
12
|
+
['monterrey', 'Monterrey' ],
|
13
|
+
['pachuca', 'Pachuca' ],
|
14
|
+
['puebla', 'Puebla' ],
|
15
|
+
['queretaro', 'Querétaro' ],
|
16
|
+
['sanluispotosi', 'San Luis Potosì' ],
|
17
|
+
['torreon', 'Torreón' ],
|
18
|
+
['tijuana', 'Tijuana' ],
|
19
|
+
['toluca', 'Toluca' ],
|
20
|
+
['sannicolas', 'San Nicolás de los Garza' ]
|
21
|
+
]
|
22
|
+
|
23
|
+
City.create_from_ary!( cities_mx, country: mx )
|
data/db/nl/cities.rb
ADDED
data/db/pt/cities.rb
ADDED
data/db/ro/cities.rb
ADDED
data/db/ru/cities.rb
ADDED
data/db/sc/cities.rb
ADDED
data/db/tr/cities.rb
ADDED
data/db/ua/cities.rb
ADDED
data/db/us/cities.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
us = Country.find_by_key!( 'us' )
|
4
|
+
|
5
|
+
regions_us = [
|
6
|
+
['ca', 'California'],
|
7
|
+
['ny', 'New York'],
|
8
|
+
['ma', 'Massachusetts'],
|
9
|
+
['pa', 'Pennsylvania'],
|
10
|
+
['il', 'Illinois'],
|
11
|
+
['oh', 'Ohio'],
|
12
|
+
['mi', 'Michigan'],
|
13
|
+
['tn', 'Tennessee'],
|
14
|
+
['tx', 'Texas'],
|
15
|
+
['az', 'Arizona']
|
16
|
+
]
|
17
|
+
|
18
|
+
cities_us = [
|
19
|
+
['newyork', 'New York', 'region:ny'],
|
20
|
+
['buffalo', 'Buffalo', 'region:ny'],
|
21
|
+
['philadelphia', 'Philadelphia', 'region:pa'],
|
22
|
+
['boston', 'Boston', 'region:ma'],
|
23
|
+
['chicago', 'Chicago', 'region:il'],
|
24
|
+
['columbus', 'Columbus', 'region:oh'],
|
25
|
+
['detroit', 'Detroit', 'region:mi'],
|
26
|
+
['nashville', 'Nashville', 'region:tn'],
|
27
|
+
['dallas', 'Dallas', 'region:tx'],
|
28
|
+
['phoenix', 'Phoenix', 'region:az'],
|
29
|
+
['losangeles', 'Los Angeles', 'region:ca'],
|
30
|
+
['sanjose', 'San Jose', 'region:ca'],
|
31
|
+
['anaheim', 'Anaheim', 'region:ca'],
|
32
|
+
['stlouis', 'St. Louis'],
|
33
|
+
['pittsburgh', 'Pittsburgh'],
|
34
|
+
['washington', 'Washington']
|
35
|
+
]
|
36
|
+
|
37
|
+
Region.create_from_ary!( regions_us, country: us )
|
38
|
+
City.create_from_ary!( cities_us, country: us )
|
data/lib/worlddb/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: worlddb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gerald Bauer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-11-
|
18
|
+
date: 2012-11-07 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activerecord
|
@@ -77,9 +77,30 @@ files:
|
|
77
77
|
- Rakefile
|
78
78
|
- bin/worlddb
|
79
79
|
- db/at/cities.rb
|
80
|
-
- db/cities.rb
|
81
|
-
- db/
|
80
|
+
- db/be/cities.rb
|
81
|
+
- db/by/cities.rb
|
82
|
+
- db/ca/cities.rb
|
83
|
+
- db/ch/cities.rb
|
84
|
+
- db/cy/cities.rb
|
85
|
+
- db/de.countries.rb
|
82
86
|
- db/de/cities.rb
|
87
|
+
- db/dk/cities.rb
|
88
|
+
- db/en.countries.rb
|
89
|
+
- db/en/cities.rb
|
90
|
+
- db/es/cities.rb
|
91
|
+
- db/fr/cities.rb
|
92
|
+
- db/gr/cities.rb
|
93
|
+
- db/hr/cities.rb
|
94
|
+
- db/it/cities.rb
|
95
|
+
- db/mx/cities.rb
|
96
|
+
- db/nl/cities.rb
|
97
|
+
- db/pt/cities.rb
|
98
|
+
- db/ro/cities.rb
|
99
|
+
- db/ru/cities.rb
|
100
|
+
- db/sc/cities.rb
|
101
|
+
- db/tr/cities.rb
|
102
|
+
- db/ua/cities.rb
|
103
|
+
- db/us/cities.rb
|
83
104
|
- lib/worlddb.rb
|
84
105
|
- lib/worlddb/cli/opts.rb
|
85
106
|
- lib/worlddb/cli/runner.rb
|
data/db/cities.rb
DELETED
@@ -1,263 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
|
4
|
-
cities_en = [
|
5
|
-
['manchester', 'Manchester'],
|
6
|
-
['london', 'London'],
|
7
|
-
['liverpool', 'Liverpool'],
|
8
|
-
['birmingham', 'Birmingham'], # e.g.Aston Villa
|
9
|
-
['westbrom', 'West Bromwich'],
|
10
|
-
['newcastle', 'Newcastle upon Tyne'],
|
11
|
-
['stoke', 'Stoke-on-Trent'],
|
12
|
-
['sunderland', 'Sunderland'],
|
13
|
-
['wigan', 'Wigan'],
|
14
|
-
['southampton', 'Southampton'],
|
15
|
-
['reading', 'Reading'],
|
16
|
-
['norwich', 'Norwich'],
|
17
|
-
['swansea', 'Swansea']
|
18
|
-
]
|
19
|
-
|
20
|
-
en = Country.find_by_key!( 'en' )
|
21
|
-
City.create_from_ary!( cities_en, country: en )
|
22
|
-
|
23
|
-
|
24
|
-
cities_es = [
|
25
|
-
['bilbao', 'Bilbao'],
|
26
|
-
['valencia', 'Valencia'],
|
27
|
-
['barcelona', 'Barcelona'],
|
28
|
-
['madrid', 'Madrid'],
|
29
|
-
['malaga', 'Málaga']
|
30
|
-
]
|
31
|
-
|
32
|
-
es = Country.find_by_key!( 'es' )
|
33
|
-
City.create_from_ary!( cities_es, country: es )
|
34
|
-
|
35
|
-
|
36
|
-
cities_fr = [
|
37
|
-
['lille', 'Lille'],
|
38
|
-
['paris', 'Paris'],
|
39
|
-
['marseille', 'Marseille'],
|
40
|
-
['montpellier', 'Montpellier']
|
41
|
-
]
|
42
|
-
|
43
|
-
fr = Country.find_by_key!( 'fr' )
|
44
|
-
City.create_from_ary!( cities_fr, country: fr )
|
45
|
-
|
46
|
-
|
47
|
-
cities_it = [
|
48
|
-
['turin', 'Turin'],
|
49
|
-
['milano', 'Mailand|Milano'],
|
50
|
-
['napoli', 'Neapel|Napoli']
|
51
|
-
]
|
52
|
-
|
53
|
-
it = Country.find_by_key!( 'it' )
|
54
|
-
City.create_from_ary!( cities_it, country: it )
|
55
|
-
|
56
|
-
|
57
|
-
cities_pt = [
|
58
|
-
['porto', 'Porto'],
|
59
|
-
['braga', 'Braga'],
|
60
|
-
['lisboa', 'Lissabon|Lisboa']
|
61
|
-
]
|
62
|
-
|
63
|
-
pt = Country.find_by_key!( 'pt' )
|
64
|
-
City.create_from_ary!( cities_pt, country: pt )
|
65
|
-
|
66
|
-
|
67
|
-
cities_ru = [
|
68
|
-
['moskva', 'Moskau|Moskva'],
|
69
|
-
['stpetersburg','St. Petersburg']
|
70
|
-
]
|
71
|
-
|
72
|
-
ru = Country.find_by_key!( 'ru' )
|
73
|
-
City.create_from_ary!( cities_ru, country: ru )
|
74
|
-
|
75
|
-
|
76
|
-
cities_be = [
|
77
|
-
['brussel', 'Brüssel|Brussel|Bruxelles|Brussels'] # de|nl|fr|en - RCA Anderlecht
|
78
|
-
]
|
79
|
-
|
80
|
-
be = Country.find_by_key!( 'be' )
|
81
|
-
City.create_from_ary!( cities_be, country: be )
|
82
|
-
|
83
|
-
|
84
|
-
cities_ua = [
|
85
|
-
['kiev', 'Kiew|Kiev|Kyiv' ],
|
86
|
-
['donetsk', 'Donezk|Donetsk'],
|
87
|
-
['kharkov', 'Kharkiv|Kharkov']
|
88
|
-
]
|
89
|
-
|
90
|
-
ua = Country.find_by_key!( 'ua' )
|
91
|
-
City.create_from_ary!( cities_ua, country: ua )
|
92
|
-
|
93
|
-
|
94
|
-
cities_nl = [
|
95
|
-
['amsterdam','Amsterdam'],
|
96
|
-
['alkmaar','Alkmaar'] ## region: North Holland
|
97
|
-
]
|
98
|
-
|
99
|
-
nl = Country.find_by_key!( 'nl' )
|
100
|
-
City.create_from_ary!( cities_nl, country: nl )
|
101
|
-
|
102
|
-
|
103
|
-
cities_hr = [
|
104
|
-
['zagreb','Zagreb']
|
105
|
-
]
|
106
|
-
|
107
|
-
hr = Country.find_by_key!( 'hr' )
|
108
|
-
City.create_from_ary!( cities_hr, country: hr )
|
109
|
-
|
110
|
-
|
111
|
-
cities_gr = [
|
112
|
-
['piraeus','Piräus|Piraeus']
|
113
|
-
]
|
114
|
-
|
115
|
-
gr = Country.find_by_key!( 'gr' )
|
116
|
-
City.create_from_ary!( cities_gr, country: gr )
|
117
|
-
|
118
|
-
|
119
|
-
cities_dk = [
|
120
|
-
['farum','Farum'] ## region: North Zealand ??
|
121
|
-
]
|
122
|
-
|
123
|
-
dk = Country.find_by_key!( 'dk' )
|
124
|
-
City.create_from_ary!( cities_dk, country: dk )
|
125
|
-
|
126
|
-
|
127
|
-
cities_by = [
|
128
|
-
['borisov','Borissow|Borisov|Barysaw']
|
129
|
-
]
|
130
|
-
|
131
|
-
by = Country.find_by_key!( 'by' )
|
132
|
-
City.create_from_ary!( cities_by, country: by )
|
133
|
-
|
134
|
-
|
135
|
-
cities_sc = [
|
136
|
-
['glasgow','Glasgow']
|
137
|
-
]
|
138
|
-
|
139
|
-
sc = Country.find_by_key!( 'sc' )
|
140
|
-
City.create_from_ary!( cities_sc, country: sc )
|
141
|
-
|
142
|
-
|
143
|
-
cities_tr = [
|
144
|
-
['istanbul','Istanbul']
|
145
|
-
]
|
146
|
-
|
147
|
-
tr = Country.find_by_key!( 'tr' )
|
148
|
-
City.create_from_ary!( cities_tr, country: tr )
|
149
|
-
|
150
|
-
|
151
|
-
cities_ro = [
|
152
|
-
['cluj','Cluj']
|
153
|
-
]
|
154
|
-
|
155
|
-
ro = Country.find_by_key!( 'ro' )
|
156
|
-
City.create_from_ary!( cities_ro, country: ro )
|
157
|
-
|
158
|
-
|
159
|
-
cities_ch = [
|
160
|
-
['basel','Basel']
|
161
|
-
]
|
162
|
-
|
163
|
-
ch = Country.find_by_key!( 'ch' )
|
164
|
-
City.create_from_ary!( cities_ch, country: ch )
|
165
|
-
|
166
|
-
|
167
|
-
cities_cy = [
|
168
|
-
['nikosia','Nikosia|Nicosia']
|
169
|
-
]
|
170
|
-
|
171
|
-
cy = Country.find_by_key!( 'cy' )
|
172
|
-
City.create_from_ary!( cities_cy, country: cy )
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
cities_mx = [
|
177
|
-
['mexico', 'México' ],
|
178
|
-
['cancun', 'Cancún' ],
|
179
|
-
['guadalajara', 'Guadalajara' ],
|
180
|
-
['tuxtla', 'Tuxtla Gutiérrez' ],
|
181
|
-
['leon', 'León' ],
|
182
|
-
['morelia', 'Morelia' ],
|
183
|
-
['monterrey', 'Monterrey' ],
|
184
|
-
['pachuca', 'Pachuca' ],
|
185
|
-
['puebla', 'Puebla' ],
|
186
|
-
['queretaro', 'Querétaro' ],
|
187
|
-
['sanluispotosi', 'San Luis Potosì' ],
|
188
|
-
['torreon', 'Torreón' ],
|
189
|
-
['tijuana', 'Tijuana' ],
|
190
|
-
['toluca', 'Toluca' ],
|
191
|
-
['sannicolas', 'San Nicolás de los Garza' ]
|
192
|
-
]
|
193
|
-
|
194
|
-
mx = Country.find_by_key!( 'mx' )
|
195
|
-
City.create_from_ary!( cities_mx, country: mx )
|
196
|
-
|
197
|
-
|
198
|
-
regions_ca = [
|
199
|
-
['on', 'Ontario'],
|
200
|
-
['qc', 'Quebec'],
|
201
|
-
['ns', 'Nova Scotia'],
|
202
|
-
['nb', 'New Brunswick'],
|
203
|
-
['mb', 'Manitoba'],
|
204
|
-
['bc', 'British Columbia'],
|
205
|
-
['pe', 'Prince Edward Island'],
|
206
|
-
['sk', 'Saskatchewan'],
|
207
|
-
['ab', 'Alberta'],
|
208
|
-
['nl', 'Newfoundland and Labrador']
|
209
|
-
]
|
210
|
-
|
211
|
-
cities_ca = [
|
212
|
-
['montreal', 'Montreal', 'region:qc'],
|
213
|
-
['ottawa', 'Ottawa', 'region:on'],
|
214
|
-
['toronto', 'Toronto', 'region:on'],
|
215
|
-
['winnipeg', 'Winnipeg', 'region:mb'],
|
216
|
-
['calgary', 'Calgary', 'region:ab'],
|
217
|
-
['edmonton', 'Edmonton', 'region:ab'],
|
218
|
-
['vancouver', 'Vancouver', 'region:bc']
|
219
|
-
]
|
220
|
-
|
221
|
-
ca = Country.find_by_key!( 'ca' )
|
222
|
-
Region.create_from_ary!( regions_ca, country: ca )
|
223
|
-
City.create_from_ary!( cities_ca, country: ca )
|
224
|
-
|
225
|
-
|
226
|
-
regions_us = [
|
227
|
-
['ca', 'California'],
|
228
|
-
['ny', 'New York'],
|
229
|
-
['ma', 'Massachusetts'],
|
230
|
-
['pa', 'Pennsylvania'],
|
231
|
-
['il', 'Illinois'],
|
232
|
-
['oh', 'Ohio'],
|
233
|
-
['mi', 'Michigan'],
|
234
|
-
['tn', 'Tennessee'],
|
235
|
-
['tx', 'Texas'],
|
236
|
-
['az', 'Arizona']
|
237
|
-
]
|
238
|
-
|
239
|
-
cities_us = [
|
240
|
-
['newyork', 'New York', 'region:ny'],
|
241
|
-
['buffalo', 'Buffalo', 'region:ny'],
|
242
|
-
['philadelphia', 'Philadelphia', 'region:pa'],
|
243
|
-
['boston', 'Boston', 'region:ma'],
|
244
|
-
['chicago', 'Chicago', 'region:il'],
|
245
|
-
['columbus', 'Columbus', 'region:oh'],
|
246
|
-
['detroit', 'Detroit', 'region:mi'],
|
247
|
-
['nashville', 'Nashville', 'region:tn'],
|
248
|
-
['dallas', 'Dallas', 'region:tx'],
|
249
|
-
['phoenix', 'Phoenix', 'region:az'],
|
250
|
-
['losangeles', 'Los Angeles', 'region:ca'],
|
251
|
-
['sanjose', 'San Jose', 'region:ca'],
|
252
|
-
['anaheim', 'Anaheim', 'region:ca'],
|
253
|
-
['stlouis', 'St. Louis'],
|
254
|
-
['pittsburgh', 'Pittsburgh'],
|
255
|
-
['washington', 'Washington']
|
256
|
-
]
|
257
|
-
|
258
|
-
us = Country.find_by_key!( 'us' )
|
259
|
-
Region.create_from_ary!( regions_us, country: us )
|
260
|
-
City.create_from_ary!( cities_us, country: us )
|
261
|
-
|
262
|
-
|
263
|
-
Prop.create!( key: 'db.cities.version', value: '1' )
|