worlddb 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/Manifest.txt +43 -32
  2. data/db/africa/countries.txt +10 -0
  3. data/db/america/br/cities.txt +7 -0
  4. data/db/america/br/regions.txt +27 -0
  5. data/db/america/ca/cities.txt +7 -0
  6. data/db/america/ca/regions.txt +10 -0
  7. data/db/america/countries.motor.yml +25 -0
  8. data/db/america/countries.txt +34 -0
  9. data/db/america/mx/cities.txt +15 -0
  10. data/db/america/us/cities.txt +16 -0
  11. data/db/america/us/regions.txt +10 -0
  12. data/db/america/ve/cities.txt +358 -0
  13. data/db/america/ve/regions.txt +46 -0
  14. data/db/asia/countries.txt +14 -0
  15. data/db/asia/jp/{cities.rb → cities.txt} +0 -0
  16. data/db/europe/at/cities.txt +32 -0
  17. data/db/europe/at/regions.txt +17 -0
  18. data/db/europe/be/cities.txt +1 -0
  19. data/db/europe/by/cities.txt +1 -0
  20. data/db/europe/ch/cities.txt +1 -0
  21. data/db/europe/countries.txt +65 -0
  22. data/db/europe/cy/cities.txt +1 -0
  23. data/db/europe/de/cities.txt +18 -0
  24. data/db/europe/de/regions.txt +16 -0
  25. data/db/europe/dk/cities.txt +1 -0
  26. data/db/europe/en/cities.txt +13 -0
  27. data/db/europe/es/cities.txt +5 -0
  28. data/db/europe/fr/cities.txt +4 -0
  29. data/db/europe/gr/cities.txt +1 -0
  30. data/db/europe/hr/cities.txt +1 -0
  31. data/db/europe/it/cities.txt +4 -0
  32. data/db/europe/nl/cities.txt +2 -0
  33. data/db/europe/pt/cities.txt +3 -0
  34. data/db/europe/ro/cities.txt +1 -0
  35. data/db/europe/ru/cities.txt +2 -0
  36. data/db/europe/sc/cities.txt +1 -0
  37. data/db/europe/tr/cities.txt +1 -0
  38. data/db/europe/ua/cities.txt +3 -0
  39. data/db/oceania/au/cities.txt +2 -0
  40. data/db/oceania/countries.txt +5 -0
  41. data/db/tags.yml +13 -0
  42. data/lib/worlddb.rb +6 -1
  43. data/lib/worlddb/cli/opts.rb +37 -0
  44. data/lib/worlddb/cli/runner.rb +29 -11
  45. data/lib/worlddb/models/city.rb +4 -0
  46. data/lib/worlddb/models/country.rb +3 -0
  47. data/lib/worlddb/models/region.rb +4 -0
  48. data/lib/worlddb/models/tag.rb +15 -0
  49. data/lib/worlddb/models/tagging.rb +12 -0
  50. data/lib/worlddb/reader.rb +211 -0
  51. data/lib/worlddb/schema.rb +17 -0
  52. data/lib/worlddb/version.rb +2 -1
  53. metadata +85 -36
  54. data/db/africa/countries.rb +0 -19
  55. data/db/america/ca/cities.rb +0 -31
  56. data/db/america/countries.rb +0 -44
  57. data/db/america/mx/cities.rb +0 -23
  58. data/db/america/us/cities.rb +0 -38
  59. data/db/america/ve/cities.rb +0 -2
  60. data/db/asia/countries.rb +0 -22
  61. data/db/europe/at/cities.rb +0 -70
  62. data/db/europe/be/cities.rb +0 -10
  63. data/db/europe/by/cities.rb +0 -9
  64. data/db/europe/ch/cities.rb +0 -9
  65. data/db/europe/countries.rb +0 -73
  66. data/db/europe/cy/cities.rb +0 -11
  67. data/db/europe/de/cities.rb +0 -51
  68. data/db/europe/dk/cities.rb +0 -9
  69. data/db/europe/en/cities.rb +0 -22
  70. data/db/europe/es/cities.rb +0 -13
  71. data/db/europe/fr/cities.rb +0 -12
  72. data/db/europe/gr/cities.rb +0 -9
  73. data/db/europe/hr/cities.rb +0 -9
  74. data/db/europe/it/cities.rb +0 -11
  75. data/db/europe/nl/cities.rb +0 -11
  76. data/db/europe/pt/cities.rb +0 -11
  77. data/db/europe/ro/cities.rb +0 -9
  78. data/db/europe/ru/cities.rb +0 -11
  79. data/db/europe/sc/cities.rb +0 -10
  80. data/db/europe/tr/cities.rb +0 -9
  81. data/db/europe/ua/cities.rb +0 -11
  82. data/db/oceania/au/cities.rb +0 -2
  83. data/db/oceania/countries.rb +0 -14
  84. data/db/tags.rb +0 -8
@@ -1,13 +0,0 @@
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 )
@@ -1,12 +0,0 @@
1
- # encoding: utf-8
2
-
3
- fr = Country.find_by_key!( 'fr' )
4
-
5
- cities_fr = [
6
- ['lille', 'Lille'],
7
- ['paris', 'Paris'],
8
- ['marseille', 'Marseille'],
9
- ['montpellier', 'Montpellier']
10
- ]
11
-
12
- City.create_from_ary!( cities_fr, country: fr )
@@ -1,9 +0,0 @@
1
- # encoding: utf-8
2
-
3
- gr = Country.find_by_key!( 'gr' )
4
-
5
- cities_gr = [
6
- ['piraeus','Piräus|Piraeus']
7
- ]
8
-
9
- City.create_from_ary!( cities_gr, country: gr )
@@ -1,9 +0,0 @@
1
- # encoding: utf-8
2
-
3
- hr = Country.find_by_key!( 'hr' )
4
-
5
- cities_hr = [
6
- ['zagreb','Zagreb']
7
- ]
8
-
9
- City.create_from_ary!( cities_hr, country: hr )
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- it = Country.find_by_key!( 'it' )
4
-
5
- cities_it = [
6
- ['turin', 'Turin'],
7
- ['milano', 'Mailand|Milano'],
8
- ['napoli', 'Neapel|Napoli']
9
- ]
10
-
11
- City.create_from_ary!( cities_it, country: it )
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- nl = Country.find_by_key!( 'nl' )
4
-
5
- cities_nl = [
6
- ['amsterdam','Amsterdam'],
7
- ['alkmaar','Alkmaar'] ## region: North Holland
8
- ]
9
-
10
- City.create_from_ary!( cities_nl, country: nl )
11
-
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- pt = Country.find_by_key!( 'pt' )
4
-
5
- cities_pt = [
6
- ['porto', 'Porto'],
7
- ['braga', 'Braga'],
8
- ['lisboa', 'Lissabon|Lisboa']
9
- ]
10
-
11
- City.create_from_ary!( cities_pt, country: pt )
@@ -1,9 +0,0 @@
1
- # encoding: utf-8
2
-
3
- ro = Country.find_by_key!( 'ro' )
4
-
5
- cities_ro = [
6
- ['cluj','Cluj']
7
- ]
8
-
9
- City.create_from_ary!( cities_ro, country: ro )
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- ru = Country.find_by_key!( 'ru' )
4
-
5
- cities_ru = [
6
- ['moskva', 'Moskau|Moskva'],
7
- ['stpetersburg','St. Petersburg']
8
- ]
9
-
10
- City.create_from_ary!( cities_ru, country: ru )
11
-
@@ -1,10 +0,0 @@
1
- # encoding: utf-8
2
-
3
- sc = Country.find_by_key!( 'sc' )
4
-
5
- cities_sc = [
6
- ['glasgow','Glasgow']
7
- ]
8
-
9
- City.create_from_ary!( cities_sc, country: sc )
10
-
@@ -1,9 +0,0 @@
1
- # encoding: utf-8
2
-
3
- tr = Country.find_by_key!( 'tr' )
4
-
5
- cities_tr = [
6
- ['istanbul','Istanbul']
7
- ]
8
-
9
- City.create_from_ary!( cities_tr, country: tr )
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- ua = Country.find_by_key!( 'ua' )
4
-
5
- cities_ua = [
6
- ['kiev', 'Kiew|Kiev|Kyiv' ],
7
- ['donetsk', 'Donezk|Donetsk'],
8
- ['kharkov', 'Kharkiv|Kharkov']
9
- ]
10
-
11
- City.create_from_ary!( cities_ua, country: ua )
@@ -1,2 +0,0 @@
1
-
2
- ## add australian regions and cities here
@@ -1,14 +0,0 @@
1
- # encoding: utf-8
2
-
3
- ###############################
4
- ## australia & oceania
5
-
6
- countries = [
7
- [ 'au', 'Australia', 'AUS' ],
8
- [ 'nz', 'New Zealand', 'NZL' ]
9
- ]
10
-
11
- Country.create_from_ary!( countries )
12
-
13
-
14
- Prop.create!( key: 'db.countries.oceania.version', value: '1' )
data/db/tags.rb DELETED
@@ -1,8 +0,0 @@
1
-
2
- ## some tags
3
-
4
- continents = ['europe','america','asia','africa','oceania']
5
- americas = ['north america', 'south america', 'central america', 'caribbean islands']
6
- orgs = ['un', 'eu', 'mercosur', 'nafta']
7
- football = ['uefa', 'afc', 'ofc', 'caf', 'csf', 'concacaf']
8
- regions = ['benelux']