carmen 0.2.13 → 1.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -0
- data/MIT-LICENSE +15 -2
- data/README.md +176 -0
- data/iso_data/world.yml +997 -0
- data/iso_data/world/ad.yml +15 -0
- data/iso_data/world/ae.yml +15 -0
- data/iso_data/world/af.yml +69 -0
- data/iso_data/world/ag.yml +17 -0
- data/iso_data/world/al.yml +25 -0
- data/iso_data/world/al/01.yml +7 -0
- data/iso_data/world/al/02.yml +5 -0
- data/iso_data/world/al/03.yml +9 -0
- data/iso_data/world/al/04.yml +7 -0
- data/iso_data/world/al/05.yml +7 -0
- data/iso_data/world/al/06.yml +9 -0
- data/iso_data/world/al/07.yml +7 -0
- data/iso_data/world/al/08.yml +7 -0
- data/iso_data/world/al/09.yml +7 -0
- data/iso_data/world/al/10.yml +7 -0
- data/iso_data/world/al/11.yml +5 -0
- data/iso_data/world/al/12.yml +7 -0
- data/iso_data/world/am.yml +23 -0
- data/iso_data/world/ao.yml +37 -0
- data/iso_data/world/ar.yml +47 -0
- data/iso_data/world/at.yml +19 -0
- data/iso_data/world/au.yml +17 -0
- data/iso_data/world/az.yml +143 -0
- data/iso_data/world/az/nx.yml +13 -0
- data/iso_data/world/ba.yml +7 -0
- data/iso_data/world/ba/bih.yml +21 -0
- data/iso_data/world/bb.yml +23 -0
- data/iso_data/world/bd.yml +13 -0
- data/iso_data/world/bd/1.yml +13 -0
- data/iso_data/world/bd/2.yml +23 -0
- data/iso_data/world/bd/3.yml +35 -0
- data/iso_data/world/bd/4.yml +21 -0
- data/iso_data/world/bd/5.yml +33 -0
- data/iso_data/world/bd/6.yml +9 -0
- data/iso_data/world/be.yml +23 -0
- data/iso_data/world/bf.yml +27 -0
- data/iso_data/world/bf/01.yml +13 -0
- data/iso_data/world/bf/02.yml +5 -0
- data/iso_data/world/bf/03.yml +3 -0
- data/iso_data/world/bf/04.yml +7 -0
- data/iso_data/world/bf/05.yml +7 -0
- data/iso_data/world/bf/06.yml +9 -0
- data/iso_data/world/bf/07.yml +7 -0
- data/iso_data/world/bf/08.yml +11 -0
- data/iso_data/world/bf/09.yml +7 -0
- data/iso_data/world/bf/10.yml +9 -0
- data/iso_data/world/bf/11.yml +7 -0
- data/iso_data/world/bf/12.yml +9 -0
- data/iso_data/world/bf/13.yml +9 -0
- data/iso_data/world/bg.yml +57 -0
- data/iso_data/world/bh.yml +11 -0
- data/iso_data/world/bi.yml +33 -0
- data/iso_data/world/bj.yml +25 -0
- data/iso_data/world/bl.yml +1 -0
- data/iso_data/world/bn.yml +9 -0
- data/iso_data/world/bo.yml +19 -0
- data/iso_data/world/br.yml +57 -0
- data/iso_data/world/bs.yml +65 -0
- data/iso_data/world/bt.yml +41 -0
- data/iso_data/world/bw.yml +21 -0
- data/iso_data/world/by.yml +15 -0
- data/iso_data/world/bz.yml +13 -0
- data/iso_data/world/ca.yml +27 -0
- data/iso_data/world/cd.yml +25 -0
- data/iso_data/world/cf.yml +35 -0
- data/iso_data/world/cg.yml +23 -0
- data/iso_data/world/ch.yml +53 -0
- data/iso_data/world/ci.yml +39 -0
- data/iso_data/world/cl.yml +31 -0
- data/iso_data/world/cm.yml +21 -0
- data/iso_data/world/cn.yml +69 -0
- data/iso_data/world/co.yml +67 -0
- data/iso_data/world/cr.yml +15 -0
- data/iso_data/world/cu.yml +31 -0
- data/iso_data/world/cv.yml +5 -0
- data/iso_data/world/cv/b.yml +15 -0
- data/iso_data/world/cv/s.yml +31 -0
- data/iso_data/world/cy.yml +13 -0
- data/iso_data/world/cz.yml +29 -0
- data/iso_data/world/cz/jc.yml +15 -0
- data/iso_data/world/cz/jm.yml +15 -0
- data/iso_data/world/cz/ka.yml +7 -0
- data/iso_data/world/cz/kr.yml +11 -0
- data/iso_data/world/cz/li.yml +9 -0
- data/iso_data/world/cz/mo.yml +13 -0
- data/iso_data/world/cz/ol.yml +11 -0
- data/iso_data/world/cz/pa.yml +9 -0
- data/iso_data/world/cz/pl.yml +15 -0
- data/iso_data/world/cz/pr.yml +31 -0
- data/iso_data/world/cz/st.yml +25 -0
- data/iso_data/world/cz/us.yml +15 -0
- data/iso_data/world/cz/vy.yml +11 -0
- data/iso_data/world/cz/zl.yml +9 -0
- data/iso_data/world/de.yml +33 -0
- data/iso_data/world/dj.yml +13 -0
- data/iso_data/world/dk.yml +11 -0
- data/iso_data/world/dm.yml +21 -0
- data/iso_data/world/do.yml +61 -0
- data/iso_data/world/dz.yml +97 -0
- data/iso_data/world/ec.yml +49 -0
- data/iso_data/world/ee.yml +31 -0
- data/iso_data/world/eg.yml +57 -0
- data/iso_data/world/er.yml +13 -0
- data/iso_data/world/es.yml +39 -0
- data/iso_data/world/es/an.yml +17 -0
- data/iso_data/world/es/ar.yml +7 -0
- data/iso_data/world/es/as.yml +3 -0
- data/iso_data/world/es/cb.yml +3 -0
- data/iso_data/world/es/cl.yml +19 -0
- data/iso_data/world/es/cm.yml +11 -0
- data/iso_data/world/es/cn.yml +5 -0
- data/iso_data/world/es/ct.yml +9 -0
- data/iso_data/world/es/ex.yml +5 -0
- data/iso_data/world/es/ga.yml +9 -0
- data/iso_data/world/es/ib.yml +3 -0
- data/iso_data/world/es/mc.yml +3 -0
- data/iso_data/world/es/md.yml +3 -0
- data/iso_data/world/es/nc.yml +3 -0
- data/iso_data/world/es/pv.yml +7 -0
- data/iso_data/world/es/ri.yml +3 -0
- data/iso_data/world/es/vc.yml +7 -0
- data/iso_data/world/et.yml +23 -0
- data/iso_data/world/fi.yml +13 -0
- data/iso_data/world/fj.yml +11 -0
- data/iso_data/world/fm.yml +9 -0
- data/iso_data/world/fr.yml +71 -0
- data/iso_data/world/fr/a.yml +5 -0
- data/iso_data/world/fr/b.yml +11 -0
- data/iso_data/world/fr/c.yml +9 -0
- data/iso_data/world/fr/d.yml +9 -0
- data/iso_data/world/fr/e.yml +9 -0
- data/iso_data/world/fr/f.yml +13 -0
- data/iso_data/world/fr/g.yml +9 -0
- data/iso_data/world/fr/h.yml +5 -0
- data/iso_data/world/fr/i.yml +9 -0
- data/iso_data/world/fr/j.yml +17 -0
- data/iso_data/world/fr/k.yml +11 -0
- data/iso_data/world/fr/l.yml +7 -0
- data/iso_data/world/fr/m.yml +9 -0
- data/iso_data/world/fr/n.yml +17 -0
- data/iso_data/world/fr/o.yml +5 -0
- data/iso_data/world/fr/p.yml +7 -0
- data/iso_data/world/fr/q.yml +5 -0
- data/iso_data/world/fr/r.yml +11 -0
- data/iso_data/world/fr/s.yml +7 -0
- data/iso_data/world/fr/t.yml +9 -0
- data/iso_data/world/fr/u.yml +13 -0
- data/iso_data/world/fr/v.yml +17 -0
- data/iso_data/world/ga.yml +19 -0
- data/iso_data/world/gb.yml +475 -0
- data/iso_data/world/gd.yml +15 -0
- data/iso_data/world/ge.yml +25 -0
- data/iso_data/world/gg.yml +1 -0
- data/iso_data/world/gh.yml +21 -0
- data/iso_data/world/gl.yml +9 -0
- data/iso_data/world/gm.yml +13 -0
- data/iso_data/world/gn.yml +17 -0
- data/iso_data/world/gn/b.yml +11 -0
- data/iso_data/world/gn/d.yml +11 -0
- data/iso_data/world/gn/f.yml +9 -0
- data/iso_data/world/gn/k.yml +11 -0
- data/iso_data/world/gn/l.yml +11 -0
- data/iso_data/world/gn/m.yml +7 -0
- data/iso_data/world/gn/n.yml +13 -0
- data/iso_data/world/gq.yml +19 -0
- data/iso_data/world/gr.yml +29 -0
- data/iso_data/world/gr/a.yml +11 -0
- data/iso_data/world/gr/b.yml +15 -0
- data/iso_data/world/gr/c.yml +9 -0
- data/iso_data/world/gr/d.yml +7 -0
- data/iso_data/world/gr/e.yml +9 -0
- data/iso_data/world/gr/f.yml +11 -0
- data/iso_data/world/gr/g.yml +7 -0
- data/iso_data/world/gr/h.yml +11 -0
- data/iso_data/world/gr/i.yml +3 -0
- data/iso_data/world/gr/j.yml +11 -0
- data/iso_data/world/gr/k.yml +7 -0
- data/iso_data/world/gr/l.yml +5 -0
- data/iso_data/world/gr/m.yml +9 -0
- data/iso_data/world/gt.yml +45 -0
- data/iso_data/world/gw.yml +9 -0
- data/iso_data/world/gw/l.yml +5 -0
- data/iso_data/world/gw/n.yml +7 -0
- data/iso_data/world/gw/s.yml +7 -0
- data/iso_data/world/gy.yml +21 -0
- data/iso_data/world/hn.yml +37 -0
- data/iso_data/world/hr.yml +43 -0
- data/iso_data/world/ht.yml +19 -0
- data/iso_data/world/hu.yml +87 -0
- data/iso_data/world/id.yml +15 -0
- data/iso_data/world/id/ij.yml +5 -0
- data/iso_data/world/id/jw.yml +13 -0
- data/iso_data/world/id/ka.yml +9 -0
- data/iso_data/world/id/ma.yml +5 -0
- data/iso_data/world/id/nu.yml +7 -0
- data/iso_data/world/id/sl.yml +13 -0
- data/iso_data/world/id/sm.yml +21 -0
- data/iso_data/world/ie.yml +9 -0
- data/iso_data/world/ie/c.yml +11 -0
- data/iso_data/world/ie/l.yml +25 -0
- data/iso_data/world/ie/m.yml +13 -0
- data/iso_data/world/ie/u.yml +7 -0
- data/iso_data/world/il.yml +13 -0
- data/iso_data/world/im.yml +1 -0
- data/iso_data/world/in.yml +71 -0
- data/iso_data/world/iq.yml +37 -0
- data/iso_data/world/ir.yml +61 -0
- data/iso_data/world/is.yml +19 -0
- data/iso_data/world/it.yml +41 -0
- data/iso_data/world/it/21.yml +17 -0
- data/iso_data/world/it/23.yml +3 -0
- data/iso_data/world/it/25.yml +25 -0
- data/iso_data/world/it/32.yml +5 -0
- data/iso_data/world/it/34.yml +15 -0
- data/iso_data/world/it/36.yml +9 -0
- data/iso_data/world/it/42.yml +9 -0
- data/iso_data/world/it/45.yml +19 -0
- data/iso_data/world/it/52.yml +21 -0
- data/iso_data/world/it/55.yml +5 -0
- data/iso_data/world/it/57.yml +11 -0
- data/iso_data/world/it/62.yml +11 -0
- data/iso_data/world/it/65.yml +9 -0
- data/iso_data/world/it/67.yml +5 -0
- data/iso_data/world/it/72.yml +11 -0
- data/iso_data/world/it/75.yml +13 -0
- data/iso_data/world/it/77.yml +5 -0
- data/iso_data/world/it/78.yml +11 -0
- data/iso_data/world/it/82.yml +19 -0
- data/iso_data/world/it/88.yml +17 -0
- data/iso_data/world/je.yml +1 -0
- data/iso_data/world/jm.yml +29 -0
- data/iso_data/world/jo.yml +25 -0
- data/iso_data/world/jp.yml +95 -0
- data/iso_data/world/ke.yml +15 -0
- data/iso_data/world/kg.yml +17 -0
- data/iso_data/world/kh.yml +49 -0
- data/iso_data/world/ki.yml +7 -0
- data/iso_data/world/km.yml +7 -0
- data/iso_data/world/kn.yml +5 -0
- data/iso_data/world/kn/k.yml +19 -0
- data/iso_data/world/kn/n.yml +11 -0
- data/iso_data/world/kp.yml +23 -0
- data/iso_data/world/kr.yml +33 -0
- data/iso_data/world/kw.yml +11 -0
- data/iso_data/world/kz.yml +33 -0
- data/iso_data/world/la.yml +37 -0
- data/iso_data/world/lb.yml +17 -0
- data/iso_data/world/li.yml +23 -0
- data/iso_data/world/lk.yml +19 -0
- data/iso_data/world/lk/1.yml +7 -0
- data/iso_data/world/lk/2.yml +7 -0
- data/iso_data/world/lk/3.yml +7 -0
- data/iso_data/world/lk/4.yml +11 -0
- data/iso_data/world/lk/5.yml +7 -0
- data/iso_data/world/lk/6.yml +5 -0
- data/iso_data/world/lk/7.yml +5 -0
- data/iso_data/world/lk/8.yml +5 -0
- data/iso_data/world/lk/9.yml +5 -0
- data/iso_data/world/lr.yml +27 -0
- data/iso_data/world/ls.yml +21 -0
- data/iso_data/world/lt.yml +21 -0
- data/iso_data/world/lu.yml +7 -0
- data/iso_data/world/lv.yml +67 -0
- data/iso_data/world/ly.yml +47 -0
- data/iso_data/world/ma.yml +33 -0
- data/iso_data/world/ma/01.yml +11 -0
- data/iso_data/world/ma/02.yml +5 -0
- data/iso_data/world/ma/03.yml +7 -0
- data/iso_data/world/ma/04.yml +13 -0
- data/iso_data/world/ma/05.yml +9 -0
- data/iso_data/world/ma/06.yml +11 -0
- data/iso_data/world/ma/07.yml +9 -0
- data/iso_data/world/ma/08.yml +9 -0
- data/iso_data/world/ma/09.yml +7 -0
- data/iso_data/world/ma/10.yml +5 -0
- data/iso_data/world/ma/11.yml +15 -0
- data/iso_data/world/ma/12.yml +5 -0
- data/iso_data/world/ma/13.yml +15 -0
- data/iso_data/world/ma/14.yml +11 -0
- data/iso_data/world/ma/15.yml +5 -0
- data/iso_data/world/ma/16.yml +5 -0
- data/iso_data/world/md.yml +75 -0
- data/iso_data/world/me.yml +43 -0
- data/iso_data/world/mf.yml +1 -0
- data/iso_data/world/mg.yml +13 -0
- data/iso_data/world/mh.yml +5 -0
- data/iso_data/world/mh/l.yml +29 -0
- data/iso_data/world/mh/t.yml +21 -0
- data/iso_data/world/mk.yml +169 -0
- data/iso_data/world/ml.yml +19 -0
- data/iso_data/world/mm.yml +29 -0
- data/iso_data/world/mn.yml +45 -0
- data/iso_data/world/mo.yml +1 -0
- data/iso_data/world/mr.yml +27 -0
- data/iso_data/world/mt.yml +137 -0
- data/iso_data/world/mu.yml +35 -0
- data/iso_data/world/mv.yml +41 -0
- data/iso_data/world/mw.yml +7 -0
- data/iso_data/world/mw/c.yml +19 -0
- data/iso_data/world/mw/n.yml +15 -0
- data/iso_data/world/mw/s.yml +25 -0
- data/iso_data/world/mx.yml +65 -0
- data/iso_data/world/my.yml +33 -0
- data/iso_data/world/mz.yml +23 -0
- data/iso_data/world/na.yml +27 -0
- data/iso_data/world/ne.yml +17 -0
- data/iso_data/world/ng.yml +75 -0
- data/iso_data/world/ni.yml +35 -0
- data/iso_data/world/nl.yml +25 -0
- data/iso_data/world/no.yml +43 -0
- data/iso_data/world/np.yml +11 -0
- data/iso_data/world/np/1.yml +7 -0
- data/iso_data/world/np/2.yml +7 -0
- data/iso_data/world/np/3.yml +7 -0
- data/iso_data/world/np/4.yml +7 -0
- data/iso_data/world/np/5.yml +5 -0
- data/iso_data/world/nr.yml +29 -0
- data/iso_data/world/nz.yml +7 -0
- data/iso_data/world/nz/n.yml +19 -0
- data/iso_data/world/nz/s.yml +15 -0
- data/iso_data/world/om.yml +19 -0
- data/iso_data/world/pa.yml +25 -0
- data/iso_data/world/pe.yml +53 -0
- data/iso_data/world/pg.yml +41 -0
- data/iso_data/world/ph.yml +35 -0
- data/iso_data/world/ph/01.yml +9 -0
- data/iso_data/world/ph/02.yml +11 -0
- data/iso_data/world/ph/03.yml +15 -0
- data/iso_data/world/ph/05.yml +13 -0
- data/iso_data/world/ph/06.yml +13 -0
- data/iso_data/world/ph/07.yml +9 -0
- data/iso_data/world/ph/08.yml +13 -0
- data/iso_data/world/ph/09.yml +9 -0
- data/iso_data/world/ph/10.yml +9 -0
- data/iso_data/world/ph/11.yml +13 -0
- data/iso_data/world/ph/12.yml +7 -0
- data/iso_data/world/ph/13.yml +11 -0
- data/iso_data/world/ph/14.yml +9 -0
- data/iso_data/world/ph/15.yml +13 -0
- data/iso_data/world/ph/40.yml +11 -0
- data/iso_data/world/ph/41.yml +11 -0
- data/iso_data/world/pk.yml +17 -0
- data/iso_data/world/pl.yml +33 -0
- data/iso_data/world/ps.yml +1 -0
- data/iso_data/world/pt.yml +41 -0
- data/iso_data/world/pw.yml +33 -0
- data/iso_data/world/py.yml +37 -0
- data/iso_data/world/qa.yml +19 -0
- data/iso_data/world/ro.yml +85 -0
- data/iso_data/world/rs.yml +41 -0
- data/iso_data/world/rs/km.yml +11 -0
- data/iso_data/world/rs/vo.yml +15 -0
- data/iso_data/world/ru.yml +167 -0
- data/iso_data/world/rw.yml +11 -0
- data/iso_data/world/sa.yml +27 -0
- data/iso_data/world/sb.yml +21 -0
- data/iso_data/world/sc.yml +51 -0
- data/iso_data/world/sd.yml +51 -0
- data/iso_data/world/se.yml +43 -0
- data/iso_data/world/sg.yml +11 -0
- data/iso_data/world/sh.yml +1 -0
- data/iso_data/world/si.yml +421 -0
- data/iso_data/world/sk.yml +17 -0
- data/iso_data/world/sl.yml +9 -0
- data/iso_data/world/sm.yml +19 -0
- data/iso_data/world/sn.yml +29 -0
- data/iso_data/world/so.yml +37 -0
- data/iso_data/world/sr.yml +21 -0
- data/iso_data/world/st.yml +5 -0
- data/iso_data/world/sv.yml +29 -0
- data/iso_data/world/sy.yml +29 -0
- data/iso_data/world/sz.yml +9 -0
- data/iso_data/world/td.yml +45 -0
- data/iso_data/world/tg.yml +11 -0
- data/iso_data/world/th.yml +155 -0
- data/iso_data/world/tj.yml +7 -0
- data/iso_data/world/tl.yml +27 -0
- data/iso_data/world/tm.yml +13 -0
- data/iso_data/world/tn.yml +49 -0
- data/iso_data/world/to.yml +11 -0
- data/iso_data/world/tr.yml +163 -0
- data/iso_data/world/tt.yml +33 -0
- data/iso_data/world/tv.yml +17 -0
- data/iso_data/world/tw.yml +47 -0
- data/iso_data/world/tz.yml +53 -0
- data/iso_data/world/ua.yml +55 -0
- data/iso_data/world/ug.yml +9 -0
- data/iso_data/world/ug/c.yml +33 -0
- data/iso_data/world/ug/e.yml +49 -0
- data/iso_data/world/ug/n.yml +43 -0
- data/iso_data/world/ug/w.yml +39 -0
- data/iso_data/world/um.yml +19 -0
- data/iso_data/world/us.yml +115 -0
- data/iso_data/world/uy.yml +39 -0
- data/iso_data/world/uz.yml +29 -0
- data/iso_data/world/vc.yml +13 -0
- data/iso_data/world/ve.yml +51 -0
- data/iso_data/world/vn.yml +129 -0
- data/iso_data/world/vu.yml +13 -0
- data/iso_data/world/ws.yml +23 -0
- data/iso_data/world/ye.yml +41 -0
- data/iso_data/world/za.yml +19 -0
- data/iso_data/world/zm.yml +19 -0
- data/iso_data/world/zw.yml +21 -0
- data/lib/carmen.rb +52 -143
- data/lib/carmen/country.rb +56 -0
- data/lib/carmen/i18n.rb +105 -0
- data/lib/carmen/querying.rb +34 -0
- data/lib/carmen/region.rb +107 -0
- data/lib/carmen/region_collection.rb +30 -0
- data/lib/carmen/utils.rb +53 -0
- data/lib/carmen/version.rb +1 -1
- data/lib/carmen/world.rb +29 -0
- data/locale/cn/world.yml +963 -0
- data/locale/cs/world.yml +983 -0
- data/locale/de/world.yml +1051 -0
- data/locale/en/world.yml +999 -0
- data/locale/en/world/ad.yml +18 -0
- data/locale/en/world/ae.yml +18 -0
- data/locale/en/world/af.yml +72 -0
- data/locale/en/world/ag.yml +20 -0
- data/locale/en/world/al.yml +28 -0
- data/locale/en/world/al/01.yml +11 -0
- data/locale/en/world/al/02.yml +9 -0
- data/locale/en/world/al/03.yml +13 -0
- data/locale/en/world/al/04.yml +11 -0
- data/locale/en/world/al/05.yml +11 -0
- data/locale/en/world/al/06.yml +13 -0
- data/locale/en/world/al/07.yml +11 -0
- data/locale/en/world/al/08.yml +11 -0
- data/locale/en/world/al/09.yml +11 -0
- data/locale/en/world/al/10.yml +11 -0
- data/locale/en/world/al/11.yml +9 -0
- data/locale/en/world/al/12.yml +11 -0
- data/locale/en/world/am.yml +26 -0
- data/locale/en/world/ao.yml +40 -0
- data/locale/en/world/ar.yml +50 -0
- data/locale/en/world/at.yml +22 -0
- data/locale/en/world/au.yml +20 -0
- data/locale/en/world/az.yml +146 -0
- data/locale/en/world/az/nx.yml +17 -0
- data/locale/en/world/ba.yml +10 -0
- data/locale/en/world/ba/bih.yml +25 -0
- data/locale/en/world/bb.yml +26 -0
- data/locale/en/world/bd.yml +16 -0
- data/locale/en/world/bd/1.yml +17 -0
- data/locale/en/world/bd/2.yml +27 -0
- data/locale/en/world/bd/3.yml +39 -0
- data/locale/en/world/bd/4.yml +25 -0
- data/locale/en/world/bd/5.yml +37 -0
- data/locale/en/world/bd/6.yml +13 -0
- data/locale/en/world/be.yml +26 -0
- data/locale/en/world/bf.yml +30 -0
- data/locale/en/world/bf/01.yml +17 -0
- data/locale/en/world/bf/02.yml +9 -0
- data/locale/en/world/bf/03.yml +7 -0
- data/locale/en/world/bf/04.yml +11 -0
- data/locale/en/world/bf/05.yml +11 -0
- data/locale/en/world/bf/06.yml +13 -0
- data/locale/en/world/bf/07.yml +11 -0
- data/locale/en/world/bf/08.yml +15 -0
- data/locale/en/world/bf/09.yml +11 -0
- data/locale/en/world/bf/10.yml +13 -0
- data/locale/en/world/bf/11.yml +11 -0
- data/locale/en/world/bf/12.yml +13 -0
- data/locale/en/world/bf/13.yml +13 -0
- data/locale/en/world/bg.yml +60 -0
- data/locale/en/world/bh.yml +14 -0
- data/locale/en/world/bi.yml +36 -0
- data/locale/en/world/bj.yml +28 -0
- data/locale/en/world/bl.yml +4 -0
- data/locale/en/world/bn.yml +12 -0
- data/locale/en/world/bo.yml +22 -0
- data/locale/en/world/br.yml +60 -0
- data/locale/en/world/bs.yml +68 -0
- data/locale/en/world/bt.yml +44 -0
- data/locale/en/world/bw.yml +24 -0
- data/locale/en/world/by.yml +18 -0
- data/locale/en/world/bz.yml +16 -0
- data/locale/en/world/ca.yml +30 -0
- data/locale/en/world/cd.yml +28 -0
- data/locale/en/world/cf.yml +38 -0
- data/locale/en/world/cg.yml +26 -0
- data/locale/en/world/ch.yml +56 -0
- data/locale/en/world/ci.yml +42 -0
- data/locale/en/world/cl.yml +34 -0
- data/locale/en/world/cm.yml +24 -0
- data/locale/en/world/cn.yml +72 -0
- data/locale/en/world/co.yml +70 -0
- data/locale/en/world/cr.yml +18 -0
- data/locale/en/world/cu.yml +34 -0
- data/locale/en/world/cv.yml +8 -0
- data/locale/en/world/cv/b.yml +19 -0
- data/locale/en/world/cv/s.yml +35 -0
- data/locale/en/world/cy.yml +16 -0
- data/locale/en/world/cz.yml +32 -0
- data/locale/en/world/cz/jc.yml +19 -0
- data/locale/en/world/cz/jm.yml +19 -0
- data/locale/en/world/cz/ka.yml +11 -0
- data/locale/en/world/cz/kr.yml +15 -0
- data/locale/en/world/cz/li.yml +13 -0
- data/locale/en/world/cz/mo.yml +17 -0
- data/locale/en/world/cz/ol.yml +15 -0
- data/locale/en/world/cz/pa.yml +13 -0
- data/locale/en/world/cz/pl.yml +19 -0
- data/locale/en/world/cz/pr.yml +35 -0
- data/locale/en/world/cz/st.yml +29 -0
- data/locale/en/world/cz/us.yml +19 -0
- data/locale/en/world/cz/vy.yml +15 -0
- data/locale/en/world/cz/zl.yml +13 -0
- data/locale/en/world/de.yml +36 -0
- data/locale/en/world/dj.yml +16 -0
- data/locale/en/world/dk.yml +14 -0
- data/locale/en/world/dm.yml +24 -0
- data/locale/en/world/do.yml +64 -0
- data/locale/en/world/dz.yml +100 -0
- data/locale/en/world/ec.yml +52 -0
- data/locale/en/world/ee.yml +34 -0
- data/locale/en/world/eg.yml +60 -0
- data/locale/en/world/er.yml +16 -0
- data/locale/en/world/es.yml +42 -0
- data/locale/en/world/es/an.yml +21 -0
- data/locale/en/world/es/ar.yml +11 -0
- data/locale/en/world/es/as.yml +7 -0
- data/locale/en/world/es/cb.yml +7 -0
- data/locale/en/world/es/cl.yml +23 -0
- data/locale/en/world/es/cm.yml +15 -0
- data/locale/en/world/es/cn.yml +9 -0
- data/locale/en/world/es/ct.yml +13 -0
- data/locale/en/world/es/ex.yml +9 -0
- data/locale/en/world/es/ga.yml +13 -0
- data/locale/en/world/es/ib.yml +7 -0
- data/locale/en/world/es/mc.yml +7 -0
- data/locale/en/world/es/md.yml +7 -0
- data/locale/en/world/es/nc.yml +7 -0
- data/locale/en/world/es/pv.yml +11 -0
- data/locale/en/world/es/ri.yml +7 -0
- data/locale/en/world/es/vc.yml +11 -0
- data/locale/en/world/et.yml +26 -0
- data/locale/en/world/fi.yml +16 -0
- data/locale/en/world/fj.yml +14 -0
- data/locale/en/world/fm.yml +12 -0
- data/locale/en/world/fr.yml +74 -0
- data/locale/en/world/fr/a.yml +9 -0
- data/locale/en/world/fr/b.yml +15 -0
- data/locale/en/world/fr/c.yml +13 -0
- data/locale/en/world/fr/d.yml +13 -0
- data/locale/en/world/fr/e.yml +13 -0
- data/locale/en/world/fr/f.yml +17 -0
- data/locale/en/world/fr/g.yml +13 -0
- data/locale/en/world/fr/h.yml +9 -0
- data/locale/en/world/fr/i.yml +13 -0
- data/locale/en/world/fr/j.yml +21 -0
- data/locale/en/world/fr/k.yml +15 -0
- data/locale/en/world/fr/l.yml +11 -0
- data/locale/en/world/fr/m.yml +13 -0
- data/locale/en/world/fr/n.yml +21 -0
- data/locale/en/world/fr/o.yml +9 -0
- data/locale/en/world/fr/p.yml +11 -0
- data/locale/en/world/fr/q.yml +9 -0
- data/locale/en/world/fr/r.yml +15 -0
- data/locale/en/world/fr/s.yml +11 -0
- data/locale/en/world/fr/t.yml +13 -0
- data/locale/en/world/fr/u.yml +17 -0
- data/locale/en/world/fr/v.yml +21 -0
- data/locale/en/world/ga.yml +22 -0
- data/locale/en/world/gb.yml +478 -0
- data/locale/en/world/gd.yml +18 -0
- data/locale/en/world/ge.yml +28 -0
- data/locale/en/world/gg.yml +4 -0
- data/locale/en/world/gh.yml +24 -0
- data/locale/en/world/gl.yml +12 -0
- data/locale/en/world/gm.yml +16 -0
- data/locale/en/world/gn.yml +20 -0
- data/locale/en/world/gn/b.yml +15 -0
- data/locale/en/world/gn/d.yml +15 -0
- data/locale/en/world/gn/f.yml +13 -0
- data/locale/en/world/gn/k.yml +15 -0
- data/locale/en/world/gn/l.yml +15 -0
- data/locale/en/world/gn/m.yml +11 -0
- data/locale/en/world/gn/n.yml +17 -0
- data/locale/en/world/gq.yml +22 -0
- data/locale/en/world/gr.yml +32 -0
- data/locale/en/world/gr/a.yml +15 -0
- data/locale/en/world/gr/b.yml +19 -0
- data/locale/en/world/gr/c.yml +13 -0
- data/locale/en/world/gr/d.yml +11 -0
- data/locale/en/world/gr/e.yml +13 -0
- data/locale/en/world/gr/f.yml +15 -0
- data/locale/en/world/gr/g.yml +11 -0
- data/locale/en/world/gr/h.yml +15 -0
- data/locale/en/world/gr/i.yml +7 -0
- data/locale/en/world/gr/j.yml +15 -0
- data/locale/en/world/gr/k.yml +11 -0
- data/locale/en/world/gr/l.yml +9 -0
- data/locale/en/world/gr/m.yml +13 -0
- data/locale/en/world/gt.yml +48 -0
- data/locale/en/world/gw.yml +12 -0
- data/locale/en/world/gw/l.yml +9 -0
- data/locale/en/world/gw/n.yml +11 -0
- data/locale/en/world/gw/s.yml +11 -0
- data/locale/en/world/gy.yml +24 -0
- data/locale/en/world/hn.yml +40 -0
- data/locale/en/world/hr.yml +46 -0
- data/locale/en/world/ht.yml +22 -0
- data/locale/en/world/hu.yml +90 -0
- data/locale/en/world/id.yml +18 -0
- data/locale/en/world/id/ij.yml +9 -0
- data/locale/en/world/id/jw.yml +17 -0
- data/locale/en/world/id/ka.yml +13 -0
- data/locale/en/world/id/ma.yml +9 -0
- data/locale/en/world/id/nu.yml +11 -0
- data/locale/en/world/id/sl.yml +17 -0
- data/locale/en/world/id/sm.yml +25 -0
- data/locale/en/world/ie.yml +12 -0
- data/locale/en/world/ie/c.yml +15 -0
- data/locale/en/world/ie/l.yml +29 -0
- data/locale/en/world/ie/m.yml +17 -0
- data/locale/en/world/ie/u.yml +11 -0
- data/locale/en/world/il.yml +16 -0
- data/locale/en/world/im.yml +4 -0
- data/locale/en/world/in.yml +74 -0
- data/locale/en/world/iq.yml +40 -0
- data/locale/en/world/ir.yml +64 -0
- data/locale/en/world/is.yml +22 -0
- data/locale/en/world/it.yml +44 -0
- data/locale/en/world/it/21.yml +21 -0
- data/locale/en/world/it/23.yml +7 -0
- data/locale/en/world/it/25.yml +29 -0
- data/locale/en/world/it/32.yml +9 -0
- data/locale/en/world/it/34.yml +19 -0
- data/locale/en/world/it/36.yml +13 -0
- data/locale/en/world/it/42.yml +13 -0
- data/locale/en/world/it/45.yml +23 -0
- data/locale/en/world/it/52.yml +25 -0
- data/locale/en/world/it/55.yml +9 -0
- data/locale/en/world/it/57.yml +15 -0
- data/locale/en/world/it/62.yml +15 -0
- data/locale/en/world/it/65.yml +13 -0
- data/locale/en/world/it/67.yml +9 -0
- data/locale/en/world/it/72.yml +15 -0
- data/locale/en/world/it/75.yml +17 -0
- data/locale/en/world/it/77.yml +9 -0
- data/locale/en/world/it/78.yml +15 -0
- data/locale/en/world/it/82.yml +23 -0
- data/locale/en/world/it/88.yml +21 -0
- data/locale/en/world/je.yml +4 -0
- data/locale/en/world/jm.yml +32 -0
- data/locale/en/world/jo.yml +28 -0
- data/locale/en/world/jp.yml +98 -0
- data/locale/en/world/ke.yml +18 -0
- data/locale/en/world/kg.yml +20 -0
- data/locale/en/world/kh.yml +52 -0
- data/locale/en/world/ki.yml +10 -0
- data/locale/en/world/km.yml +10 -0
- data/locale/en/world/kn.yml +8 -0
- data/locale/en/world/kn/k.yml +23 -0
- data/locale/en/world/kn/n.yml +15 -0
- data/locale/en/world/kp.yml +26 -0
- data/locale/en/world/kr.yml +36 -0
- data/locale/en/world/kw.yml +14 -0
- data/locale/en/world/kz.yml +36 -0
- data/locale/en/world/la.yml +40 -0
- data/locale/en/world/lb.yml +20 -0
- data/locale/en/world/li.yml +26 -0
- data/locale/en/world/lk.yml +22 -0
- data/locale/en/world/lk/1.yml +11 -0
- data/locale/en/world/lk/2.yml +11 -0
- data/locale/en/world/lk/3.yml +11 -0
- data/locale/en/world/lk/4.yml +15 -0
- data/locale/en/world/lk/5.yml +11 -0
- data/locale/en/world/lk/6.yml +9 -0
- data/locale/en/world/lk/7.yml +9 -0
- data/locale/en/world/lk/8.yml +9 -0
- data/locale/en/world/lk/9.yml +9 -0
- data/locale/en/world/lr.yml +30 -0
- data/locale/en/world/ls.yml +24 -0
- data/locale/en/world/lt.yml +24 -0
- data/locale/en/world/lu.yml +10 -0
- data/locale/en/world/lv.yml +70 -0
- data/locale/en/world/ly.yml +50 -0
- data/locale/en/world/ma.yml +36 -0
- data/locale/en/world/ma/01.yml +15 -0
- data/locale/en/world/ma/02.yml +9 -0
- data/locale/en/world/ma/03.yml +11 -0
- data/locale/en/world/ma/04.yml +17 -0
- data/locale/en/world/ma/05.yml +13 -0
- data/locale/en/world/ma/06.yml +15 -0
- data/locale/en/world/ma/07.yml +13 -0
- data/locale/en/world/ma/08.yml +13 -0
- data/locale/en/world/ma/09.yml +11 -0
- data/locale/en/world/ma/10.yml +9 -0
- data/locale/en/world/ma/11.yml +19 -0
- data/locale/en/world/ma/12.yml +9 -0
- data/locale/en/world/ma/13.yml +19 -0
- data/locale/en/world/ma/14.yml +15 -0
- data/locale/en/world/ma/15.yml +9 -0
- data/locale/en/world/ma/16.yml +9 -0
- data/locale/en/world/md.yml +78 -0
- data/locale/en/world/me.yml +46 -0
- data/locale/en/world/mf.yml +4 -0
- data/locale/en/world/mg.yml +16 -0
- data/locale/en/world/mh.yml +8 -0
- data/locale/en/world/mh/l.yml +33 -0
- data/locale/en/world/mh/t.yml +25 -0
- data/locale/en/world/mk.yml +172 -0
- data/locale/en/world/ml.yml +22 -0
- data/locale/en/world/mm.yml +32 -0
- data/locale/en/world/mn.yml +48 -0
- data/locale/en/world/mo.yml +4 -0
- data/locale/en/world/mr.yml +30 -0
- data/locale/en/world/mt.yml +140 -0
- data/locale/en/world/mu.yml +38 -0
- data/locale/en/world/mv.yml +44 -0
- data/locale/en/world/mw.yml +10 -0
- data/locale/en/world/mw/c.yml +23 -0
- data/locale/en/world/mw/n.yml +19 -0
- data/locale/en/world/mw/s.yml +29 -0
- data/locale/en/world/mx.yml +68 -0
- data/locale/en/world/my.yml +36 -0
- data/locale/en/world/mz.yml +26 -0
- data/locale/en/world/na.yml +30 -0
- data/locale/en/world/ne.yml +20 -0
- data/locale/en/world/ng.yml +78 -0
- data/locale/en/world/ni.yml +38 -0
- data/locale/en/world/nl.yml +28 -0
- data/locale/en/world/no.yml +46 -0
- data/locale/en/world/np.yml +14 -0
- data/locale/en/world/np/1.yml +11 -0
- data/locale/en/world/np/2.yml +11 -0
- data/locale/en/world/np/3.yml +11 -0
- data/locale/en/world/np/4.yml +11 -0
- data/locale/en/world/np/5.yml +9 -0
- data/locale/en/world/nr.yml +32 -0
- data/locale/en/world/nz.yml +10 -0
- data/locale/en/world/nz/n.yml +23 -0
- data/locale/en/world/nz/s.yml +19 -0
- data/locale/en/world/om.yml +22 -0
- data/locale/en/world/pa.yml +28 -0
- data/locale/en/world/pe.yml +56 -0
- data/locale/en/world/pg.yml +44 -0
- data/locale/en/world/ph.yml +38 -0
- data/locale/en/world/ph/01.yml +13 -0
- data/locale/en/world/ph/02.yml +15 -0
- data/locale/en/world/ph/03.yml +19 -0
- data/locale/en/world/ph/05.yml +17 -0
- data/locale/en/world/ph/06.yml +17 -0
- data/locale/en/world/ph/07.yml +13 -0
- data/locale/en/world/ph/08.yml +17 -0
- data/locale/en/world/ph/09.yml +13 -0
- data/locale/en/world/ph/10.yml +13 -0
- data/locale/en/world/ph/11.yml +17 -0
- data/locale/en/world/ph/12.yml +11 -0
- data/locale/en/world/ph/13.yml +15 -0
- data/locale/en/world/ph/14.yml +13 -0
- data/locale/en/world/ph/15.yml +17 -0
- data/locale/en/world/ph/40.yml +15 -0
- data/locale/en/world/ph/41.yml +15 -0
- data/locale/en/world/pk.yml +20 -0
- data/locale/en/world/pl.yml +36 -0
- data/locale/en/world/ps.yml +4 -0
- data/locale/en/world/pt.yml +44 -0
- data/locale/en/world/pw.yml +36 -0
- data/locale/en/world/py.yml +40 -0
- data/locale/en/world/qa.yml +22 -0
- data/locale/en/world/ro.yml +88 -0
- data/locale/en/world/rs.yml +44 -0
- data/locale/en/world/rs/km.yml +15 -0
- data/locale/en/world/rs/vo.yml +19 -0
- data/locale/en/world/ru.yml +170 -0
- data/locale/en/world/rw.yml +14 -0
- data/locale/en/world/sa.yml +30 -0
- data/locale/en/world/sb.yml +24 -0
- data/locale/en/world/sc.yml +54 -0
- data/locale/en/world/sd.yml +54 -0
- data/locale/en/world/se.yml +46 -0
- data/locale/en/world/sg.yml +14 -0
- data/locale/en/world/sh.yml +4 -0
- data/locale/en/world/si.yml +424 -0
- data/locale/en/world/sk.yml +20 -0
- data/locale/en/world/sl.yml +12 -0
- data/locale/en/world/sm.yml +22 -0
- data/locale/en/world/sn.yml +32 -0
- data/locale/en/world/so.yml +40 -0
- data/locale/en/world/sr.yml +24 -0
- data/locale/en/world/st.yml +8 -0
- data/locale/en/world/sv.yml +32 -0
- data/locale/en/world/sy.yml +32 -0
- data/locale/en/world/sz.yml +12 -0
- data/locale/en/world/td.yml +48 -0
- data/locale/en/world/tg.yml +14 -0
- data/locale/en/world/th.yml +158 -0
- data/locale/en/world/tj.yml +10 -0
- data/locale/en/world/tl.yml +30 -0
- data/locale/en/world/tm.yml +16 -0
- data/locale/en/world/tn.yml +52 -0
- data/locale/en/world/to.yml +14 -0
- data/locale/en/world/tr.yml +166 -0
- data/locale/en/world/tt.yml +36 -0
- data/locale/en/world/tv.yml +20 -0
- data/locale/en/world/tw.yml +50 -0
- data/locale/en/world/tz.yml +56 -0
- data/locale/en/world/ua.yml +58 -0
- data/locale/en/world/ug.yml +12 -0
- data/locale/en/world/ug/c.yml +37 -0
- data/locale/en/world/ug/e.yml +53 -0
- data/locale/en/world/ug/n.yml +47 -0
- data/locale/en/world/ug/w.yml +43 -0
- data/locale/en/world/um.yml +22 -0
- data/locale/en/world/us.yml +118 -0
- data/locale/en/world/uy.yml +42 -0
- data/locale/en/world/uz.yml +32 -0
- data/locale/en/world/vc.yml +16 -0
- data/locale/en/world/ve.yml +54 -0
- data/locale/en/world/vn.yml +132 -0
- data/locale/en/world/vu.yml +16 -0
- data/locale/en/world/ws.yml +26 -0
- data/locale/en/world/ye.yml +44 -0
- data/locale/en/world/za.yml +22 -0
- data/locale/en/world/zm.yml +22 -0
- data/locale/en/world/zw.yml +24 -0
- data/locale/es/world.yml +891 -0
- data/locale/fi/world.yml +1015 -0
- data/locale/hi/world.yml +983 -0
- data/locale/it/world.yml +955 -0
- data/locale/jp/world.yml +983 -0
- data/locale/ko/world.yml +955 -0
- data/locale/nl/world.yml +1003 -0
- data/locale/pl/world.yml +983 -0
- data/locale/pt/world.yml +1015 -0
- data/locale/ru/world.yml +1015 -0
- data/locale/sk/world.yml +983 -0
- data/locale/sv/world.yml +1039 -0
- data/locale/tr/world.yml +955 -0
- metadata +883 -101
- data/README.rdoc +0 -112
- data/data/countries/cn.yml +0 -481
- data/data/countries/cs.yml +0 -495
- data/data/countries/de.yml +0 -527
- data/data/countries/en.yml +0 -508
- data/data/countries/es.yml +0 -439
- data/data/countries/fi.yml +0 -508
- data/data/countries/hi.yml +0 -491
- data/data/countries/it.yml +0 -477
- data/data/countries/jp.yml +0 -491
- data/data/countries/nl.yml +0 -501
- data/data/countries/pl.yml +0 -495
- data/data/countries/pt.yml +0 -508
- data/data/countries/ru.yml +0 -507
- data/data/countries/sk.yml +0 -495
- data/data/countries/sv.yml +0 -519
- data/data/states/au.yml +0 -17
- data/data/states/br.yml +0 -55
- data/data/states/ca.yml +0 -27
- data/data/states/cu.yml +0 -31
- data/data/states/de.yml +0 -33
- data/data/states/dk.yml +0 -11
- data/data/states/es.yml +0 -39
- data/data/states/hr.yml +0 -43
- data/data/states/in.yml +0 -73
- data/data/states/it.yml +0 -207
- data/data/states/mx.yml +0 -65
- data/data/states/nl.yml +0 -25
- data/data/states/no.yml +0 -39
- data/data/states/nz.yml +0 -35
- data/data/states/ua.yml +0 -51
- data/data/states/us.yml +0 -126
- data/lib/carmen/action_view_helpers.rb +0 -68
- data/lib/carmen/railtie.rb +0 -17
@@ -0,0 +1,129 @@
|
|
1
|
+
---
|
2
|
+
- code: '01'
|
3
|
+
type: province
|
4
|
+
- code: '02'
|
5
|
+
type: province
|
6
|
+
- code: '03'
|
7
|
+
type: province
|
8
|
+
- code: '04'
|
9
|
+
type: province
|
10
|
+
- code: '05'
|
11
|
+
type: province
|
12
|
+
- code: '06'
|
13
|
+
type: province
|
14
|
+
- code: '07'
|
15
|
+
type: province
|
16
|
+
- code: '09'
|
17
|
+
type: province
|
18
|
+
- code: '13'
|
19
|
+
type: province
|
20
|
+
- code: '14'
|
21
|
+
type: province
|
22
|
+
- code: '15'
|
23
|
+
type: province
|
24
|
+
- code: '18'
|
25
|
+
type: province
|
26
|
+
- code: '20'
|
27
|
+
type: province
|
28
|
+
- code: '21'
|
29
|
+
type: province
|
30
|
+
- code: '22'
|
31
|
+
type: province
|
32
|
+
- code: '23'
|
33
|
+
type: province
|
34
|
+
- code: '24'
|
35
|
+
type: province
|
36
|
+
- code: '25'
|
37
|
+
type: province
|
38
|
+
- code: '26'
|
39
|
+
type: province
|
40
|
+
- code: '27'
|
41
|
+
type: province
|
42
|
+
- code: '28'
|
43
|
+
type: province
|
44
|
+
- code: '29'
|
45
|
+
type: province
|
46
|
+
- code: '30'
|
47
|
+
type: province
|
48
|
+
- code: '31'
|
49
|
+
type: province
|
50
|
+
- code: '32'
|
51
|
+
type: province
|
52
|
+
- code: '33'
|
53
|
+
type: province
|
54
|
+
- code: '34'
|
55
|
+
type: province
|
56
|
+
- code: '35'
|
57
|
+
type: province
|
58
|
+
- code: '36'
|
59
|
+
type: province
|
60
|
+
- code: '37'
|
61
|
+
type: province
|
62
|
+
- code: '39'
|
63
|
+
type: province
|
64
|
+
- code: '40'
|
65
|
+
type: province
|
66
|
+
- code: '41'
|
67
|
+
type: province
|
68
|
+
- code: '43'
|
69
|
+
type: province
|
70
|
+
- code: '44'
|
71
|
+
type: province
|
72
|
+
- code: '45'
|
73
|
+
type: province
|
74
|
+
- code: '46'
|
75
|
+
type: province
|
76
|
+
- code: '47'
|
77
|
+
type: province
|
78
|
+
- code: '48'
|
79
|
+
type: province
|
80
|
+
- code: '49'
|
81
|
+
type: province
|
82
|
+
- code: '50'
|
83
|
+
type: province
|
84
|
+
- code: '51'
|
85
|
+
type: province
|
86
|
+
- code: '52'
|
87
|
+
type: province
|
88
|
+
- code: '53'
|
89
|
+
type: province
|
90
|
+
- code: '54'
|
91
|
+
type: province
|
92
|
+
- code: '55'
|
93
|
+
type: province
|
94
|
+
- code: '56'
|
95
|
+
type: province
|
96
|
+
- code: '57'
|
97
|
+
type: province
|
98
|
+
- code: '58'
|
99
|
+
type: province
|
100
|
+
- code: '59'
|
101
|
+
type: province
|
102
|
+
- code: '60'
|
103
|
+
type: province
|
104
|
+
- code: '61'
|
105
|
+
type: province
|
106
|
+
- code: '62'
|
107
|
+
type: province
|
108
|
+
- code: '63'
|
109
|
+
type: province
|
110
|
+
- code: '64'
|
111
|
+
type: province
|
112
|
+
- code: '65'
|
113
|
+
type: province
|
114
|
+
- code: '66'
|
115
|
+
type: province
|
116
|
+
- code: '67'
|
117
|
+
type: province
|
118
|
+
- code: '68'
|
119
|
+
type: province
|
120
|
+
- code: '69'
|
121
|
+
type: province
|
122
|
+
- code: '70'
|
123
|
+
type: province
|
124
|
+
- code: '71'
|
125
|
+
type: province
|
126
|
+
- code: '72'
|
127
|
+
type: province
|
128
|
+
- code: '73'
|
129
|
+
type: province
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
- code: AA
|
3
|
+
type: district
|
4
|
+
- code: AL
|
5
|
+
type: district
|
6
|
+
- code: AT
|
7
|
+
type: district
|
8
|
+
- code: FA
|
9
|
+
type: district
|
10
|
+
- code: GE
|
11
|
+
type: district
|
12
|
+
- code: GI
|
13
|
+
type: district
|
14
|
+
- code: PA
|
15
|
+
type: district
|
16
|
+
- code: SA
|
17
|
+
type: district
|
18
|
+
- code: TU
|
19
|
+
type: district
|
20
|
+
- code: VF
|
21
|
+
type: district
|
22
|
+
- code: VS
|
23
|
+
type: district
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
- code: AB
|
3
|
+
type: governorate
|
4
|
+
- code: AD
|
5
|
+
type: governorate
|
6
|
+
- code: AM
|
7
|
+
type: governorate
|
8
|
+
- code: BA
|
9
|
+
type: governorate
|
10
|
+
- code: DA
|
11
|
+
type: governorate
|
12
|
+
- code: DH
|
13
|
+
type: governorate
|
14
|
+
- code: HD
|
15
|
+
type: governorate
|
16
|
+
- code: HJ
|
17
|
+
type: governorate
|
18
|
+
- code: IB
|
19
|
+
type: governorate
|
20
|
+
- code: JA
|
21
|
+
type: governorate
|
22
|
+
- code: LA
|
23
|
+
type: governorate
|
24
|
+
- code: MA
|
25
|
+
type: governorate
|
26
|
+
- code: MR
|
27
|
+
type: governorate
|
28
|
+
- code: MU
|
29
|
+
type: governorate
|
30
|
+
- code: MW
|
31
|
+
type: governorate
|
32
|
+
- code: RA
|
33
|
+
type: governorate
|
34
|
+
- code: SD
|
35
|
+
type: governorate
|
36
|
+
- code: SH
|
37
|
+
type: governorate
|
38
|
+
- code: SN
|
39
|
+
type: governorate
|
40
|
+
- code: TA
|
41
|
+
type: governorate
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
- code: EC
|
3
|
+
type: province
|
4
|
+
- code: FS
|
5
|
+
type: province
|
6
|
+
- code: GT
|
7
|
+
type: province
|
8
|
+
- code: LP
|
9
|
+
type: province
|
10
|
+
- code: MP
|
11
|
+
type: province
|
12
|
+
- code: NC
|
13
|
+
type: province
|
14
|
+
- code: NL
|
15
|
+
type: province
|
16
|
+
- code: NW
|
17
|
+
type: province
|
18
|
+
- code: WC
|
19
|
+
type: province
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
- code: '01'
|
3
|
+
type: province
|
4
|
+
- code: '02'
|
5
|
+
type: province
|
6
|
+
- code: '03'
|
7
|
+
type: province
|
8
|
+
- code: '04'
|
9
|
+
type: province
|
10
|
+
- code: '05'
|
11
|
+
type: province
|
12
|
+
- code: '06'
|
13
|
+
type: province
|
14
|
+
- code: '07'
|
15
|
+
type: province
|
16
|
+
- code: '08'
|
17
|
+
type: province
|
18
|
+
- code: '09'
|
19
|
+
type: province
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
- code: BU
|
3
|
+
type: city
|
4
|
+
- code: HA
|
5
|
+
type: city
|
6
|
+
- code: MA
|
7
|
+
type: province
|
8
|
+
- code: MC
|
9
|
+
type: province
|
10
|
+
- code: ME
|
11
|
+
type: province
|
12
|
+
- code: MI
|
13
|
+
type: province
|
14
|
+
- code: MN
|
15
|
+
type: province
|
16
|
+
- code: MS
|
17
|
+
type: province
|
18
|
+
- code: MV
|
19
|
+
type: province
|
20
|
+
- code: MW
|
21
|
+
type: province
|
data/lib/carmen.rb
CHANGED
@@ -1,161 +1,70 @@
|
|
1
1
|
require 'yaml'
|
2
|
-
|
3
|
-
require 'ftools'
|
4
|
-
rescue LoadError
|
5
|
-
require 'fileutils' # ftools is now fileutils in Ruby 1.9
|
6
|
-
end
|
2
|
+
require 'pathname'
|
7
3
|
|
8
|
-
|
9
|
-
|
10
|
-
if Rails::VERSION::MAJOR > 2
|
11
|
-
require 'carmen/railtie'
|
12
|
-
else
|
13
|
-
require 'carmen/action_view_helpers'
|
14
|
-
end
|
15
|
-
end
|
4
|
+
lib_path = File.expand_path('../../lib', __FILE__)
|
5
|
+
$LOAD_PATH.unshift(lib_path)
|
16
6
|
|
7
|
+
require 'carmen/country'
|
8
|
+
require 'carmen/i18n'
|
17
9
|
require 'carmen/version'
|
18
10
|
|
19
11
|
module Carmen
|
20
12
|
class << self
|
21
|
-
attr_accessor :default_country, :default_locale, :excluded_countries, :excluded_states,
|
22
|
-
:priority_countries
|
23
|
-
end
|
24
|
-
|
25
|
-
self.default_country = 'US'
|
26
|
-
self.default_locale = :en
|
27
|
-
self.excluded_countries = []
|
28
|
-
self.excluded_states = {}
|
29
|
-
self.priority_countries = []
|
30
|
-
|
31
|
-
@data_path = File.join(File.dirname(__FILE__), '..', 'data')
|
32
|
-
|
33
|
-
@states = Dir[File.join(@data_path, '/states/*.yml')].map do |file_name|
|
34
|
-
[File.basename(file_name, '.yml').upcase, YAML.load_file(file_name)]
|
35
|
-
end
|
36
|
-
|
37
|
-
# Raised when attempting to retrieve states for an unsupported country
|
38
|
-
class StatesNotSupported < RuntimeError; end
|
39
|
-
|
40
|
-
# Raised when attempting to work with a country not in the data set
|
41
|
-
class NonexistentCountry < RuntimeError; end
|
42
13
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
#
|
49
|
-
|
50
|
-
|
51
|
-
#
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
14
|
+
# Public: An array of locations where data files for Carmen are stored.
|
15
|
+
#
|
16
|
+
# Data in entries that appear later in the array takes precedence.
|
17
|
+
#
|
18
|
+
# Each path should follow the following structure:
|
19
|
+
# |- world.yml (all countries)
|
20
|
+
# \- regions (directory for subregions, named by code)
|
21
|
+
# |- be.yml (subregion file for a country)
|
22
|
+
#
|
23
|
+
# Defaults to only the the `iso_data` directory within the Carmen directory.
|
24
|
+
attr_reader :data_paths
|
25
|
+
|
26
|
+
# Public: an object to use as the I18n backend.
|
27
|
+
#
|
28
|
+
# Ths suppiled object must respond to
|
29
|
+
# t(key).
|
30
|
+
#
|
31
|
+
# Defaults to an instance of Carmen::I18n::Simple.
|
32
|
+
attr_accessor :i18n_backend
|
33
|
+
|
34
|
+
# Private: the Carmen library's root directory.
|
35
|
+
#
|
36
|
+
# Provides a way to find the built-in data and locale files.
|
37
|
+
attr_accessor :root_path
|
38
|
+
|
39
|
+
# Public: Set the data path.
|
40
|
+
# path - The String path to the data directory.
|
41
|
+
def append_data_path(path)
|
42
|
+
World.instance.reset!
|
43
|
+
@data_paths << Pathname.new(path)
|
63
44
|
end
|
64
45
|
|
65
|
-
#
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
# Returns the country name corresponding to the supplied country code, optionally using the specified locale.
|
72
|
-
# Carmen::country_name('TR') => 'Turkey'
|
73
|
-
# Carmen::country_name('TR', :locale => :de) => 'Türkei'
|
74
|
-
def self.country_name(country_code, options={})
|
75
|
-
search_collection(countries(options), country_code, 1, 0)
|
76
|
-
end
|
77
|
-
|
78
|
-
# Returns the country code corresponding to the supplied country name
|
79
|
-
# Carmen::country_code('Canada') => 'CA'
|
80
|
-
def self.country_code(country_name, options={})
|
81
|
-
search_collection(countries(options), country_name, 0, 1)
|
82
|
-
end
|
83
|
-
|
84
|
-
# Returns an array of all country codes
|
85
|
-
# Carmen::country_codes => ['AF', 'AX', 'AL', ... ]
|
86
|
-
def self.country_codes
|
87
|
-
countries.map {|c| c[1] }
|
88
|
-
end
|
89
|
-
|
90
|
-
# Returns an array of all country names, optionally using the specified locale.
|
91
|
-
# Carmen::country_names => ['Afghanistan', 'Aland Islands', 'Albania', ... ]
|
92
|
-
# Carmen::country_names(:locale => :de) => ['Afghanistan', 'Åland', 'Albanien', ... ]
|
93
|
-
def self.country_names(options={})
|
94
|
-
countries(options).map {|c| c[0] }
|
95
|
-
end
|
96
|
-
|
97
|
-
# Returns the state name corresponding to the supplied state code within the default country
|
98
|
-
# Carmen::state_code('New Hampshire') => 'NH'
|
99
|
-
def self.state_name(state_code, country_code = Carmen.default_country, options={})
|
100
|
-
search_collection(self.states(country_code, options), state_code, 1, 0)
|
101
|
-
end
|
102
|
-
|
103
|
-
# Returns the state code corresponding to the supplied state name within the specified country
|
104
|
-
# Carmen::state_code('IL', 'US') => Illinois
|
105
|
-
def self.state_code(state_name, country_code = Carmen.default_country, options={})
|
106
|
-
search_collection(self.states(country_code, options), state_name, 0, 1)
|
107
|
-
end
|
108
|
-
|
109
|
-
# Returns an array of state names within the default code
|
110
|
-
# Carmen::state_names('US') => ['Alabama', 'Arkansas', ... ]
|
111
|
-
def self.state_names(country_code = Carmen.default_country, options={})
|
112
|
-
self.states(country_code, options).map{|name, code| name}
|
113
|
-
end
|
114
|
-
|
115
|
-
# Returns an array of state codes within the specified country code
|
116
|
-
# Carmen::state_codes('US') => ['AL', 'AR', ... ]
|
117
|
-
def self.state_codes(country_code = Carmen.default_country)
|
118
|
-
self.states(country_code).map{|name, code| code}
|
119
|
-
end
|
120
|
-
|
121
|
-
# Returns an array structure of state names and codes within the specified country code, or within the default country
|
122
|
-
# if none is provided.
|
123
|
-
# Carmen::states('US') => [['Alabama', 'AL'], ['Arkansas', 'AR'], ... ]
|
124
|
-
# Carmen::states => [['Alabama', 'AL'], ['Arkansas', 'AR'], ... ]
|
125
|
-
def self.states(country_code = Carmen.default_country, options={})
|
126
|
-
raise NonexistentCountry.new("Country not found for code #{country_code}") unless country_codes.include?(country_code)
|
127
|
-
raise StatesNotSupported unless states?(country_code)
|
128
|
-
|
129
|
-
results = search_collection(@states, country_code, 0, 1)
|
46
|
+
# Public: Clear the data_paths array.
|
47
|
+
# path - The String path to the data directory.
|
48
|
+
def clear_data_paths
|
49
|
+
World.instance.reset!
|
50
|
+
@data_paths = []
|
51
|
+
end
|
130
52
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
53
|
+
# Public: Reset the data_paths array to the defaults.
|
54
|
+
def reset_data_paths
|
55
|
+
clear_data_paths
|
56
|
+
append_data_path(root_path + 'iso_data')
|
135
57
|
end
|
136
|
-
end
|
137
58
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
def self.states?(country_code, options={})
|
142
|
-
@states.any? do |array| k,v = array
|
143
|
-
k == country_code
|
59
|
+
def reset_i18n_backend
|
60
|
+
locale_path = root_path + 'locale'
|
61
|
+
self.i18n_backend = Carmen::I18n::Simple.new(locale_path)
|
144
62
|
end
|
145
63
|
end
|
146
64
|
|
147
|
-
|
65
|
+
self.root_path = Pathname.new(__FILE__) + '../..'
|
66
|
+
|
67
|
+
self.reset_data_paths
|
68
|
+
self.reset_i18n_backend
|
148
69
|
|
149
|
-
def self.search_collection(collection, value, index_to_match, index_to_retrieve)
|
150
|
-
value = value.to_s
|
151
|
-
return nil if collection.nil? || value =~ /^\s*$/
|
152
|
-
collection.each do |m|
|
153
|
-
return m[index_to_retrieve] if m[index_to_match].downcase == value.downcase
|
154
|
-
end
|
155
|
-
# In case we didn't get any results we'll try a broader search (via Regexp)
|
156
|
-
collection.each do |m|
|
157
|
-
return m[index_to_retrieve] if m[index_to_match].downcase.match(Regexp.escape(value.downcase))
|
158
|
-
end
|
159
|
-
nil
|
160
|
-
end
|
161
70
|
end
|