egov_utils 0.2.9 → 0.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cea8f8ad01817ea166660171bf8ef27587fa743a37cedff9bc6618f88327344a
4
- data.tar.gz: 409abf0ab08682e6186d2d9a4481e1d7cd3e2fd9b457d8c30708ee48d2102502
3
+ metadata.gz: 58ff751d46cc886c5f297b1f76a80224491a7a3f69c4a113482b58a8d2d430c4
4
+ data.tar.gz: 567655c43e2ffd665f577fca56032f87ba55cc957cbc5ce5f39145d5ad0c58df
5
5
  SHA512:
6
- metadata.gz: 44abc56dc80945834b428077e40cb71855ddd4ee642e92334c787475b66c4ed187aeec3989e33f193f87b17295ea42190319285ae10f97a9246e20f4a1754cb9
7
- data.tar.gz: f76d4e1501e8886f44efb603d2d9679fd7225c0236aa157cc16b5d8b914fe6c4bf21c7ba1469c1574683e7371b87b2dac2eabbfb9a2fa9863a3fd90286f3f63d
6
+ metadata.gz: 7d24c4f7ae5188724b82eacdb57bf1d4a6875630acca3f994e1065022ed4b07e2d808c259dab576c1afb98cadb884839f7e8aef950e3d190b3643885dbd38645
7
+ data.tar.gz: b392d25023229cfbc3b56dd432b66a8dfe56a725f1ee99210aa8fa8e6b69733f8a006752466c2afa3be018e57a893ce1303852749d2a7decbeb137e42954c37b
@@ -3,6 +3,7 @@ module EgovUtils
3
3
  class AddressesController < ApplicationController
4
4
 
5
5
  def validate_ruian
6
+ require 'egon_gate'
6
7
  require 'egon_gate/egsb/messages/e37_vyhledej_adresu'
7
8
 
8
9
  # TODO: shoud be in some validator - external class
@@ -5,11 +5,31 @@ module EgovUtils
5
5
 
6
6
  validates :street, :city, length: 2..255
7
7
  validates :postcode, numericality: { only_integer: true }
8
- validates :district, inclusion: { in: :district_names }
9
- validates :region, inclusion: { in: :region_names }
8
+ with_options if: :in_czech_republic? do
9
+ validates :district, inclusion: { in: :district_names }
10
+ validates :region, inclusion: { in: :region_names }
11
+ end
12
+ with_options unless: :in_czech_republic? do
13
+ validates :district, inclusion: { in: :district_names }, allow_nil: true
14
+ validates :region, inclusion: { in: :region_names }, allow_nil: true
15
+ end
16
+ validates :country, inclusion: { in: :country_ids }, allow_nil: true
10
17
 
11
18
  District = Struct.new(:id, :name, :region_id)
12
19
  Region = Struct.new(:id, :name)
20
+ Country = Struct.new(:iso_id, :code2, :code3, :name)
21
+
22
+ CZ_ISO_CODE = '203'
23
+
24
+ def self.countries
25
+ return @countries if @countries
26
+ require 'csv'
27
+ @countries = []
28
+ CSV.foreach(EgovUtils::Engine.root.join('config', 'countries.csv'), col_sep: ';', headers: true) do |row|
29
+ @countries << Country.new( row[0], row[1], row[2], row[3]) if row[1]
30
+ end
31
+ @countries
32
+ end
13
33
 
14
34
  def self.districts
15
35
  return @districts if @districts
@@ -36,12 +56,19 @@ module EgovUtils
36
56
  regions.detect{|r| r[:id] == district[:region_id] } if district
37
57
  end
38
58
 
59
+ def in_czech_republic?
60
+ country == CZ_ISO_CODE || country.nil?
61
+ end
62
+
39
63
  def district_names
40
64
  self.class.districts.collect{|r| r[:name]}
41
65
  end
42
66
  def region_names
43
67
  self.class.regions.collect{|r| r[:name]}
44
68
  end
69
+ def country_ids
70
+ self.class.countries.collect{|r| r[:iso_id]}
71
+ end
45
72
 
46
73
 
47
74
  def district=(value)
@@ -10,46 +10,70 @@
10
10
  = form.text_field :city
11
11
  .col-12.col-sm-3
12
12
  = form.text_field :postcode
13
- .col-12.col-sm-6
14
- = form.select2 :district, EgovUtils::Address.districts.collect{|r| [r[:name],r[:name]]}
15
- .col-12.col-sm-6
16
- = form.select2 :region, EgovUtils::Address.regions.collect{|r| [r[:name],r[:name]]}
17
- -# form.text_field :country
13
+ .col-12.col-sm-6.district-fields
14
+ = form.select2 :district, EgovUtils::Address.districts.collect{|r| [r[:name],r[:name]]}, {}, class: 'district-select'
15
+ .col-12.col-sm-6.region-fields
16
+ = form.select2 :region, EgovUtils::Address.regions.collect{|r| [r[:name],r[:name]]}, {}, class: 'region-select'
17
+ .col-12
18
+ - form.object.country ||= EgovUtils::Address::CZ_ISO_CODE
19
+ = form.select2 :country, EgovUtils::Address.countries.collect{|c| [c[:name],c[:iso_id]]}, {}, class: 'country-select'
18
20
  .col-12
19
21
  %div.validation-button
20
22
  = link_to t('label_validate_address'), 'javascript:void(0)', class: 'btn btn-secondary address-validator-btn'
21
23
 
22
24
  :javascript
23
25
  $(function(){
24
- $('.address-validator-btn').not('.validator-initialized').on('click', function(evt) {
25
- var values = {},
26
- $fields = $(this).closest('.address-fields');
27
26
 
28
- $fields.find(':input').each(function(i){
29
- var name,
30
- name_m = $(this).attr('name').match(/\[([^\[]*)\]$/);
31
- name = name_m[1];
32
- values[name] = $(this).val();
33
- });
34
- $.ajax('#{egov_utils.validate_ruian_path}', {
35
- method: 'GET',
36
- dataType: 'json',
37
- data: {
38
- address: values
39
- }
40
- }).done(function(json){
41
- var field;
42
- for( var key in json ) {
43
- field = $fields.find("[name$='["+key+"]']");
44
- if( field.length !== 1 || !json[key] )
45
- continue;
46
- field.val(json[key]);
27
+ $('.address-fields').not('.inlinejs-initialized').each(function(){
28
+ var $fields = $(this);
29
+
30
+ $('.country-select', $fields).on('change', function(evt){
31
+ if($(this).val().toString() == '#{EgovUtils::Address::CZ_ISO_CODE}') {
32
+ $('.district-select', $fields).select2('enable');
33
+ $('.district-fields', $fields).show();
34
+ $('.region-select', $fields).select2('enable');
35
+ $('.region-fields', $fields).show();
36
+ } else {
37
+ $('.district-select', $fields).select2('enable', false);
38
+ $('.district-fields', $fields).hide();
39
+ $('.region-select', $fields).select2('enable', false);
40
+ $('.region-fields', $fields).hide();
47
41
  }
48
- }).fail(function(xhr, status, errorMsg){
49
- $('#modal').modal('hide');
50
- eGovUtilities.showModal(xhr.responseJSON.error, {modalId: 'modalAlert', backdrop: 'static'}).on('hidden.bs.modal', function(){
51
- $('#modal').modal('show');
42
+ })
43
+ window.setTimeout(function(){
44
+ $('.country-select', $fields).change();
45
+ }, 1500);
46
+
47
+ $('.address-validator-btn', $fields).on('click', function(evt) {
48
+ var values = {};
49
+
50
+ $fields.find(':input').each(function(i){
51
+ var name,
52
+ name_m = $(this).attr('name').match(/\[([^\[]*)\]$/);
53
+ name = name_m[1];
54
+ values[name] = $(this).val();
55
+ });
56
+ $.ajax('#{egov_utils.validate_ruian_path}', {
57
+ method: 'GET',
58
+ dataType: 'json',
59
+ data: {
60
+ address: values
61
+ }
62
+ }).done(function(json){
63
+ var field;
64
+ for( var key in json ) {
65
+ field = $fields.find("[name$='["+key+"]']");
66
+ if( field.length !== 1 || !json[key] )
67
+ continue;
68
+ field.val(json[key]);
69
+ }
70
+ }).fail(function(xhr, status, errorMsg){
71
+ $('#modal').modal('hide');
72
+ console.log(xhr);
73
+ eGovUtilities.showModal(errorMsg, {modalId: 'modalAlert', backdrop: 'static'}).on('hidden.bs.modal', function(){
74
+ $('#modal').modal('show');
75
+ });
52
76
  });
53
77
  });
54
- }).addClass('.validator-initialized');
78
+ }).addClass('.inlinejs-initialized');
55
79
  });
@@ -0,0 +1,250 @@
1
+ 004;AF;AFG;Afghánská islámská republika;Afghánistán;the Islamic Republic of Afghanistan;Afghanistan
2
+ 248;AX;ALA;Provincie Alandy;Alandy;Åland Islands;Åland Islands
3
+ 008;AL;ALB;Albánská republika;Albánie;the Republic of Albania;Albania
4
+ 012;DZ;DZA;Alžírská demokratická a lidová republika;Alžírsko;the People's Democratic Republic of Algeria;Algeria
5
+ 016;AS;ASM;Území Americká Samoa;Americká Samoa;American Samoa;American Samoa
6
+ 850;VI;VIR;Americké Panenské ostrovy;Americké Panenské ostrovy;the Virgin Islands of the United States;Virgin Islands (U.S.)
7
+ 020;AD;AND;Andorrské knížectví;Andorra;the Principality of Andorra;Andorra
8
+ 024;AO;AGO;Angolská republika;Angola;the Republic of Angola;Angola
9
+ 660;AI;AIA;Anguilla;Anguilla;Anguilla;Anguilla
10
+ 010;AQ;ATA;Antarktida;Antarktida;Antarctica;Antarctica
11
+ 028;AG;ATG;Antigua a Barbuda;Antigua a Barbuda;Antigua and Barbuda;Antigua and Barbuda
12
+ 032;AR;ARG;Argentinská republika;Argentina;the Argentine Republic;Argentina
13
+ 051;AM;ARM;Arménská republika;Arménie;the Republic of Armenia;Armenia
14
+ 533;AW;ABW;Aruba;Aruba;Aruba;Aruba
15
+ 036;AU;AUS;Australské společenství;Austrálie;Australia;Australia
16
+ 031;AZ;AZE;Ázerbájdžánská republika;Ázerbájdžán;the Republic of Azerbaijan;Azerbaijan
17
+ 044;BS;BHS;Bahamské společenství;Bahamy;the Commonwealth of The Bahamas;Bahamas (The)
18
+ 048;BH;BHR;Království Bahrajn;Bahrajn;the Kingdom of Bahrain;Bahrain
19
+ 050;BD;BGD;Bangladéšská lidová republika;Bangladéš;the People's Republic of Bangladesh;Bangladesh
20
+ 052;BB;BRB;Barbados;Barbados;Barbados;Barbados
21
+ 056;BE;BEL;Belgické království;Belgie;the Kingdom of Belgium;Belgium
22
+ 084;BZ;BLZ;Belize;Belize;Belize;Belize
23
+ 112;BY;BLR;Běloruská republika;Bělorusko;the Republic of Belarus;Belarus
24
+ 204;BJ;BEN;Beninská republika;Benin;the Republic of Benin;Benin
25
+ 060;BM;BMU;Bermudy;Bermudy;Bermuda;Bermuda
26
+ 064;BT;BTN;Bhútánské království;Bhútán;the Kingdom of Bhutan;Bhutan
27
+ 068;BO;BOL;Mnohonárodní stát Bolívie;Bolívie;the Plurinational State of Bolivia;Bolivia (Plurinational State of)
28
+ 535;BQ;BES;Bonaire, Svatý Eustach a Saba;Bonaire, Svatý Eustach a Saba;Bonaire, Sint Eustatius and Saba;Bonaire, Sint Eustatius and Saba
29
+ 070;BA;BIH;Bosna a Hercegovina;Bosna a Hercegovina;Bosnia and Herzegovina;Bosnia and Herzegovina
30
+ 072;BW;BWA;Botswanská republika;Botswana;the Republic of Botswana;Botswana
31
+ 074;BV;BVT;Bouvetův ostrov;Bouvetův ostrov;Bouvet Island;Bouvet Island
32
+ 076;BR;BRA;Brazilská federativní republika;Brazílie;the Federative Republic of Brazil;Brazil
33
+ 086;IO;IOT;Britské území v Indickém oceánu;Britské indickooceánské území;British Indian Ocean Territory (the);British Indian Ocean Territory (the)
34
+ 092;VG;VGB;Britské Panenské ostrovy;Britské Panenské ostrovy;British Virgin Islands (the);Virgin Islands (British)
35
+ 096;BN;BRN;Stát Brunej Darussalam;Brunej;Brunei Darussalam;Brunei Darussalam
36
+ 100;BG;BGR;Bulharská republika;Bulharsko;the Republic of Bulgaria;Bulgaria
37
+ 854;BF;BFA;Burkina Faso;Burkina Faso;Burkina Faso;Burkina Faso
38
+ 108;BI;BDI;Burundská republika;Burundi;the Republic of Burundi;Burundi
39
+ 184;CK;COK;Cookovy ostrovy;Cookovy ostrovy;Cook Islands (the);Cook Islands (the)
40
+ 531;CW;CUW;Curaçao;Curaçao;Curaçao;Curaçao
41
+ 148;TD;TCD;Čadská republika;Čad;the Republic of Chad;Chad
42
+ 499;ME;MNE;Černá Hora;Černá Hora;Montenegro;Montenegro
43
+ 203;CZ;CZE;Česká republika;Česko;the Czech Republic;Czechia
44
+ 156;CN;CHN;Čínská lidová republika;Čína;the People's Republic of China;China
45
+ 208;DK;DNK;Dánské království;Dánsko;the Kingdom of Denmark;Denmark
46
+ 180;CD;COD;Demokratická republika Kongo;Demokratická republika Kongo;the Democratic Republic of the Congo;Congo (the Democratic Republic of the)
47
+ 212;DM;DMA;Dominické společenství;Dominika;the Commonwealth of Dominica;Dominica
48
+ 214;DO;DOM;Dominikánská republika;Dominikánská republika;the Dominican Republic;Dominican Republic (the)
49
+ 262;DJ;DJI;Džibutská republika;Džibutsko;the Republic of Djibouti;Djibouti
50
+ 818;EG;EGY;Egyptská arabská republika;Egypt;the Arab Republic of Egypt;Egypt
51
+ 218;EC;ECU;Ekvádorská republika;Ekvádor;the Republic of Ecuador;Ecuador
52
+ 232;ER;ERI;Stát Eritrea;Eritrea;the State of Eritrea;Eritrea
53
+ 233;EE;EST;Estonská republika;Estonsko;the Republic of Estonia;Estonia
54
+ 231;ET;ETH;Etiopská federativní demokratická republika;Etiopie;the Federal Democratic Republic of Ethiopia;Ethiopia
55
+ 234;FO;FRO;Faerské ostrovy;Faerské ostrovy;Faroe Islands (the);Faroe Islands (the)
56
+ 238;FK;FLK;Falklandské ostrovy;Falklandy;Falkland Islands (the) (Malvinas);Falkland Islands (the) (Malvinas)
57
+ 242;FJ;FJI;Fidžijská republika;Fidži;the Republic of Fiji;Fiji
58
+ 608;PH;PHL;Filipínská republika;Filipíny;the Republic of the Philippines;Philippines (the)
59
+ 246;FI;FIN;Finská republika;Finsko;the Republic of Finland;Finland
60
+ 250;FR;FRA;Francouzská republika;Francie;the French Republic;France
61
+ 254;GF;GUF;Region Francouzská Guyana;Francouzská Guyana;French Guiana;French Guiana
62
+ 260;TF;ATF;Teritorium Francouzská jižní a antarktická území;Francouzská jižní a antarktická území;French Southern Territories (the);French Southern Territories (the)
63
+ 258;PF;PYF;Francouzská Polynésie;Francouzská Polynésie;French Polynesia;French Polynesia
64
+ 266;GA;GAB;Gabonská republika;Gabon;the Gabonese Republic;Gabon
65
+ 270;GM;GMB;Gambijská republika;Gambie;the Islamic Republic of the Gambia;Gambia (the)
66
+ 288;GH;GHA;Ghanská republika;Ghana;the Republic of Ghana;Ghana
67
+ 292;GI;GIB;Gibraltar;Gibraltar;Gibraltar;Gibraltar
68
+ 308;GD;GRD;Grenadský stát;Grenada;Grenada;Grenada
69
+ 304;GL;GRL;Grónsko;Grónsko;Greenland;Greenland
70
+ 268;GE;GEO;Gruzie;Gruzie;Georgia;Georgia
71
+ 312;GP;GLP;Region Guadeloupe;Guadeloupe;Guadeloupe;Guadeloupe
72
+ 316;GU;GUM;Teritorium Guam;Guam;Guam;Guam
73
+ 320;GT;GTM;Guatemalská republika;Guatemala;the Republic of Guatemala;Guatemala
74
+ 831;GG;GGY;Bailiwick Guernsey;Guernsey;Guernsey;Guernsey
75
+ 324;GN;GIN;Guinejská republika;Guinea;the Republic of Guinea;Guinea
76
+ 624;GW;GNB;Republika Guinea-Bissau;Guinea-Bissau;the Republic of Guinea-Bissau;Guinea-Bissau
77
+ 328;GY;GUY;Guyanská kooperativní republika;Guyana;the Republic of Guyana;Guyana
78
+ 332;HT;HTI;Republika Haiti;Haiti;the Republic of Haiti;Haiti
79
+ 334;HM;HMD;Heardův ostrov a MacDonaldovy ostrovy;Heardův ostrov a MacDonaldovy ostrovy;Heard Island and McDonald Islands;Heard Island and McDonald Islands
80
+ 340;HN;HND;Honduraská republika;Honduras;the Republic of Honduras;Honduras
81
+ 344;HK;HKG;Zvláštní administrativní oblast Čínské lidové republiky Hongkong;Hongkong;the Hong Kong Special Administrative Region of China;Hong Kong
82
+ 152;CL;CHL;Chilská republika;Chile;the Republic of Chile;Chile
83
+ 191;HR;HRV;Chorvatská republika;Chorvatsko;the Republic of Croatia;Croatia
84
+ 356;IN;IND;Indická republika;Indie;the Republic of India;India
85
+ 360;ID;IDN;Indonéská republika;Indonésie;the Republic of Indonesia;Indonesia
86
+ 368;IQ;IRQ;Irácká republika;Irák;the Republic of Iraq;Iraq
87
+ 364;IR;IRN;Íránská islámská republika;Írán;the Islamic Republic of Iran;Iran (Islamic Republic of)
88
+ 372;IE;IRL;Irsko;Irsko;Ireland;Ireland
89
+ 352;IS;ISL;Islandská republika;Island;the Republic of Iceland;Iceland
90
+ 380;IT;ITA;Italská republika;Itálie;the Republic of Italy;Italy
91
+ 376;IL;ISR;Stát Izrael;Izrael;the State of Israel;Israel
92
+ 388;JM;JAM;Jamajka;Jamajka;Jamaica;Jamaica
93
+ 392;JP;JPN;Japonsko;Japonsko;Japan;Japan
94
+ 887;YE;YEM;Jemenská republika;Jemen;the Republic of Yemen;Yemen
95
+ 832;JE;JEY;Bailiwick Jersey;Jersey;Jersey;Jersey
96
+ 710;ZA;ZAF;Jihoafrická republika;Jižní Afrika;the Republic of South Africa;South Africa
97
+ 239;GS;SGS;Jižní Georgie a Jižní Sandwichovy ostrovy;Jižní Georgie a Jižní Sandwichovy ostrovy;South Georgia and the South Sandwich Islands;South Georgia and the South Sandwich Islands
98
+ 728;SS;SSD;Jihosúdánská republika;Jižní Súdán;the Republic of South Sudan;South Sudan
99
+ 400;JO;JOR;Jordánské hášimovské království;Jordánsko;the Hashemite Kingdom of Jordan;Jordan
100
+ 136;KY;CYM;Kajmanské ostrovy;Kajmanské ostrovy;Cayman Islands (the);Cayman Islands (the)
101
+ 116;KH;KHM;Kambodžské království;Kambodža;the Kingdom of Cambodia;Cambodia
102
+ 120;CM;CMR;Kamerunská republika;Kamerun;the Republic of Cameroon;Cameroon
103
+ 124;CA;CAN;Kanada;Kanada;Canada;Canada
104
+ 132;CV;CPV;Kapverdská republika;Kapverdy;the Republic of Cape Verde;Cape Verde
105
+ 634;QA;QAT;Stát Katar;Katar;the State of Qatar;Qatar
106
+ 398;KZ;KAZ;Republika Kazachstán;Kazachstán;the Republic of Kazakhstan;Kazakhstan
107
+ 404;KE;KEN;Keňská republika;Keňa;the Republic of Kenya;Kenya
108
+ 296;KI;KIR;Republika Kiribati;Kiribati;the Republic of Kiribati;Kiribati
109
+ 166;CC;CCK;Území Kokosové (Keelingovy) ostrovy;Kokosové (Keelingovy) ostrovy;Cocos (Keeling) Islands (the);Cocos (Keeling) Islands (the)
110
+ 170;CO;COL;Kolumbijská republika;Kolumbie;the Republic of Colombia;Colombia
111
+ 174;KM;COM;Komorský svaz;Komory;the Union of the Comoros;Comoros (the)
112
+ 178;CG;COG;Konžská republika;Konžská republika;the Republic of the Congo;Congo (the)
113
+ 408;KP;PRK;Korejská lidově demokratická republika;Korejská lidově demokratická republika;the Democratic People's Republic of Korea;Korea (the Democratic People's Republic of)
114
+ 410;KR;KOR;Korejská republika;Korejská republika;the Republic of Korea;Korea (the Republic of)
115
+ 095;XK;XXK;Kosovská republika;Kosovo;;
116
+ 188;CR;CRI;Kostarická republika;Kostarika;the Republic of Costa Rica;Costa Rica
117
+ 192;CU;CUB;Kubánská republika;Kuba;the Republic of Cuba;Cuba
118
+ 414;KW;KWT;Kuvajtský stát;Kuvajt;the State of Kuwait;Kuwait
119
+ 196;CY;CYP;Kyperská republika;Kypr;the Republic of Cyprus;Cyprus
120
+ 417;KG;KGZ;Kyrgyzská republika;Kyrgyzstán;the Kyrgyz Republic;Kyrgyzstan
121
+ 418;LA;LAO;Laoská lidově demokratická republika;Laos;the Lao People's Democratic Republic;Lao People's Democratic Republic (the)
122
+ 426;LS;LSO;Lesothské království;Lesotho;the Kingdom of Lesotho;Lesotho
123
+ 422;LB;LBN;Libanonská republika;Libanon;the Lebanese Republic;Lebanon
124
+ 430;LR;LBR;Liberijská republika;Libérie;the Republic of Liberia;Liberia
125
+ 434;LY;LBY;Libyjský stát;Libye;Libya;Libya
126
+ 438;LI;LIE;Lichtenštejnské knížectví;Lichtenštejnsko;the Principality of Liechtenstein;Liechtenstein
127
+ 440;LT;LTU;Litevská republika;Litva;the Republic of Lithuania;Lithuania
128
+ 428;LV;LVA;Lotyšská republika;Lotyšsko;the Republic of Latvia;Latvia
129
+ 442;LU;LUX;Lucemburské velkovévodství;Lucembursko;the Grand Duchy of Luxembourg;Luxembourg
130
+ 446;MO;MAC;Zvláštní administrativní oblast Čínské lidové republiky Macao;Macao;Macao Special Administrative Region of China;Macao
131
+ 450;MG;MDG;Madagaskarská republika;Madagaskar;the Republic of Madagascar;Madagascar
132
+ 348;HU;HUN;Maďarsko;Maďarsko;Hungary;Hungary
133
+ 807;MK;MKD;Bývalá jugoslávská republika Makedonie;Makedonie;the former Yugoslav Republic of Macedonia;Macedonia (the former Yugoslav Republic of)
134
+ 458;MY;MYS;Malajsie;Malajsie;Malaysia;Malaysia
135
+ 454;MW;MWI;Malawiská republika;Malawi;the Republic of Malawi;Malawi
136
+ 462;MV;MDV;Maledivská republika;Maledivy;the Republic of Maldives;Maldives
137
+ 466;ML;MLI;Republika Mali;Mali;the Republic of Mali;Mali
138
+ 470;MT;MLT;Maltská republika;Malta;the Republic of Malta;Malta
139
+ 833;IM;IMN;Ostrov Man;Man;Isle of Man;Isle of Man
140
+ 504;MA;MAR;Marocké království;Maroko;the Kingdom of Morocco;Morocco
141
+ 584;MH;MHL;Republika Marshallovy ostrovy;Marshallovy ostrovy;the Republic of the Marshall Islands;Marshall Islands (the)
142
+ 474;MQ;MTQ;Region Martinik;Martinik;Martinique;Martinique
143
+ 480;MU;MUS;Mauricijská republika;Mauricius;the Republic of Mauritius;Mauritius
144
+ 478;MR;MRT;Mauritánská islámská republika;Mauritánie;the Islamic Republic of Mauritania;Mauritania
145
+ 175;YT;MYT;Departementní společenství Mayotte;Mayotte;Mayotte;Mayotte
146
+ 581;UM;UMI;Menší odlehlé ostrovy USA;Menší odlehlé ostrovy USA;United States Minor Outlying Islands (the);United States Minor Outlying Islands (the)
147
+ 484;MX;MEX;Spojené státy mexické;Mexiko;the United Mexican States;Mexico
148
+ 583;FM;FSM;Federativní státy Mikronésie;Mikronésie;the Federated States of Micronesia;Micronesia (Federated States of)
149
+ 498;MD;MDA;Moldavská republika;Moldavsko;the Republic of Moldova;Moldova (the Republic of)
150
+ 492;MC;MCO;Monacké knížectví;Monako;the Principality of Monaco;Monaco
151
+ 496;MN;MNG;Mongolsko;Mongolsko;Mongolia;Mongolia
152
+ 500;MS;MSR;Montserrat;Montserrat;Montserrat;Montserrat
153
+ 508;MZ;MOZ;Mosambická republika;Mosambik;the Republic of Mozambique;Mozambique
154
+ 104;MM;MMR;Republika Myanmarský svaz;Myanmar;the Republic of the Union of Myanmar;Myanmar
155
+ 516;NA;NAM;Namibijská republika;Namibie;the Republic of Namibia;Namibia
156
+ 520;NR;NRU;Republika Nauru;Nauru;the Republic of Nauru;Nauru
157
+ 276;DE;DEU;Spolková republika Německo;Německo;the Federal Republic of Germany;Germany
158
+ 524;NP;NPL;Nepálská federativní demokratická republika;Nepál;the Federal Democratic Republic of Nepal;Nepal
159
+ 562;NE;NER;Nigerská republika;Niger;the Republic of the Niger;Niger (the)
160
+ 566;NG;NGA;Nigerijská federativní republika;Nigérie;the Federal Republic of Nigeria;Nigeria
161
+ 558;NI;NIC;Nikaragujská republika;Nikaragua;the Republic of Nicaragua;Nicaragua
162
+ 570;NU;NIU;Niue;Niue;Niue;Niue
163
+ 528;NL;NLD;Nizozemsko;Nizozemsko;the Kingdom of the Netherlands;Netherlands (the)
164
+ 574;NF;NFK;Území Norfolk;Norfolk;Norfolk Island;Norfolk Island
165
+ 578;NO;NOR;Norské království;Norsko;the Kingdom of Norway;Norway
166
+ 540;NC;NCL;Nová Kaledonie;Nová Kaledonie;New Caledonia;New Caledonia
167
+ 554;NZ;NZL;Nový Zéland;Nový Zéland;New Zealand;New Zealand
168
+ 512;OM;OMN;Sultanát Omán;Omán;the Sultanate of Oman;Oman
169
+ 586;PK;PAK;Pákistánská islámská republika;Pákistán;the Islamic Republic of Pakistan;Pakistan
170
+ 585;PW;PLW;Republika Palau;Palau;the Republic of Palau;Palau
171
+ 275;PS;PSE;Palestinská autonomní území;Palestina;the State of Palestine;Palestine, State of
172
+ 591;PA;PAN;Panamská republika;Panama;the Republic of Panama;Panama
173
+ 598;PG;PNG;Nezávislý stát Papua Nová Guinea;Papua Nová Guinea;the Independent State of Papua New Guinea;Papua New Guinea
174
+ 600;PY;PRY;Paraguayská republika;Paraguay;the Republic of Paraguay;Paraguay
175
+ 604;PE;PER;Peruánská republika;Peru;the Republic of Peru;Peru
176
+ 612;PN;PCN;Pitcairnovy ostrovy;Pitcairn;Pitcairn;Pitcairn
177
+ 384;CI;CIV;Republika Pobřeží slonoviny;Pobřeží slonoviny;the Republic of Côte d'Ivoire;Côte d'Ivoire
178
+ 616;PL;POL;Polská republika;Polsko;the Republic of Poland;Poland
179
+ 630;PR;PRI;Portorické společenství;Portoriko;Puerto Rico;Puerto Rico
180
+ 620;PT;PRT;Portugalská republika;Portugalsko;the Portuguese Republic;Portugal
181
+ 040;AT;AUT;Rakouská republika;Rakousko;the Republic of Austria;Austria
182
+ 638;RE;REU;Region Réunion;Réunion;Réunion;Réunion
183
+ 226;GQ;GNQ;Republika Rovníková Guinea;Rovníková Guinea;the Republic of Equatorial Guinea;Equatorial Guinea
184
+ 642;RO;ROU;Rumunsko;Rumunsko;Romania;Romania
185
+ 643;RU;RUS;Ruská federace;Rusko;the Russian Federation;Russian Federation (the)
186
+ 646;RW;RWA;Rwandská republika;Rwanda;the Republic of Rwanda;Rwanda
187
+ 300;GR;GRC;Řecká republika;Řecko;the Hellenic Republic;Greece
188
+ 666;PM;SPM;Územní společenství Saint Pierre a Miquelon;Saint Pierre a Miquelon;Saint Pierre and Miquelon;Saint Pierre and Miquelon
189
+ 222;SV;SLV;Salvadorská republika;Salvador;the Republic of El Salvador;El Salvador
190
+ 882;WS;WSM;Nezávislý stát Samoa;Samoa;the Independent State of Samoa;Samoa
191
+ 674;SM;SMR;Republika San Marino;San Marino;the Republic of San Marino;San Marino
192
+ 682;SA;SAU;Království Saúdská Arábie;Saúdská Arábie;the Kingdom of Saudi Arabia;Saudi Arabia
193
+ 686;SN;SEN;Senegalská republika;Senegal;the Republic of Senegal;Senegal
194
+ 580;MP;MNP;Společenství Severní Mariany;Severní Mariany;the Commonwealth of the Northern Mariana Islands;Northern Mariana Islands (the)
195
+ 690;SC;SYC;Seychelská republika;Seychely;the Republic of Seychelles;Seychelles
196
+ 694;SL;SLE;Republika Sierra Leone;Sierra Leone;the Republic of Sierra Leone;Sierra Leone
197
+ 702;SG;SGP;Singapurská republika;Singapur;the Republic of Singapore;Singapore
198
+ 703;SK;SVK;Slovenská republika;Slovensko;the Slovak Republic;Slovakia
199
+ 705;SI;SVN;Slovinská republika;Slovinsko;the Republic of Slovenia;Slovenia
200
+ 706;SO;SOM;Somálská federativní republika;Somálsko;the Federal Republic of Somalia;Somalia
201
+ 784;AE;ARE;Stát Spojené arabské emiráty;Spojené arabské emiráty;the United Arab Emirates;United Arab Emirates (the)
202
+ 840;US;USA;Spojené státy americké;Spojené státy;the United States of America;United States of America (the)
203
+ 688;RS;SRB;Srbská republika;Srbsko;the Republic of Serbia;Serbia
204
+ 140;CF;CAF;Středoafrická republika;Středoafrická republika;the Central African Republic;Central African Republic (the)
205
+ 729;SD;SDN;Súdánská republika;Súdán;the Republic of the Sudan;Sudan (the)
206
+ 740;SR;SUR;Surinamská republika;Surinam;the Republic of Suriname;Suriname
207
+ 654;SH;SHN;Svatá Helena, Ascension a Tristan da Cunha;Svatá Helena;Saint Helena, Ascension and Tristan da Cunha;Saint Helena, Ascension and Tristan da Cunha
208
+ 662;LC;LCA;Svatá Lucie;Svatá Lucie;Saint Lucia;Saint Lucia
209
+ 652;BL;BLM;Společenství Svatý Bartoloměj;Svatý Bartoloměj;Saint Barthélemy;Saint Barthélemy
210
+ 659;KN;KNA;Federace Svatý Kryštof a Nevis;Svatý Kryštof a Nevis;Saint Kitts and Nevis;Saint Kitts and Nevis
211
+ 663;MF;MAF;Společenství Svatý Martin;Svatý Martin (FR);Saint Martin (French part);Saint Martin (French part)
212
+ 534;SX;SXM;Svatý Martin (NL);Svatý Martin (NL);Sint Maarten (Dutch part);Sint Maarten (Dutch part)
213
+ 678;ST;STP;Demokratická republika Svatý Tomᚠa Princův ostrov;Svatý Tomᚠa Princův ostrov;the Democratic Republic of Sao Tome and Principe;Sao Tome and Principe
214
+ 670;VC;VCT;Svatý Vincenc a Grenadiny;Svatý Vincenc a Grenadiny;Saint Vincent and the Grenadines;Saint Vincent and the Grenadines
215
+ 748;SZ;SWZ;Svazijské království;Svazijsko;the Kingdom of Swaziland;Swaziland
216
+ 760;SY;SYR;Syrská arabská republika;Sýrie;the Syrian Arab Republic;Syrian Arab Republic
217
+ 090;SB;SLB;Šalomounovy ostrovy;Šalomounovy ostrovy;Solomon Islands (the);Solomon Islands
218
+ 724;ES;ESP;Španělské království;Španělsko;the Kingdom of Spain;Spain
219
+ 744;SJ;SJM;Špicberky a Jan Mayen;Špicberky a Jan Mayen;Svalbard and Jan Mayen;Svalbard and Jan Mayen
220
+ 144;LK;LKA;Šrílanská demokratická socialistická republika;Šrí Lanka;the Democratic Socialist Republic of Sri Lanka;Sri Lanka
221
+ 752;SE;SWE;Švédské království;Švédsko;the Kingdom of Sweden;Sweden
222
+ 756;CH;CHE;Švýcarská konfederace;Švýcarsko;the Swiss Confederation;Switzerland
223
+ 762;TJ;TJK;Republika Tádžikistán;Tádžikistán;the Republic of Tajikistan;Tajikistan
224
+ 834;TZ;TZA;Tanzanská sjednocená republika;Tanzanie;the United Republic of Tanzania;Tanzania, United Republic of
225
+ 764;TH;THA;Thajské království;Thajsko;the Kingdom of Thailand;Thailand
226
+ 158;TW;TWN;Čínská republika (Tchaj-wan);Tchaj-wan;Taiwan (Province of China);Taiwan (Province of China)
227
+ 768;TG;TGO;Tožská republika;Togo;the Togolese Republic;Togo
228
+ 772;TK;TKL;Tokelau;Tokelau;Tokelau;Tokelau
229
+ 776;TO;TON;Království Tonga;Tonga;the Kingdom of Tonga;Tonga
230
+ 780;TT;TTO;Republika Trinidad a Tobago;Trinidad a Tobago;the Republic of Trinidad and Tobago;Trinidad and Tobago
231
+ 788;TN;TUN;Tuniská republika;Tunisko;the Republic of Tunisia;Tunisia
232
+ 792;TR;TUR;Turecká republika;Turecko;the Republic of Turkey;Turkey
233
+ 795;TM;TKM;Turkmenistán;Turkmenistán;Turkmenistan;Turkmenistan
234
+ 796;TC;TCA;Ostrovy Turks a Caicos;Turks a Caicos;Turks and Caicos Islands (the);Turks and Caicos Islands (the)
235
+ 798;TV;TUV;Tuvalu;Tuvalu;Tuvalu;Tuvalu
236
+ 800;UG;UGA;Ugandská republika;Uganda;the Republic of Uganda;Uganda
237
+ 804;UA;UKR;Ukrajina;Ukrajina;Ukraine;Ukraine
238
+ 858;UY;URY;Uruguayská východní republika;Uruguay;the Eastern Republic of Uruguay;Uruguay
239
+ 860;UZ;UZB;Republika Uzbekistán;Uzbekistán;the Republic of Uzbekistan;Uzbekistan
240
+ 162;CX;CXR;Území Vánoční ostrov;Vánoční ostrov;Christmas Island;Christmas Island
241
+ 548;VU;VUT;Republika Vanuatu;Vanuatu;the Republic of Vanuatu;Vanuatu
242
+ 336;VA;VAT;Vatikánský městský stát;Vatikán;Holy See (the) (Vatican City State);Holy See (the)
243
+ 826;GB;GBR;Spojené království Velké Británie a Severního Irska;Velká Británie;the United Kingdom of Great Britain and Northern Ireland;United Kingdom of Great Britain and Northern Ireland (the)
244
+ 862;VE;VEN;Bolívarovská republika Venezuela;Venezuela;the Bolivarian Republic of Venezuela;Venezuela (Bolivarian Republic of)
245
+ 704;VN;VNM;Vietnamská socialistická republika;Vietnam;the Socialist Republic of Viet Nam;Viet Nam
246
+ 626;TL;TLS;Demokratická republika Východní Timor;Východní Timor;the Democratic Republic of Timor-Leste;Timor-Leste
247
+ 876;WF;WLF;Teritorium Wallisovy ostrovy a Futuna;Wallis a Futuna;Wallis and Futuna Islands;Wallis and Futuna
248
+ 894;ZM;ZMB;Zambijská republika;Zambie;the Republic of Zambia;Zambia
249
+ 732;EH;ESH;Saharská arabská demokratická republika;Západní Sahara;Western Sahara;Western Sahara
250
+ 716;ZW;ZWE;Zimbabwská republika;Zimbabwe;the Republic of Zimbabwe;Zimbabwe
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.2.9'
2
+ VERSION = '0.2.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-13 00:00:00.000000000 Z
11
+ date: 2018-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -457,6 +457,7 @@ files:
457
457
  - app/views/layouts/egov_utils/application.html.erb
458
458
  - app/views/layouts/egov_utils/mailer.html.erb
459
459
  - app/views/layouts/egov_utils/mailer.text.erb
460
+ - config/countries.csv
460
461
  - config/kraj.csv
461
462
  - config/locales/cs.yml
462
463
  - config/okres.csv