worldlite 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +565 -4
- data/Rakefile +1 -2
- data/lib/worldlite.rb +1 -0
- data/lib/worldlite/africa/ao_angola.rb +14 -9
- data/lib/worldlite/africa/bf_burkina_faso.rb +14 -9
- data/lib/worldlite/africa/bi_burundi.rb +14 -9
- data/lib/worldlite/africa/bj_benin.rb +14 -9
- data/lib/worldlite/africa/bw_botswana.rb +15 -9
- data/lib/worldlite/africa/cd_congo_dr.rb +14 -9
- data/lib/worldlite/africa/cf_central_african_republic.rb +14 -9
- data/lib/worldlite/africa/cg_congo.rb +14 -9
- data/lib/worldlite/africa/ci_cote_divoire.rb +14 -9
- data/lib/worldlite/africa/cm_cameroon.rb +15 -9
- data/lib/worldlite/africa/cv_cape_verde.rb +14 -9
- data/lib/worldlite/africa/dj_djibouti.rb +14 -9
- data/lib/worldlite/africa/dz_algeria.rb +14 -9
- data/lib/worldlite/africa/eg_egypt.rb +14 -9
- data/lib/worldlite/africa/er_eritrea.rb +14 -9
- data/lib/worldlite/africa/et_ethiopia.rb +14 -9
- data/lib/worldlite/africa/ga_gabon.rb +14 -9
- data/lib/worldlite/africa/gh_ghana.rb +15 -9
- data/lib/worldlite/africa/gm_gambia.rb +15 -9
- data/lib/worldlite/africa/gn_guinea.rb +14 -9
- data/lib/worldlite/africa/gq_equatorial_guinea.rb +14 -9
- data/lib/worldlite/africa/gw_guinea_bissau.rb +14 -9
- data/lib/worldlite/africa/ke_kenya.rb +15 -9
- data/lib/worldlite/africa/km_comoros.rb +14 -9
- data/lib/worldlite/africa/lr_liberia.rb +14 -9
- data/lib/worldlite/africa/ls_lesotho.rb +15 -9
- data/lib/worldlite/africa/ly_libya.rb +14 -9
- data/lib/worldlite/africa/ma_morocco.rb +14 -9
- data/lib/worldlite/africa/mg_madagascar.rb +14 -9
- data/lib/worldlite/africa/ml_mali.rb +14 -9
- data/lib/worldlite/africa/mr_mauritania.rb +14 -9
- data/lib/worldlite/africa/mu_mauritius.rb +15 -9
- data/lib/worldlite/africa/mw_malawi.rb +15 -9
- data/lib/worldlite/africa/mz_mozambique.rb +15 -9
- data/lib/worldlite/africa/na_namibia.rb +15 -9
- data/lib/worldlite/africa/ne_niger.rb +14 -9
- data/lib/worldlite/africa/ng_nigeria.rb +15 -9
- data/lib/worldlite/africa/re_reunion.rb +13 -10
- data/lib/worldlite/africa/rw_rwanda.rb +15 -9
- data/lib/worldlite/africa/sd_sudan.rb +14 -9
- data/lib/worldlite/africa/sl_sierra_leone.rb +15 -9
- data/lib/worldlite/africa/sn_senegal.rb +14 -9
- data/lib/worldlite/africa/so_somalia.rb +14 -9
- data/lib/worldlite/africa/ss_south_sudan.rb +14 -9
- data/lib/worldlite/africa/st_sao_tome_and_principe.rb +14 -9
- data/lib/worldlite/africa/sz_swaziland.rb +15 -9
- data/lib/worldlite/africa/td_chad.rb +14 -9
- data/lib/worldlite/africa/tg_togo.rb +14 -9
- data/lib/worldlite/africa/tn_tunisia.rb +14 -9
- data/lib/worldlite/africa/tz_tanzania.rb +15 -9
- data/lib/worldlite/africa/ug_uganda.rb +15 -9
- data/lib/worldlite/africa/yc_seychelles.rb +15 -9
- data/lib/worldlite/africa/yt_mayotte.rb +13 -10
- data/lib/worldlite/africa/za_south_africa.rb +16 -9
- data/lib/worldlite/africa/zm_zambia.rb +15 -9
- data/lib/worldlite/africa/zw_zimbabwe.rb +14 -9
- data/lib/worldlite/asia/af_afghanistan.rb +14 -9
- data/lib/worldlite/asia/bd_bangladesh.rb +15 -9
- data/lib/worldlite/asia/bn_brunei.rb +15 -9
- data/lib/worldlite/asia/bt_bhutan.rb +14 -9
- data/lib/worldlite/asia/cc_cocos_keeling_islands.rb +13 -10
- data/lib/worldlite/asia/cn_china.rb +13 -9
- data/lib/worldlite/asia/cx_christmas_island.rb +13 -10
- data/lib/worldlite/asia/hk_hong_kong.rb +13 -9
- data/lib/worldlite/asia/id_indonesia.rb +13 -9
- data/lib/worldlite/asia/in_india.rb +16 -9
- data/lib/worldlite/asia/io_british_indian_ocean_territory.rb +13 -10
- data/lib/worldlite/asia/jp_japan.rb +13 -9
- data/lib/worldlite/asia/kg_kyrgyzstan.rb +14 -9
- data/lib/worldlite/asia/kh_cambodia.rb +14 -9
- data/lib/worldlite/asia/kp_north_korea.rb +14 -9
- data/lib/worldlite/asia/kr_south_korea.rb +13 -9
- data/lib/worldlite/asia/kz_kazakhstan.rb +14 -9
- data/lib/worldlite/asia/la_laos.rb +14 -9
- data/lib/worldlite/asia/lk_sri_lanka.rb +15 -9
- data/lib/worldlite/asia/mm_myanmar.rb +14 -9
- data/lib/worldlite/asia/mn_mongolia.rb +14 -9
- data/lib/worldlite/asia/mo_macau.rb +13 -10
- data/lib/worldlite/asia/mv_maldives.rb +15 -9
- data/lib/worldlite/asia/my_malaysia.rb +15 -9
- data/lib/worldlite/asia/np_nepal.rb +14 -9
- data/lib/worldlite/asia/ph_philippines.rb +14 -9
- data/lib/worldlite/asia/pk_pakistan.rb +15 -9
- data/lib/worldlite/asia/sg_singapore.rb +15 -9
- data/lib/worldlite/asia/th_thailand.rb +14 -9
- data/lib/worldlite/asia/tj_tajikistan.rb +14 -9
- data/lib/worldlite/asia/tl_timor_leste.rb +14 -9
- data/lib/worldlite/asia/tm_turkmenistan.rb +14 -9
- data/lib/worldlite/asia/tw_taiwan.rb +13 -9
- data/lib/worldlite/asia/uz_uzbekistan.rb +14 -9
- data/lib/worldlite/asia/vn_vietnam.rb +14 -9
- data/lib/worldlite/caribbean/ag_antigua_and_barbuda.rb +15 -9
- data/lib/worldlite/caribbean/ai_anguilla.rb +13 -10
- data/lib/worldlite/caribbean/aw_aruba.rb +13 -10
- data/lib/worldlite/caribbean/bb_barbados.rb +15 -9
- data/lib/worldlite/caribbean/bl_saint_barthelemy.rb +13 -10
- data/lib/worldlite/caribbean/bm_bermuda.rb +13 -10
- data/lib/worldlite/caribbean/bs_bahamas.rb +15 -9
- data/lib/worldlite/caribbean/cu_cuba.rb +14 -9
- data/lib/worldlite/caribbean/cw_curacao.rb +13 -10
- data/lib/worldlite/caribbean/dm_dominica.rb +15 -9
- data/lib/worldlite/caribbean/do_dominican_republic.rb +14 -9
- data/lib/worldlite/caribbean/gd_grenada.rb +15 -9
- data/lib/worldlite/caribbean/gp_guadeloupe.rb +13 -10
- data/lib/worldlite/caribbean/ht_haiti.rb +14 -9
- data/lib/worldlite/caribbean/jm_jamaica.rb +15 -9
- data/lib/worldlite/caribbean/kn_saint_kitts_and_nevis.rb +15 -9
- data/lib/worldlite/caribbean/ky_cayman_islands.rb +13 -10
- data/lib/worldlite/caribbean/lc_saint_lucia.rb +15 -9
- data/lib/worldlite/caribbean/mf_saint_martin_french.rb +13 -10
- data/lib/worldlite/caribbean/mq_martinique.rb +13 -10
- data/lib/worldlite/caribbean/ms_montserrat.rb +13 -10
- data/lib/worldlite/caribbean/pr_puerto_rico.rb +13 -9
- data/lib/worldlite/caribbean/tc_turks_and_caicos_islands.rb +13 -10
- data/lib/worldlite/caribbean/tt_trinidad_and_tobago.rb +15 -9
- data/lib/worldlite/caribbean/vc_saint_vincent_and_the_grenadines.rb +15 -9
- data/lib/worldlite/caribbean/vg_british_virgin_islands.rb +13 -10
- data/lib/worldlite/caribbean/vi_united_states_virgin_islands.rb +13 -10
- data/lib/worldlite/central_america/bz_belize.rb +15 -9
- data/lib/worldlite/central_america/cr_costa_rica.rb +14 -9
- data/lib/worldlite/central_america/gt_guatemala.rb +14 -9
- data/lib/worldlite/central_america/hn_honduras.rb +14 -9
- data/lib/worldlite/central_america/ni_nicaragua.rb +14 -9
- data/lib/worldlite/central_america/pa_panama.rb +14 -9
- data/lib/worldlite/central_america/sv_el_salvador.rb +14 -9
- data/lib/worldlite/country.rb +67 -10
- data/lib/worldlite/europe/ad_andorra.rb +15 -9
- data/lib/worldlite/europe/al_albania.rb +15 -9
- data/lib/worldlite/europe/am_armenia.rb +15 -9
- data/lib/worldlite/europe/at_austria.rb +17 -9
- data/lib/worldlite/europe/ax_aland_islands.rb +14 -10
- data/lib/worldlite/europe/az_azerbaijan.rb +15 -9
- data/lib/worldlite/europe/ba_bosnia_and_herzegovina.rb +15 -9
- data/lib/worldlite/europe/be_belgium.rb +17 -9
- data/lib/worldlite/europe/bg_bulgaria.rb +16 -9
- data/lib/worldlite/europe/by_belarus.rb +15 -9
- data/lib/worldlite/europe/ch_switzerland.rb +15 -9
- data/lib/worldlite/europe/cy_cyprus.rb +18 -9
- data/lib/worldlite/europe/cz_czech_republic.rb +16 -9
- data/lib/worldlite/europe/de_germany.rb +19 -9
- data/lib/worldlite/europe/dk_denmark.rb +16 -9
- data/lib/worldlite/europe/ee_estonia.rb +17 -9
- data/lib/worldlite/europe/en_england.rb +14 -9
- data/lib/worldlite/europe/es_spain.rb +17 -9
- data/lib/worldlite/europe/eu_european_union.rb +15 -10
- data/lib/worldlite/europe/fi_finland.rb +17 -9
- data/lib/worldlite/europe/fo_faroe_islands.rb +14 -9
- data/lib/worldlite/europe/fr_france.rb +19 -9
- data/lib/worldlite/europe/gb_great_britain.rb +20 -10
- data/lib/worldlite/europe/ge_georgia.rb +15 -9
- data/lib/worldlite/europe/gg_guernsey.rb +14 -10
- data/lib/worldlite/europe/gi_gibraltar.rb +14 -10
- data/lib/worldlite/europe/gr_greece.rb +17 -9
- data/lib/worldlite/europe/hr_croatia.rb +15 -9
- data/lib/worldlite/europe/hu_hungary.rb +16 -9
- data/lib/worldlite/europe/ie_irland.rb +17 -9
- data/lib/worldlite/europe/im_isle_of_man.rb +14 -10
- data/lib/worldlite/europe/is_iceland.rb +15 -9
- data/lib/worldlite/europe/it_italy.rb +19 -9
- data/lib/worldlite/europe/je_jersey.rb +14 -10
- data/lib/worldlite/europe/li_liechtenstein.rb +15 -9
- data/lib/worldlite/europe/lt_lithuania.rb +16 -9
- data/lib/worldlite/europe/lu_luxembourg.rb +17 -9
- data/lib/worldlite/europe/lv_latvija.rb +16 -9
- data/lib/worldlite/europe/mc_monaco.rb +16 -10
- data/lib/worldlite/europe/md_moldova.rb +15 -9
- data/lib/worldlite/europe/me_montenegro.rb +15 -9
- data/lib/worldlite/europe/mk_macedonia.rb +15 -9
- data/lib/worldlite/europe/mt_malta.rb +18 -9
- data/lib/worldlite/europe/nd_northern_ireland.rb +14 -9
- data/lib/worldlite/europe/nl_netherlands.rb +17 -9
- data/lib/worldlite/europe/no_norway.rb +15 -9
- data/lib/worldlite/europe/pl_poland.rb +16 -9
- data/lib/worldlite/europe/pt_portugal.rb +17 -9
- data/lib/worldlite/europe/ro_romania.rb +16 -9
- data/lib/worldlite/europe/rs_serbia.rb +15 -9
- data/lib/worldlite/europe/ru_russia.rb +14 -9
- data/lib/worldlite/europe/sc_scotland.rb +14 -9
- data/lib/worldlite/europe/se_sweden.rb +16 -9
- data/lib/worldlite/europe/si_slovenia.rb +17 -9
- data/lib/worldlite/europe/sk_slovakia.rb +17 -9
- data/lib/worldlite/europe/sm_san_marino.rb +15 -9
- data/lib/worldlite/europe/tr_turkey.rb +14 -9
- data/lib/worldlite/europe/ua_ukraine.rb +15 -9
- data/lib/worldlite/europe/va_vatican_city.rb +15 -10
- data/lib/worldlite/europe/wa_wales.rb +14 -9
- data/lib/worldlite/middle_east/ae_united_arab_emirates.rb +14 -9
- data/lib/worldlite/middle_east/bh_bahrain.rb +14 -9
- data/lib/worldlite/middle_east/il_israel.rb +14 -9
- data/lib/worldlite/middle_east/iq_iraq.rb +14 -9
- data/lib/worldlite/middle_east/ir_iran.rb +14 -9
- data/lib/worldlite/middle_east/jo_jordan.rb +14 -9
- data/lib/worldlite/middle_east/kw_kuwait.rb +14 -9
- data/lib/worldlite/middle_east/lb_lebanon.rb +14 -9
- data/lib/worldlite/middle_east/om_oman.rb +14 -9
- data/lib/worldlite/middle_east/ps_palestine.rb +13 -9
- data/lib/worldlite/middle_east/qa_qatar.rb +14 -9
- data/lib/worldlite/middle_east/sa_saudi_arabia.rb +13 -9
- data/lib/worldlite/middle_east/sy_syria.rb +14 -9
- data/lib/worldlite/middle_east/ye_yemen.rb +14 -9
- data/lib/worldlite/north_america/ca_canada.rb +17 -9
- data/lib/worldlite/north_america/gl_greenland.rb +13 -10
- data/lib/worldlite/north_america/mx_mexico.rb +13 -9
- data/lib/worldlite/north_america/pm_saint_pierre_and_miquelon.rb +13 -10
- data/lib/worldlite/north_america/us_united_states.rb +13 -9
- data/lib/worldlite/pacific/as_american_samoa.rb +13 -10
- data/lib/worldlite/pacific/au_australia.rb +16 -9
- data/lib/worldlite/pacific/ck_cook_islands.rb +13 -10
- data/lib/worldlite/pacific/fj_fiji.rb +15 -9
- data/lib/worldlite/pacific/fm_micronesia.rb +15 -10
- data/lib/worldlite/pacific/gu_guam.rb +13 -10
- data/lib/worldlite/pacific/ki_kiribati.rb +16 -10
- data/lib/worldlite/pacific/mh_marshall_islands.rb +15 -10
- data/lib/worldlite/pacific/mp_northern_mariana_islands.rb +13 -10
- data/lib/worldlite/pacific/nc_new_caledonia.rb +13 -10
- data/lib/worldlite/pacific/nf_norfolk_island.rb +13 -10
- data/lib/worldlite/pacific/nr_nauru.rb +16 -10
- data/lib/worldlite/pacific/nu_niue.rb +13 -10
- data/lib/worldlite/pacific/nz_new_zealand.rb +15 -9
- data/lib/worldlite/pacific/pf_tahiti.rb +13 -10
- data/lib/worldlite/pacific/pg_papua_new_guinea.rb +15 -9
- data/lib/worldlite/pacific/pn_pitcairn_islands.rb +13 -10
- data/lib/worldlite/pacific/pw_palau.rb +15 -10
- data/lib/worldlite/pacific/sb_solomon_islands.rb +15 -9
- data/lib/worldlite/pacific/tk_tokelau.rb +13 -10
- data/lib/worldlite/pacific/to_tonga.rb +15 -9
- data/lib/worldlite/pacific/tv_tuvalu.rb +16 -10
- data/lib/worldlite/pacific/vu_vanuatu.rb +15 -9
- data/lib/worldlite/pacific/wf_wallis_and_futuna.rb +13 -10
- data/lib/worldlite/pacific/ws_samoa.rb +15 -9
- data/lib/worldlite/south_america/ar_argentina.rb +15 -9
- data/lib/worldlite/south_america/bo_bolivia.rb +14 -9
- data/lib/worldlite/south_america/br_brazil.rb +15 -9
- data/lib/worldlite/south_america/cl_chile.rb +14 -9
- data/lib/worldlite/south_america/co_colombia.rb +14 -9
- data/lib/worldlite/south_america/ec_ecuador.rb +14 -9
- data/lib/worldlite/south_america/fk_falkland_islands.rb +13 -10
- data/lib/worldlite/south_america/gf_french_guiana.rb +13 -10
- data/lib/worldlite/south_america/gs_south_georgia_and_south_sandwich.rb +13 -10
- data/lib/worldlite/south_america/gy_guyana.rb +15 -9
- data/lib/worldlite/south_america/pe_peru.rb +14 -9
- data/lib/worldlite/south_america/py_paraguay.rb +14 -9
- data/lib/worldlite/south_america/sh_saint_helena.rb +13 -10
- data/lib/worldlite/south_america/sr_suriname.rb +14 -9
- data/lib/worldlite/south_america/uy_uruguay.rb +14 -9
- data/lib/worldlite/south_america/ve_venezuela.rb +14 -9
- data/lib/worldlite/version.rb +1 -1
- data/test/helper.rb +1 -1
- data/test/test_world.rb +23 -1
- metadata +10 -10
@@ -3,25 +3,28 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'British Virgin Islands'
|
7
7
|
c.key = 'vg'
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
c.fifa = ''
|
12
|
-
# c.ioc = '???'
|
8
|
+
c.alpha3 = 'VGB'
|
9
|
+
c.fifa = nil
|
10
|
+
c.net = 'vg'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Caribbean'
|
15
|
+
|
16
|
+
c.un = false
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# British Virgin Islands / Caribbean
|
21
|
+
# tags: caribbean, territory
|
16
22
|
VG = c
|
17
23
|
|
18
24
|
WORLD << VG
|
25
|
+
WORLD_ISO << VG
|
19
26
|
|
20
27
|
|
21
28
|
|
22
29
|
|
23
30
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,28 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'United States Virgin Islands'
|
7
7
|
c.key = 'vi'
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
c.fifa = ''
|
12
|
-
# c.ioc = '???'
|
8
|
+
c.alpha3 = 'VIR'
|
9
|
+
c.fifa = nil
|
10
|
+
c.net = 'vi'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Caribbean'
|
15
|
+
|
16
|
+
c.un = false
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# United States Virgin Islands / Caribbean
|
21
|
+
# tags: caribbean, territory
|
16
22
|
VI = c
|
17
23
|
|
18
24
|
WORLD << VI
|
25
|
+
WORLD_ISO << VI
|
19
26
|
|
20
27
|
|
21
28
|
|
22
29
|
|
23
30
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,31 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'Belize'
|
7
7
|
c.key = 'bz'
|
8
|
-
|
9
|
-
# c.alpha2 = '??'
|
10
|
-
# c.alpha3 = '???'
|
8
|
+
c.alpha3 = 'BLZ'
|
11
9
|
c.fifa = 'BLZ'
|
12
|
-
|
10
|
+
c.net = 'bz'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Central America'
|
15
|
+
|
16
|
+
c.un = true
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# Belize / Central America
|
21
|
+
# tags: central america, un, commonwealth, fifa, concacaf, concacaf uncaf
|
16
22
|
BZ = c
|
17
23
|
|
18
24
|
WORLD << BZ
|
25
|
+
WORLD_UN << BZ
|
26
|
+
WORLD_ISO << BZ
|
27
|
+
WORLD_FIFA << BZ
|
28
|
+
WORLD_COMMONWEALTH << BZ
|
19
29
|
|
20
30
|
|
21
31
|
|
22
32
|
|
23
33
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,30 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'Costa Rica'
|
7
7
|
c.key = 'cr'
|
8
|
-
|
9
|
-
# c.alpha2 = '??'
|
10
|
-
# c.alpha3 = '???'
|
8
|
+
c.alpha3 = 'CRI'
|
11
9
|
c.fifa = 'CRC'
|
12
|
-
|
10
|
+
c.net = 'cr'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Central America'
|
15
|
+
|
16
|
+
c.un = true
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# Costa Rica / Central America
|
21
|
+
# tags: central america, un, fifa, concacaf, concacaf uncaf
|
16
22
|
CR = c
|
17
23
|
|
18
24
|
WORLD << CR
|
25
|
+
WORLD_UN << CR
|
26
|
+
WORLD_ISO << CR
|
27
|
+
WORLD_FIFA << CR
|
19
28
|
|
20
29
|
|
21
30
|
|
22
31
|
|
23
32
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,30 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'Guatemala'
|
7
7
|
c.key = 'gt'
|
8
|
-
|
9
|
-
# c.alpha2 = '??'
|
10
|
-
# c.alpha3 = '???'
|
8
|
+
c.alpha3 = 'GTM'
|
11
9
|
c.fifa = 'GUA'
|
12
|
-
|
10
|
+
c.net = 'gt'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Central America'
|
15
|
+
|
16
|
+
c.un = true
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# Guatemala / Central America
|
21
|
+
# tags: central america, un, fifa, concacaf, concacaf uncaf
|
16
22
|
GT = c
|
17
23
|
|
18
24
|
WORLD << GT
|
25
|
+
WORLD_UN << GT
|
26
|
+
WORLD_ISO << GT
|
27
|
+
WORLD_FIFA << GT
|
19
28
|
|
20
29
|
|
21
30
|
|
22
31
|
|
23
32
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,30 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'Honduras'
|
7
7
|
c.key = 'hn'
|
8
|
-
|
9
|
-
# c.alpha2 = '??'
|
10
|
-
# c.alpha3 = '???'
|
8
|
+
c.alpha3 = 'HND'
|
11
9
|
c.fifa = 'HON'
|
12
|
-
|
10
|
+
c.net = 'hn'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Central America'
|
15
|
+
|
16
|
+
c.un = true
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# Honduras / Central America
|
21
|
+
# tags: central america, un, fifa, concacaf, concacaf uncaf
|
16
22
|
HN = c
|
17
23
|
|
18
24
|
WORLD << HN
|
25
|
+
WORLD_UN << HN
|
26
|
+
WORLD_ISO << HN
|
27
|
+
WORLD_FIFA << HN
|
19
28
|
|
20
29
|
|
21
30
|
|
22
31
|
|
23
32
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,30 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'Nicaragua'
|
7
7
|
c.key = 'ni'
|
8
|
-
|
9
|
-
# c.alpha2 = '??'
|
10
|
-
# c.alpha3 = '???'
|
8
|
+
c.alpha3 = 'NIC'
|
11
9
|
c.fifa = 'NCA'
|
12
|
-
|
10
|
+
c.net = 'ni'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Central America'
|
15
|
+
|
16
|
+
c.un = true
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# Nicaragua / Central America
|
21
|
+
# tags: central america, un, fifa, concacaf, concacaf uncaf
|
16
22
|
NI = c
|
17
23
|
|
18
24
|
WORLD << NI
|
25
|
+
WORLD_UN << NI
|
26
|
+
WORLD_ISO << NI
|
27
|
+
WORLD_FIFA << NI
|
19
28
|
|
20
29
|
|
21
30
|
|
22
31
|
|
23
32
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,30 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'Panamá'
|
7
7
|
c.key = 'pa'
|
8
|
-
|
9
|
-
# c.alpha2 = '??'
|
10
|
-
# c.alpha3 = '???'
|
8
|
+
c.alpha3 = 'PAN'
|
11
9
|
c.fifa = 'PAN'
|
12
|
-
|
10
|
+
c.net = 'pa'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Central America'
|
15
|
+
|
16
|
+
c.un = true
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# Panamá [Panama] / Central America
|
21
|
+
# tags: central america, un, fifa, concacaf, concacaf uncaf
|
16
22
|
PA = c
|
17
23
|
|
18
24
|
WORLD << PA
|
25
|
+
WORLD_UN << PA
|
26
|
+
WORLD_ISO << PA
|
27
|
+
WORLD_FIFA << PA
|
19
28
|
|
20
29
|
|
21
30
|
|
22
31
|
|
23
32
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
@@ -3,25 +3,30 @@
|
|
3
3
|
module WorldLite
|
4
4
|
|
5
5
|
c = Country.new
|
6
|
-
c.name =
|
6
|
+
c.name = 'El Salvador'
|
7
7
|
c.key = 'sv'
|
8
|
-
|
9
|
-
# c.alpha2 = '??'
|
10
|
-
# c.alpha3 = '???'
|
8
|
+
c.alpha3 = 'SLV'
|
11
9
|
c.fifa = 'SLV'
|
12
|
-
|
10
|
+
c.net = 'sv'
|
13
11
|
|
14
12
|
|
15
13
|
|
14
|
+
c.continent_name = 'Central America'
|
15
|
+
|
16
|
+
c.un = true
|
17
|
+
c.eu = false
|
18
|
+
c.euro = false
|
19
|
+
|
20
|
+
# El Salvador / Central America
|
21
|
+
# tags: central america, un, fifa, concacaf, concacaf uncaf
|
16
22
|
SV = c
|
17
23
|
|
18
24
|
WORLD << SV
|
25
|
+
WORLD_UN << SV
|
26
|
+
WORLD_ISO << SV
|
27
|
+
WORLD_FIFA << SV
|
19
28
|
|
20
29
|
|
21
30
|
|
22
31
|
|
23
32
|
end # module WorldLite
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
data/lib/worldlite/country.rb
CHANGED
@@ -7,27 +7,77 @@ WORLD = [] ## ary holds all countries; same as Country.all
|
|
7
7
|
WORLD_UN = [] ## ary holds 193 un (united nations) countries
|
8
8
|
WORLD_ISO = [] ## ary holds 2?? iso countries
|
9
9
|
WORLD_FIFA = [] ## ary hold 2?? fifa countries
|
10
|
+
WORLD_G8 = []
|
11
|
+
WORLD_G20 = []
|
12
|
+
WORLD_COMMONWEALTH = []
|
10
13
|
|
11
|
-
EUROPE
|
12
|
-
|
13
|
-
|
14
|
-
|
14
|
+
EUROPE = [] ## ary holds un countries (from europe)
|
15
|
+
EUROPE_EU = [] ## ary holds european union countries (from europe)
|
16
|
+
EUROPE_EURO = [] ## ary holds european euro countries (from europe)
|
17
|
+
## EUROPE_SCHENGEN = []
|
18
|
+
## EUROPE_UEFA = [] ## ary holds 54 uefa countries -- note: includes isreal n kazachstan (from asia)
|
15
19
|
|
16
20
|
|
17
21
|
class Country
|
18
22
|
|
19
23
|
attr_accessor :name, # country name e.g. Austria
|
20
24
|
:key, # key (iso alpha2 if available - otherwise alpha3)
|
21
|
-
|
22
|
-
|
25
|
+
## :num, # iso numeric code e.g. 41 (as number/int) note: use num3 for number as string w/ leading 0 e.g. 041
|
26
|
+
## :num3, # iso numeric code as string (e.g. '041')
|
27
|
+
## :alpha2, # iso alpha2 code e.g. AT
|
23
28
|
:alpha3, # iso alpha3 code e.g. AUT
|
24
29
|
:fifa, # fifa (football) code
|
25
|
-
|
30
|
+
## :ioc, # ioc (olympics) code
|
31
|
+
:net, # internet top level domain (tld) e.g. at
|
32
|
+
:continent_name, # continent.name -
|
33
|
+
:kind, # CTRY|DEPY|SUPR (country|dependency|supranational) - add other?
|
26
34
|
:un, # un (united nations) flag member (true|false)
|
27
|
-
:
|
35
|
+
:eu, # european union flag member (true|false)
|
36
|
+
:euro # euro (currency) flag member (true|false)
|
37
|
+
## :schengen, # flag
|
38
|
+
## :commonwealth # flag
|
28
39
|
|
29
|
-
|
40
|
+
def un?() @un end # boolean convenience methods
|
41
|
+
def eu?() @eu end
|
42
|
+
def euro?() @euro end
|
43
|
+
|
44
|
+
def iso?
|
45
|
+
# note: for now assumes if no iso code it's not an iso listed country
|
46
|
+
@alpha3.nil? ? false : true
|
47
|
+
end
|
30
48
|
|
49
|
+
def fifa?
|
50
|
+
# note: for now assumes if no fifa code it's not a fifa member country
|
51
|
+
@fifa.nil? ? false : true
|
52
|
+
end
|
53
|
+
|
54
|
+
def slug
|
55
|
+
slugify(name)
|
56
|
+
end
|
57
|
+
|
58
|
+
def to_path( opts={} )
|
59
|
+
## e.g. europe/at-austria
|
60
|
+
"#{slugify(continent_name)}/#{key}-#{slugify(name)}"
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
def wikpedia_url
|
65
|
+
"http://en.wikipedia.org/wiki/#{wikpedia}"
|
66
|
+
end
|
67
|
+
|
68
|
+
def wikidata_url
|
69
|
+
"http://www.wikidata.org/wiki/Q#{wikidata}"
|
70
|
+
end
|
71
|
+
|
72
|
+
def factbook_url
|
73
|
+
"http://www.cia.gov/library/publications/the-world-factbook/geos/#{factbook}.html"
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
def inspect
|
78
|
+
## note: for now use a shorter pretty print (pp) format
|
79
|
+
"<#Country name=|#{name}|, key=|#{key}|, to_path=|#{to_path}|>"
|
80
|
+
end
|
31
81
|
|
32
82
|
def initialize
|
33
83
|
@kind = 'CTRY' # default to 'sovereign' country - why? why not?
|
@@ -39,8 +89,15 @@ class Country
|
|
39
89
|
WORLD
|
40
90
|
end
|
41
91
|
|
42
|
-
|
92
|
+
private
|
93
|
+
def slugify( txt )
|
94
|
+
## e.g. Austria -> austria
|
95
|
+
txt = txt.downcase
|
96
|
+
txt = txt.gsub( /[']/, '' ) ## remove some special chars -- todo/fix: add more special chars plus asciify
|
97
|
+
txt = txt.gsub( ' ', '-' )
|
98
|
+
end
|
43
99
|
|
100
|
+
end # class Country
|
44
101
|
|
45
102
|
|
46
103
|
end # module WorldLite
|