worldwise 0.0.1
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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +81 -0
- data/Rakefile +31 -0
- data/app/assets/javascripts/application.js +15 -0
- data/app/assets/stylesheets/application.css +13 -0
- data/app/controllers/worldwise/application_controller.rb +4 -0
- data/app/helpers/application_helper.rb +4 -0
- data/app/models/continent.rb +41 -0
- data/app/models/continent_model.rb +15 -0
- data/app/models/country.rb +33 -0
- data/app/models/neighborship.rb +28 -0
- data/app/views/layouts/worldwise/application.html.erb +14 -0
- data/config/routes.rb +2 -0
- data/db/data/continent_models.yml +42 -0
- data/db/data/continents.yml +1292 -0
- data/db/data/countries.yml +25906 -0
- data/db/migrate/20130126102623_create_continent_models.rb +17 -0
- data/db/migrate/20130126102624_create_continents.rb +25 -0
- data/db/migrate/20130127164054_create_countries.rb +57 -0
- data/db/migrate/20130201161328_create_neighborships.rb +11 -0
- data/lib/tasks/testing_tasks.rake +7 -0
- data/lib/tasks/worldwise_tasks.rake +66 -0
- data/lib/worldwise.rb +20 -0
- data/lib/worldwise/active_record.rb +7 -0
- data/lib/worldwise/active_record/acts_as_neighbor.rb +11 -0
- data/lib/worldwise/active_record/class_methods.rb +32 -0
- data/lib/worldwise/active_record/worldwise.rb +11 -0
- data/lib/worldwise/engine.rb +14 -0
- data/lib/worldwise/metadata.rb +5 -0
- data/lib/worldwise/metadata/country.rb +87 -0
- data/lib/worldwise/version.rb +3 -0
- metadata +109 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class CreateContinentModels < ActiveRecord::Migration
|
|
2
|
+
def up
|
|
3
|
+
create_table :continent_models do |t|
|
|
4
|
+
t.string :code
|
|
5
|
+
t.timestamps
|
|
6
|
+
end
|
|
7
|
+
ContinentModel.create_translation_table!(
|
|
8
|
+
name: :string,
|
|
9
|
+
description: :text
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def down
|
|
14
|
+
drop_table :continent_models
|
|
15
|
+
ContinentModel.drop_translation_table!
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
class CreateContinents < ActiveRecord::Migration
|
|
2
|
+
|
|
3
|
+
def up
|
|
4
|
+
create_table :continents do |t|
|
|
5
|
+
t.string :code
|
|
6
|
+
t.decimal :land_mass_percentage, precision: 4, scale: 2
|
|
7
|
+
t.timestamps
|
|
8
|
+
end
|
|
9
|
+
Continent.create_translation_table!(
|
|
10
|
+
name: :string,
|
|
11
|
+
alternative_names: :string
|
|
12
|
+
)
|
|
13
|
+
create_table :continent_models_continents do |t|
|
|
14
|
+
t.references :continent_model
|
|
15
|
+
t.references :continent
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def down
|
|
20
|
+
drop_table :continent_models_continents
|
|
21
|
+
drop_table :continents
|
|
22
|
+
Continent.drop_translation_table!
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
class CreateCountries < ActiveRecord::Migration
|
|
2
|
+
|
|
3
|
+
def up
|
|
4
|
+
create_table :countries do |t|
|
|
5
|
+
t.string :iso_3166_alpha2, length: 2
|
|
6
|
+
t.string :iso_3166_alpha3, length: 3
|
|
7
|
+
t.string :iso_3166_numeric3, length: 3
|
|
8
|
+
|
|
9
|
+
t.string :fips_104
|
|
10
|
+
|
|
11
|
+
t.string :iana_internet_country_code_tld
|
|
12
|
+
t.string :itu_callsign_prefix
|
|
13
|
+
t.string :itu_maritime_id
|
|
14
|
+
t.string :itu_letter_code
|
|
15
|
+
t.string :icao_airport_code_prefix
|
|
16
|
+
t.string :ioc_country_code
|
|
17
|
+
t.string :icao_aircraft_registration_prefix
|
|
18
|
+
t.string :e212_mobile_country_code
|
|
19
|
+
t.string :nato_alpha3
|
|
20
|
+
t.string :nato_alpha2
|
|
21
|
+
t.string :loc_marc_code
|
|
22
|
+
t.string :un_license_plate_code
|
|
23
|
+
t.string :gs1_gtin_prefix
|
|
24
|
+
t.string :undp_country_code
|
|
25
|
+
t.string :wmo_country_code
|
|
26
|
+
|
|
27
|
+
t.string :latitude
|
|
28
|
+
t.string :longitude
|
|
29
|
+
|
|
30
|
+
t.text :address_format
|
|
31
|
+
|
|
32
|
+
# International public telecommunication numbering plan
|
|
33
|
+
t.string :e164_country_code
|
|
34
|
+
t.string :e164_national_destination_code_lengths
|
|
35
|
+
t.string :e164_national_number_lengths
|
|
36
|
+
t.string :e164_international_prefix
|
|
37
|
+
t.string :e164_national_prefix
|
|
38
|
+
|
|
39
|
+
t.timestamps
|
|
40
|
+
end
|
|
41
|
+
Country.create_translation_table!(
|
|
42
|
+
name: :string,
|
|
43
|
+
alternative_names: :string
|
|
44
|
+
)
|
|
45
|
+
create_table :continents_countries do |t|
|
|
46
|
+
t.references :continent
|
|
47
|
+
t.references :country
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def down
|
|
52
|
+
drop_table :continents_countries
|
|
53
|
+
drop_table :countries
|
|
54
|
+
Continent.drop_translation_table!
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
|
|
3
|
+
require 'active_record/fixtures'
|
|
4
|
+
|
|
5
|
+
DATA_DIR = Worldwise::Engine.root.join('db/data')
|
|
6
|
+
|
|
7
|
+
namespace :worldwise do
|
|
8
|
+
|
|
9
|
+
namespace :load_data do
|
|
10
|
+
|
|
11
|
+
desc "Import all data"
|
|
12
|
+
task all: :environment do
|
|
13
|
+
import_continent_models
|
|
14
|
+
import_continents
|
|
15
|
+
import_countries
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
desc "Import Continent Models"
|
|
19
|
+
task continent_models: :environment do
|
|
20
|
+
import_continent_models
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
desc "Import Continents"
|
|
24
|
+
task continents: :environment do
|
|
25
|
+
import_continents
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
desc "Import Countries"
|
|
29
|
+
task countries: :environment do
|
|
30
|
+
import_countries
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def import_continent_models
|
|
38
|
+
puts "\n"; print "Loading Continent Models: "
|
|
39
|
+
seed_file = File.join(DATA_DIR, 'continent_models.yml')
|
|
40
|
+
YAML::load_file(seed_file).each do |record|
|
|
41
|
+
print '.' #+ record.inspect
|
|
42
|
+
ContinentModel.create_or_update(record)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def import_continents
|
|
47
|
+
puts "\n"; print "Loading Continents: "
|
|
48
|
+
seed_file = File.join(DATA_DIR, 'continents.yml')
|
|
49
|
+
YAML::load_file(seed_file).each do |record|
|
|
50
|
+
print '.' #+ record.inspect
|
|
51
|
+
Continent.create_or_update(record)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def import_countries
|
|
56
|
+
puts "\n"; print "Loading Countries: "
|
|
57
|
+
seed_file = File.join(DATA_DIR, 'countries.yml')
|
|
58
|
+
YAML::load_file(seed_file).each do |record|
|
|
59
|
+
print '.' #+ record.inspect
|
|
60
|
+
Country.create_or_update(record)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
#File.open("#{DATA_DIR}/continent_models_test.yml", 'w') do |file|
|
|
65
|
+
# YAML::dump(Worldwise::ContinentModel.all, file)
|
|
66
|
+
#end
|
data/lib/worldwise.rb
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require "globalize3"
|
|
2
|
+
|
|
3
|
+
require "worldwise/engine"
|
|
4
|
+
|
|
5
|
+
module Worldwise
|
|
6
|
+
include ActiveSupport::Configurable
|
|
7
|
+
|
|
8
|
+
# The total land area of all continents (in km2)
|
|
9
|
+
TOTAL_CONTINENT_LAND_MASS = 148647000
|
|
10
|
+
|
|
11
|
+
## The default continent model we use when retrieving continents.
|
|
12
|
+
## Can be one of: [:CM4, :CM5, :CM6A, :CM6E, :CM7]
|
|
13
|
+
#config.default_continent_model = :CM7
|
|
14
|
+
#config_accessor :default_continent_model
|
|
15
|
+
|
|
16
|
+
autoload :ActiveRecord, 'worldwise/active_record'
|
|
17
|
+
autoload :Metadata, 'worldwise/metadata'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
ActiveRecord::Base.extend(Worldwise::ActiveRecord::Worldwise)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module Worldwise
|
|
2
|
+
module ActiveRecord
|
|
3
|
+
module ActsAsNeighbor
|
|
4
|
+
def acts_as_neighbor
|
|
5
|
+
attr_accessible :neighbor_ids
|
|
6
|
+
has_many :neighborships, as: :owner
|
|
7
|
+
has_many :neighbors, through: :neighborships, as: :neighbor, source: :neighbor, source_type: self.name
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Worldwise
|
|
2
|
+
module ActiveRecord
|
|
3
|
+
module ClassMethods
|
|
4
|
+
|
|
5
|
+
# Given a hash of attributes including the ID, look up the record by ID.
|
|
6
|
+
# If it exists, it is updated with the given options.
|
|
7
|
+
# If it does not exist, it is created with the rest of the options.
|
|
8
|
+
#
|
|
9
|
+
# Raises an exception if the record is invalid to ensure seed data is loaded
|
|
10
|
+
# correctly.
|
|
11
|
+
#
|
|
12
|
+
# Returns the record.
|
|
13
|
+
def create_or_update(options = {})
|
|
14
|
+
id = options.delete('id')
|
|
15
|
+
translations_attributes = options.delete('translations_attributes') || {}
|
|
16
|
+
record = find_by_id(id) || new
|
|
17
|
+
record.id = id
|
|
18
|
+
record.attributes = options
|
|
19
|
+
translations_attributes.each do |ta|
|
|
20
|
+
ta.delete("#{record.class.name.underscore}_id")
|
|
21
|
+
rta = record.translations.find_by_locale(ta['locale']) || record.translations.build
|
|
22
|
+
rta.send("#{record.class.name.underscore}_id=", record.id)
|
|
23
|
+
rta.attributes = ta
|
|
24
|
+
rta.save! unless record.new_record?
|
|
25
|
+
end
|
|
26
|
+
record.save!
|
|
27
|
+
record
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module Worldwise
|
|
2
|
+
class Engine < ::Rails::Engine
|
|
3
|
+
#isolate_namespace Worldwise
|
|
4
|
+
config.generators do |g|
|
|
5
|
+
#g.template_engine :haml
|
|
6
|
+
g.integration_tool :rspec
|
|
7
|
+
g.test_framework :rspec, view_specs: false
|
|
8
|
+
#g.fixture_replacement :factory_girl, dir: 'spec/factories'
|
|
9
|
+
g.orm :active_record
|
|
10
|
+
#g.stylesheets true
|
|
11
|
+
#g.form_builder :simple_form
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
|
|
3
|
+
module Worldwise
|
|
4
|
+
module Metadata
|
|
5
|
+
module Country
|
|
6
|
+
|
|
7
|
+
def metadata
|
|
8
|
+
{
|
|
9
|
+
iso_3166_alpha2: %Q{ISO 3166-1 alpha-2 country code},
|
|
10
|
+
iso_3166_alpha3: %Q{ISO 3166-1 alpha-3 country code},
|
|
11
|
+
iso_3166_numeric3: %Q{ISO 3166-1 numeric country code},
|
|
12
|
+
fips_104: %Q{FIPS 10-4 country code.},
|
|
13
|
+
iso_en_name: %Q{The ISO 3166-1 official English short name of the country (Gazetteer order).\n\nCountry names are spelled in English only character set (UTF-7 w/o diacritics), spelled according to Gazetteer order.\nEx. Bolivia, Plurinational State of},
|
|
14
|
+
iso_en_proper: %Q{The ISO 3166-1 official English short name of the country (proper reading order).\n\nCountry names are spelled in English only character set (UTF-7 w/o diacritics), spelled according to the proper reading order.\nEx. Plurinational State of Bolivia},
|
|
15
|
+
iso_en_ro_name: %Q{The ISO 3166-1 official English romanized short name of the country (Gazetteer order).\n\nCountry names are spelled in romanized format (UTF-8 w/diacritics), spelled according to Gazetteer order.\nEx. Åland Islands},
|
|
16
|
+
iso_en_ro_proper: %Q{The ISO 3166-1 official English romanized short name of the country (proper reading order).\n\nCountry names are spelled in romanized format (UTF-8 w/diacritics), spelled according to the proper reading order.\nEx. Åland Islands},
|
|
17
|
+
iso_fr_name: %Q{The ISO 3166-1 official French short name of the country (Gazetteer order).\n\nCountry names are spelled in French only character set (UTF-8) and grammatical form, spelled according to Gazetteer order. By French grammatical convention, adjectives are lowercased.\nEx. Syrienne, République arabe},
|
|
18
|
+
iso_fr_proper: %Q{The ISO 3166-1 official French short name of the country (proper reading order).\n\nCountry names are spelled in French only character set (UTF-8) and grammatical form, spelled according to the proper reading order. By French grammatical convention, adjectives are lowercased.\nEx. République arabe syrienne,},
|
|
19
|
+
iso_es_name: %Q{The ISO 3166-1 official Spanish short name of the country (Gazetteer order).\n\nCountry names are spelled in Spanish only character set (UTF-8 w/diacritics) and grammatical form, spelled according to gazetteer order.\nEx. República Checa},
|
|
20
|
+
ungegn_en_name: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) English short name of the country (Gazetteer order).\n\nCountry names are spelled in English only character set (UTF-7 w/o diacritics) and grammatical form, spelled according to the gazetteer order.\nEx. Czech Republic (the)},
|
|
21
|
+
ungegn_en_longname: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) English formal (long) name of the country (proper reading order).\n\nCountry names are spelled in English only character set (UTF-7 w/o diacritics) and grammatical form, spelled according to the proper reading order.\nEx. the Czech Republic},
|
|
22
|
+
ungegn_fr_name: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) French short name of the country (Gazetteer order).\n\nCountry names are spelled in French only character set (UTF-8 w/diacritics) and grammatical form, spelled according to the gazetteer order. By French grammatical convention, adjectives are lowercased.\nEx. République tchéque (la)},
|
|
23
|
+
ungegn_fr_longname: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) French formal (long) name of the country (proper reading order).\n\nCountry names are spelled in French only character set (UTF-8 w/diacritics) and grammatical form, spelled according to the proper reading order. By French grammatical convention, adjectives are lowercased.\nEx. la République tchéque},
|
|
24
|
+
ungegn_es_name: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) Spanish short name of the country (Gazetteer order).\n\nCountry names are spelled in Spanish only character set (UTF-8 w/diacritics) and grammatical form, spelled according to the gazetteer order.\nEx. República Checa},
|
|
25
|
+
ungegn_es_longname: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) Spanish formal (long) name of the country (proper reading order).\n\nCountry names are spelled in Spanish only character set (UTF-8 w/diacritics) and grammatical form, spelled according to the proper reading order.\nEx. la República Checa (la)},
|
|
26
|
+
ungegn_ru_name: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) Russian cyrillic short name of the country (proper reading order).\n\nCountry names are spelled in Russian only character set (UTF-8 cyrillic) and grammatical form, spelled according to the gazetteer order.\nEx. Австрия},
|
|
27
|
+
ungegn_ru_longname: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) Russian cyrillic formal (long) name of the country (proper reading order).\n\nCountry names are spelled in Russian only character set (UTF-8 cyrillic) and grammatical form, spelled according to the proper reading order.\nEx. Австрийская Республика},
|
|
28
|
+
ungegn_lc_ro_name: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) local romanized short name of the country (proper reading order).\n\nCountry names are spelled are spelled in romanized character set (UTF-8 w/diacritics) of the local language, spelled according to the proper reading order. By French grammatical convention, adjectives are lowercased.\nEx. Österreich},
|
|
29
|
+
ungegn_lc_ro_longname: %Q{United Nations Group of Experts on Geographic Names (UNGEGN) local romanized formal (long) name of the country (proper reading order).\n\nCountry names are spelled are spelled in romanized character set (UTF-8 w/diacritics) of the local language, spelled according to the proper reading order. By French grammatical convention, adjectives are lowercased.\nEx. la République centrafricaine(fr)
|
|
30
|
+
},
|
|
31
|
+
bgn_name: %Q{US Board on Geographic Names (BGN) English short name of the country (Gazetteer order).\n\nCountry names are spelled in English only character set (UTF-7 w/o diacritics), spelled according to Gazetteer order.\nEx. Syria},
|
|
32
|
+
bgn_proper: %Q{US Board on Geographic Names (BGN) English short name of the country (proper reading order).\n\nCountry names are spelled in English only character set (UTF-7 w/o diacritics), spelled according to the proper reading order.\nEx. The Bahamas},
|
|
33
|
+
bgn_longname: %Q{US Board on Geographic Names (BGN) English long name of the country (proper reading order).\n\nCountry names are spelled in English only character set (UTF-7 w/o diacritics), spelled according to the proper reading order.\nEx. Syrian Arab Republic},
|
|
34
|
+
bgn_lc_longname: %Q{US Board on Geographic Names (BGN) local long name of the country (proper reading order).\n\nCountry names are spelled are spelled in English only character set (UTF-7 w/o diacritics), spelled according to the proper reading order. The convention of lowercasing adjectives for the French language is not followed.\nEx. Jamhuri ya Muungano wa Republique Centrafricaine(fr).},
|
|
35
|
+
bgn_lc_name: %Q{US Board on Geographic Names (BGN) local short name of the country (proper reading order).\n\nCountry names are spelled are spelled in English only character set (UTF-7 w/o diacritics), spelled according to the proper reading order. The convention of lowercasing adjectives for the French language is not followed.\nEx. Oesterreich(at)},
|
|
36
|
+
pcgn_name: %Q{UK Permanent Committee on Geographic Names approved English short name (Gazetter order, w/o diacritics).\n\nEx. Korea, North},
|
|
37
|
+
pcgn_proper: %Q{UK Permanent Committee on Geographic Names approved English short name (proper reading order, w/o diacritics).\n\nEx. North Korea},
|
|
38
|
+
pcgn_longname: %Q{UK Permanent Committee on Geographic Names approved English long name (proper reading order, w/o diacritics).\n\nEx. Democratic People's Republic of Korea},
|
|
39
|
+
fao_it_name: %Q{Food and Agriculture Organization of the United Nations Italian short name (Gazetteer order, w/diacritics).\n\nEx. Perù},
|
|
40
|
+
fao_it_proper: %Q{Food and Agriculture Organization of the United Nations Italian short name (proper reading order, w/diacritics).\n\nEx. Perù},
|
|
41
|
+
fao_it_longname: %Q{Food and Agriculture Organization of the United Nations Italian official name (proper reading order).\n\nEx. Repubblica del Perù},
|
|
42
|
+
eki_name: %Q{Institute of Estonian Language Estonian short name (Gazetteer order, w/diacritics).\n\nEx. Peruu},
|
|
43
|
+
eki_longname: %Q{Institute of Estonian Language Estonian official name (proper reading order).\n\nEx. Peruu Vabariik},
|
|
44
|
+
conv_abbr: %Q{Conventonal abbreviation for the country name.\n\nEx. BIOT for British Indian Ocean Territory},
|
|
45
|
+
has_capital: %Q{boolean whether the country has a designated capital city.},
|
|
46
|
+
bgn_capital: %Q{BGN approved English capital name.},
|
|
47
|
+
ungegn_lc_capital: %Q{UNGEGN approved local capital name.},
|
|
48
|
+
un_en_capital: %Q{United Nations terms English capital name.},
|
|
49
|
+
un_fr_capital: %Q{United Nations terms French capital name.},
|
|
50
|
+
un_es_capital: %Q{United Nations terms Spanish capital name.},
|
|
51
|
+
un_eu_capital: %Q{United Nations terms Russian cyrillic capital name.},
|
|
52
|
+
eki_capital: %Q{EKI Estonian capital name.},
|
|
53
|
+
bgn_c_latitude: %Q{BGN centroid decimal latitude coordinate of the capital city.},
|
|
54
|
+
bgn_c_longitude: %Q{BGN centroid decimal longitude coordinate of the capital city.},
|
|
55
|
+
ungegn_c_latitude: %Q{UNGEGN centroid decimal latitude coordinate of the capital city.},
|
|
56
|
+
ungegn_c_longitude: %Q{UNGEGN centroid decimal longitude coordinate of the capital city.},
|
|
57
|
+
continent: %Q{Geographic continental 2-letter code.},
|
|
58
|
+
subcontinent: %Q{Geopolitical sub-continental 2-letter code.},
|
|
59
|
+
iso_3166_region: %Q{ISO 3166-1 region (continental) code.},
|
|
60
|
+
iso_3166_subregion: %Q{ISO 3166-1 subregion (sub-continental) code.},
|
|
61
|
+
language: %Q{The ISO 639-1 alpha-2, or ISO 639-2 alpha-3 or 639-3 alpha-3 language codes of the official languages of the country (comma separated list).\n\nEx. en,fr,es for English, French and Spanish},
|
|
62
|
+
population: %Q{estimated population.},
|
|
63
|
+
year: %Q{population statistical year.},
|
|
64
|
+
bgn_demonym: %Q{BGN English noun form for nationality (denonym).},
|
|
65
|
+
bgn_demonym_adj: %Q{BGN English adjective form for nationality (denonym).},
|
|
66
|
+
itu: %Q{ITU international dialing code.},
|
|
67
|
+
ivc: %Q{UN international vehicle code sign.},
|
|
68
|
+
land_area: %Q{total land area in square kilometers of the country.},
|
|
69
|
+
water_area: %Q{total water mass in square kilometers of the country.},
|
|
70
|
+
land_mass: %Q{total land mass (land and water) in square kilometers of the country.},
|
|
71
|
+
latitude: %Q{average decimal latitude coordinate of the country.},
|
|
72
|
+
longitude: %Q{average decimal longitude coordinate of the country.},
|
|
73
|
+
max_latitude: %Q{maximum decimal latitude coordinate of the country.},
|
|
74
|
+
max_latitude: %Q{minimum decimal latitude coordinate of the country.},
|
|
75
|
+
max_longitude: %Q{maximum decimal latitude coordinate of the country.},
|
|
76
|
+
max_longitude: %Q{minimum decimal latitude coordinate of the country.},
|
|
77
|
+
url_gov: %Q{web Site for the country's government portal.},
|
|
78
|
+
url_stats: %Q{web Site for the country's national statistics (census).},
|
|
79
|
+
url_gis: %Q{web Site for the country's national geographic information system.},
|
|
80
|
+
url_post: %Q{web Site for the country's national postal service.},
|
|
81
|
+
}
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
metadata
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: worldwise
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Daniel Jonasson
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rails
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 3.1.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 3.1.0
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: globalize3
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 0.3.0
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 0.3.0
|
|
41
|
+
description: |-
|
|
42
|
+
Worldwise is a Rails gem that provides your application
|
|
43
|
+
with a series of ActiveRecord models representing various aspects of our
|
|
44
|
+
world, such as geographic/political divisions, languages, currencies and
|
|
45
|
+
more. Globalize3 is used to provide translations for each model. More
|
|
46
|
+
information can be found at: https://github.com/djonasson/worldwise
|
|
47
|
+
email:
|
|
48
|
+
- daniel@guadeo.com
|
|
49
|
+
executables: []
|
|
50
|
+
extensions: []
|
|
51
|
+
extra_rdoc_files: []
|
|
52
|
+
files:
|
|
53
|
+
- app/models/continent.rb
|
|
54
|
+
- app/models/neighborship.rb
|
|
55
|
+
- app/models/continent_model.rb
|
|
56
|
+
- app/models/country.rb
|
|
57
|
+
- app/controllers/worldwise/application_controller.rb
|
|
58
|
+
- app/assets/javascripts/application.js
|
|
59
|
+
- app/assets/stylesheets/application.css
|
|
60
|
+
- app/views/layouts/worldwise/application.html.erb
|
|
61
|
+
- app/helpers/application_helper.rb
|
|
62
|
+
- config/routes.rb
|
|
63
|
+
- db/data/countries.yml
|
|
64
|
+
- db/data/continent_models.yml
|
|
65
|
+
- db/data/continents.yml
|
|
66
|
+
- db/migrate/20130127164054_create_countries.rb
|
|
67
|
+
- db/migrate/20130201161328_create_neighborships.rb
|
|
68
|
+
- db/migrate/20130126102624_create_continents.rb
|
|
69
|
+
- db/migrate/20130126102623_create_continent_models.rb
|
|
70
|
+
- lib/worldwise.rb
|
|
71
|
+
- lib/worldwise/active_record.rb
|
|
72
|
+
- lib/worldwise/active_record/worldwise.rb
|
|
73
|
+
- lib/worldwise/active_record/acts_as_neighbor.rb
|
|
74
|
+
- lib/worldwise/active_record/class_methods.rb
|
|
75
|
+
- lib/worldwise/metadata/country.rb
|
|
76
|
+
- lib/worldwise/engine.rb
|
|
77
|
+
- lib/worldwise/version.rb
|
|
78
|
+
- lib/worldwise/metadata.rb
|
|
79
|
+
- lib/tasks/worldwise_tasks.rake
|
|
80
|
+
- lib/tasks/testing_tasks.rake
|
|
81
|
+
- MIT-LICENSE
|
|
82
|
+
- Rakefile
|
|
83
|
+
- README.rdoc
|
|
84
|
+
homepage: https://github.com/djonasson/worldwise
|
|
85
|
+
licenses: []
|
|
86
|
+
metadata: {}
|
|
87
|
+
post_install_message:
|
|
88
|
+
rdoc_options: []
|
|
89
|
+
require_paths:
|
|
90
|
+
- lib
|
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
- - ">="
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: '0'
|
|
101
|
+
requirements: []
|
|
102
|
+
rubyforge_project:
|
|
103
|
+
rubygems_version: 2.0.0.preview3.1
|
|
104
|
+
signing_key:
|
|
105
|
+
specification_version: 4
|
|
106
|
+
summary: Worldwise knows things. About continents. About countries. About regions.
|
|
107
|
+
About languages. About locales. About currencies. About you. Well... maybe not about
|
|
108
|
+
you, but still pretty impressive, huh?
|
|
109
|
+
test_files: []
|