From 0e308f63504f112941b1324b84138dafe6d545d9 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Thu, 24 Sep 2020 12:50:15 +0100 Subject: [PATCH] Prepare seed data for bye bye spree --- db/default/countries.rb | 230 +++++ db/default/spree/countries.yml | 1360 ----------------------------- db/default/{spree => }/states.yml | 0 db/default/zones.rb | 15 + db/seeds.rb | 26 +- 5 files changed, 257 insertions(+), 1374 deletions(-) create mode 100644 db/default/countries.rb delete mode 100644 db/default/spree/countries.yml rename db/default/{spree => }/states.yml (100%) create mode 100644 db/default/zones.rb diff --git a/db/default/countries.rb b/db/default/countries.rb new file mode 100644 index 00000000000..8e96d47f4f1 --- /dev/null +++ b/db/default/countries.rb @@ -0,0 +1,230 @@ +Spree::Country.create!([ + { name: "Chad", iso3: "TCD", iso: "TD", iso_name: "CHAD", numcode: "148" }, + { name: "Faroe Islands", iso3: "FRO", iso: "FO", iso_name: "FAROE ISLANDS", numcode: "234" }, + { name: "India", iso3: "IND", iso: "IN", iso_name: "INDIA", numcode: "356" }, + { name: "Nicaragua", iso3: "NIC", iso: "NI", iso_name: "NICARAGUA", numcode: "558" }, + { name: "Saint Lucia", iso3: "LCA", iso: "LC", iso_name: "SAINT LUCIA", numcode: "662" }, + { name: "Fiji", iso3: "FJI", iso: "FJ", iso_name: "FIJI", numcode: "242" }, + { name: "Indonesia", iso3: "IDN", iso: "ID", iso_name: "INDONESIA", numcode: "360" }, + { name: "Niger", iso3: "NER", iso: "NE", iso_name: "NIGER", numcode: "562" }, + { name: "Saint Pierre and Miquelon", iso3: "SPM", iso: "PM", iso_name: "SAINT PIERRE AND MIQUELON", numcode: "666" }, + { name: "Finland", iso3: "FIN", iso: "FI", iso_name: "FINLAND", numcode: "246" }, + { name: "Nigeria", iso3: "NGA", iso: "NG", iso_name: "NIGERIA", numcode: "566" }, + { name: "Saint Vincent and the Grenadines", iso3: "VCT", iso: "VC", iso_name: "SAINT VINCENT AND THE GRENADINES", numcode: "670" }, + { name: "France", iso3: "FRA", iso: "FR", iso_name: "FRANCE", numcode: "250" }, + { name: "Iran, Islamic Republic of", iso3: "IRN", iso: "IR", iso_name: "IRAN, ISLAMIC REPUBLIC OF", numcode: "364" }, + { name: "Niue", iso3: "NIU", iso: "NU", iso_name: "NIUE", numcode: "570" }, + { name: "Samoa", iso3: "WSM", iso: "WS", iso_name: "SAMOA", numcode: "882" }, + { name: "French Guiana", iso3: "GUF", iso: "GF", iso_name: "FRENCH GUIANA", numcode: "254" }, + { name: "Iraq", iso3: "IRQ", iso: "IQ", iso_name: "IRAQ", numcode: "368" }, + { name: "San Marino", iso3: "SMR", iso: "SM", iso_name: "SAN MARINO", numcode: "674" }, + { name: "Ireland", iso3: "IRL", iso: "IE", iso_name: "IRELAND", numcode: "372" }, + { name: "Sao Tome and Principe", iso3: "STP", iso: "ST", iso_name: "SAO TOME AND PRINCIPE", numcode: "678" }, + { name: "Israel", iso3: "ISR", iso: "IL", iso_name: "ISRAEL", numcode: "376" }, + { name: "Saudi Arabia", iso3: "SAU", iso: "SA", iso_name: "SAUDI ARABIA", numcode: "682" }, + { name: "Italy", iso3: "ITA", iso: "IT", iso_name: "ITALY", numcode: "380" }, + { name: "Senegal", iso3: "SEN", iso: "SN", iso_name: "SENEGAL", numcode: "686" }, + { name: "Jamaica", iso3: "JAM", iso: "JM", iso_name: "JAMAICA", numcode: "388" }, + { name: "Japan", iso3: "JPN", iso: "JP", iso_name: "JAPAN", numcode: "392" }, + { name: "Jordan", iso3: "JOR", iso: "JO", iso_name: "JORDAN", numcode: "400" }, + { name: "Belgium", iso3: "BEL", iso: "BE", iso_name: "BELGIUM", numcode: "56" }, + { name: "Belize", iso3: "BLZ", iso: "BZ", iso_name: "BELIZE", numcode: "84" }, + { name: "Kazakhstan", iso3: "KAZ", iso: "KZ", iso_name: "KAZAKHSTAN", numcode: "398" }, + { name: "Uganda", iso3: "UGA", iso: "UG", iso_name: "UGANDA", numcode: "800" }, + { name: "Benin", iso3: "BEN", iso: "BJ", iso_name: "BENIN", numcode: "204" }, + { name: "Kenya", iso3: "KEN", iso: "KE", iso_name: "KENYA", numcode: "404" }, + { name: "Ukraine", iso3: "UKR", iso: "UA", iso_name: "UKRAINE", numcode: "804" }, + { name: "Bermuda", iso3: "BMU", iso: "BM", iso_name: "BERMUDA", numcode: "60" }, + { name: "Kiribati", iso3: "KIR", iso: "KI", iso_name: "KIRIBATI", numcode: "296" }, + { name: "Mexico", iso3: "MEX", iso: "MX", iso_name: "MEXICO", numcode: "484" }, + { name: "United Arab Emirates", iso3: "ARE", iso: "AE", iso_name: "UNITED ARAB EMIRATES", numcode: "784" }, + { name: "Bhutan", iso3: "BTN", iso: "BT", iso_name: "BHUTAN", numcode: "64" }, + { name: "Cuba", iso3: "CUB", iso: "CU", iso_name: "CUBA", numcode: "192" }, + { name: "North Korea", iso3: "PRK", iso: "KP", iso_name: "KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF", numcode: "408" }, + { name: "Micronesia, Federated States of", iso3: "FSM", iso: "FM", iso_name: "MICRONESIA, FEDERATED STATES OF", numcode: "583" }, + { name: "United Kingdom", iso3: "GBR", iso: "GB", iso_name: "UNITED KINGDOM", numcode: "826" }, + { name: "Bolivia", iso3: "BOL", iso: "BO", iso_name: "BOLIVIA", numcode: "68" }, + { name: "Cyprus", iso3: "CYP", iso: "CY", iso_name: "CYPRUS", numcode: "196" }, + { name: "South Korea", iso3: "KOR", iso: "KR", iso_name: "KOREA, REPUBLIC OF", numcode: "410" }, + { name: "Moldova, Republic of", iso3: "MDA", iso: "MD", iso_name: "MOLDOVA, REPUBLIC OF", numcode: "498" }, + { name: "United States", iso3: "USA", iso: "US", iso_name: "UNITED STATES", numcode: "840" }, + { name: "Bosnia and Herzegovina", iso3: "BIH", iso: "BA", iso_name: "BOSNIA AND HERZEGOVINA", numcode: "70" }, + { name: "Czech Republic", iso3: "CZE", iso: "CZ", iso_name: "CZECH REPUBLIC", numcode: "203" }, + { name: "Kuwait", iso3: "KWT", iso: "KW", iso_name: "KUWAIT", numcode: "414" }, + { name: "Monaco", iso3: "MCO", iso: "MC", iso_name: "MONACO", numcode: "492" }, + { name: "Uruguay", iso3: "URY", iso: "UY", iso_name: "URUGUAY", numcode: "858" }, + { name: "Botswana", iso3: "BWA", iso: "BW", iso_name: "BOTSWANA", numcode: "72" }, + { name: "Denmark", iso3: "DNK", iso: "DK", iso_name: "DENMARK", numcode: "208" }, + { name: "Guadeloupe", iso3: "GLP", iso: "GP", iso_name: "GUADELOUPE", numcode: "312" }, + { name: "Kyrgyzstan", iso3: "KGZ", iso: "KG", iso_name: "KYRGYZSTAN", numcode: "417" }, + { name: "Mongolia", iso3: "MNG", iso: "MN", iso_name: "MONGOLIA", numcode: "496" }, + { name: "Philippines", iso3: "PHL", iso: "PH", iso_name: "PHILIPPINES", numcode: "608" }, + { name: "Brazil", iso3: "BRA", iso: "BR", iso_name: "BRAZIL", numcode: "76" }, + { name: "Djibouti", iso3: "DJI", iso: "DJ", iso_name: "DJIBOUTI", numcode: "262" }, + { name: "Guam", iso3: "GUM", iso: "GU", iso_name: "GUAM", numcode: "316" }, + { name: "Lao People's Democratic Republic", iso3: "LAO", iso: "LA", iso_name: "LAO PEOPLE'S DEMOCRATIC REPUBLIC", numcode: "418" }, + { name: "Montserrat", iso3: "MSR", iso: "MS", iso_name: "MONTSERRAT", numcode: "500" }, + { name: "Pitcairn", iso3: "PCN", iso: "PN", iso_name: "PITCAIRN", numcode: "612" }, + { name: "Uzbekistan", iso3: "UZB", iso: "UZ", iso_name: "UZBEKISTAN", numcode: "860" }, + { name: "Brunei Darussalam", iso3: "BRN", iso: "BN", iso_name: "BRUNEI DARUSSALAM", numcode: "96" }, + { name: "Dominica", iso3: "DMA", iso: "DM", iso_name: "DOMINICA", numcode: "212" }, + { name: "Guatemala", iso3: "GTM", iso: "GT", iso_name: "GUATEMALA", numcode: "320" }, + { name: "Morocco", iso3: "MAR", iso: "MA", iso_name: "MOROCCO", numcode: "504" }, + { name: "Poland", iso3: "POL", iso: "PL", iso_name: "POLAND", numcode: "616" }, + { name: "Vanuatu", iso3: "VUT", iso: "VU", iso_name: "VANUATU", numcode: "548" }, + { name: "Dominican Republic", iso3: "DOM", iso: "DO", iso_name: "DOMINICAN REPUBLIC", numcode: "214" }, + { name: "Mozambique", iso3: "MOZ", iso: "MZ", iso_name: "MOZAMBIQUE", numcode: "508" }, + { name: "Portugal", iso3: "PRT", iso: "PT", iso_name: "PORTUGAL", numcode: "620" }, + { name: "Sudan", iso3: "SDN", iso: "SD", iso_name: "SUDAN", numcode: "736" }, + { name: "Venezuela", iso3: "VEN", iso: "VE", iso_name: "VENEZUELA", numcode: "862" }, + { name: "Ecuador", iso3: "ECU", iso: "EC", iso_name: "ECUADOR", numcode: "218" }, + { name: "Guinea", iso3: "GIN", iso: "GN", iso_name: "GUINEA", numcode: "324" }, + { name: "Myanmar", iso3: "MMR", iso: "MM", iso_name: "MYANMAR", numcode: "104" }, + { name: "Puerto Rico", iso3: "PRI", iso: "PR", iso_name: "PUERTO RICO", numcode: "630" }, + { name: "Suriname", iso3: "SUR", iso: "SR", iso_name: "SURINAME", numcode: "740" }, + { name: "Viet Nam", iso3: "VNM", iso: "VN", iso_name: "VIET NAM", numcode: "704" }, + { name: "Egypt", iso3: "EGY", iso: "EG", iso_name: "EGYPT", numcode: "818" }, + { name: "Guinea-Bissau", iso3: "GNB", iso: "GW", iso_name: "GUINEA-BISSAU", numcode: "624" }, + { name: "Namibia", iso3: "NAM", iso: "NA", iso_name: "NAMIBIA", numcode: "516" }, + { name: "Qatar", iso3: "QAT", iso: "QA", iso_name: "QATAR", numcode: "634" }, + { name: "Svalbard and Jan Mayen", iso3: "SJM", iso: "SJ", iso_name: "SVALBARD AND JAN MAYEN", numcode: "744" }, + { name: "El Salvador", iso3: "SLV", iso: "SV", iso_name: "EL SALVADOR", numcode: "222" }, + { name: "Guyana", iso3: "GUY", iso: "GY", iso_name: "GUYANA", numcode: "328" }, + { name: "Reunion", iso3: "REU", iso: "RE", iso_name: "REUNION", numcode: "638" }, + { name: "Haiti", iso3: "HTI", iso: "HT", iso_name: "HAITI", numcode: "332" }, + { name: "Romania", iso3: "ROM", iso: "RO", iso_name: "ROMANIA", numcode: "642" }, + { name: "Swaziland", iso3: "SWZ", iso: "SZ", iso_name: "SWAZILAND", numcode: "748" }, + { name: "Holy See (Vatican City State)", iso3: "VAT", iso: "VA", iso_name: "HOLY SEE (VATICAN CITY STATE)", numcode: "336" }, + { name: "Russian Federation", iso3: "RUS", iso: "RU", iso_name: "RUSSIAN FEDERATION", numcode: "643" }, + { name: "Sweden", iso3: "SWE", iso: "SE", iso_name: "SWEDEN", numcode: "752" }, + { name: "Honduras", iso3: "HND", iso: "HN", iso_name: "HONDURAS", numcode: "340" }, + { name: "Rwanda", iso3: "RWA", iso: "RW", iso_name: "RWANDA", numcode: "646" }, + { name: "Switzerland", iso3: "CHE", iso: "CH", iso_name: "SWITZERLAND", numcode: "756" }, + { name: "Hong Kong", iso3: "HKG", iso: "HK", iso_name: "HONG KONG", numcode: "344" }, + { name: "Syrian Arab Republic", iso3: "SYR", iso: "SY", iso_name: "SYRIAN ARAB REPUBLIC", numcode: "760" }, + { name: "Taiwan", iso3: "TWN", iso: "TW", iso_name: "TAIWAN, PROVINCE OF CHINA", numcode: "158" }, + { name: "Tajikistan", iso3: "TJK", iso: "TJ", iso_name: "TAJIKISTAN", numcode: "762" }, + { name: "Tanzania, United Republic of", iso3: "TZA", iso: "TZ", iso_name: "TANZANIA, UNITED REPUBLIC OF", numcode: "834" }, + { name: "Armenia", iso3: "ARM", iso: "AM", iso_name: "ARMENIA", numcode: "51" }, + { name: "Aruba", iso3: "ABW", iso: "AW", iso_name: "ARUBA", numcode: "533" }, + { name: "Australia", iso3: "AUS", iso: "AU", iso_name: "AUSTRALIA", numcode: "36" }, + { name: "Thailand", iso3: "THA", iso: "TH", iso_name: "THAILAND", numcode: "764" }, + { name: "Austria", iso3: "AUT", iso: "AT", iso_name: "AUSTRIA", numcode: "40" }, + { name: "Madagascar", iso3: "MDG", iso: "MG", iso_name: "MADAGASCAR", numcode: "450" }, + { name: "Togo", iso3: "TGO", iso: "TG", iso_name: "TOGO", numcode: "768" }, + { name: "Azerbaijan", iso3: "AZE", iso: "AZ", iso_name: "AZERBAIJAN", numcode: "31" }, + { name: "Chile", iso3: "CHL", iso: "CL", iso_name: "CHILE", numcode: "152" }, + { name: "Malawi", iso3: "MWI", iso: "MW", iso_name: "MALAWI", numcode: "454" }, + { name: "Tokelau", iso3: "TKL", iso: "TK", iso_name: "TOKELAU", numcode: "772" }, + { name: "Bahamas", iso3: "BHS", iso: "BS", iso_name: "BAHAMAS", numcode: "44" }, + { name: "China", iso3: "CHN", iso: "CN", iso_name: "CHINA", numcode: "156" }, + { name: "Malaysia", iso3: "MYS", iso: "MY", iso_name: "MALAYSIA", numcode: "458" }, + { name: "Tonga", iso3: "TON", iso: "TO", iso_name: "TONGA", numcode: "776" }, + { name: "Bahrain", iso3: "BHR", iso: "BH", iso_name: "BAHRAIN", numcode: "48" }, + { name: "Colombia", iso3: "COL", iso: "CO", iso_name: "COLOMBIA", numcode: "170" }, + { name: "Maldives", iso3: "MDV", iso: "MV", iso_name: "MALDIVES", numcode: "462" }, + { name: "Trinidad and Tobago", iso3: "TTO", iso: "TT", iso_name: "TRINIDAD AND TOBAGO", numcode: "780" }, + { name: "Bangladesh", iso3: "BGD", iso: "BD", iso_name: "BANGLADESH", numcode: "50" }, + { name: "Comoros", iso3: "COM", iso: "KM", iso_name: "COMOROS", numcode: "174" }, + { name: "French Polynesia", iso3: "PYF", iso: "PF", iso_name: "FRENCH POLYNESIA", numcode: "258" }, + { name: "Mali", iso3: "MLI", iso: "ML", iso_name: "MALI", numcode: "466" }, + { name: "Norfolk Island", iso3: "NFK", iso: "NF", iso_name: "NORFOLK ISLAND", numcode: "574" }, + { name: "Tunisia", iso3: "TUN", iso: "TN", iso_name: "TUNISIA", numcode: "788" }, + { name: "Barbados", iso3: "BRB", iso: "BB", iso_name: "BARBADOS", numcode: "52" }, + { name: "Congo", iso3: "COG", iso: "CG", iso_name: "CONGO", numcode: "178" }, + { name: "Gabon", iso3: "GAB", iso: "GA", iso_name: "GABON", numcode: "266" }, + { name: "Malta", iso3: "MLT", iso: "MT", iso_name: "MALTA", numcode: "470" }, + { name: "Northern Mariana Islands", iso3: "MNP", iso: "MP", iso_name: "NORTHERN MARIANA ISLANDS", numcode: "580" }, + { name: "Turkey", iso3: "TUR", iso: "TR", iso_name: "TURKEY", numcode: "792" }, + { name: "Congo, the Democratic Republic of the", iso3: "COD", iso: "CD", iso_name: "CONGO, THE DEMOCRATIC REPUBLIC OF THE", numcode: "180" }, + { name: "Marshall Islands", iso3: "MHL", iso: "MH", iso_name: "MARSHALL ISLANDS", numcode: "584" }, + { name: "Norway", iso3: "NOR", iso: "NO", iso_name: "NORWAY", numcode: "578" }, + { name: "Turkmenistan", iso3: "TKM", iso: "TM", iso_name: "TURKMENISTAN", numcode: "795" }, + { name: "Belarus", iso3: "BLR", iso: "BY", iso_name: "BELARUS", numcode: "112" }, + { name: "Cook Islands", iso3: "COK", iso: "CK", iso_name: "COOK ISLANDS", numcode: "184" }, + { name: "Gambia", iso3: "GMB", iso: "GM", iso_name: "GAMBIA", numcode: "270" }, + { name: "Martinique", iso3: "MTQ", iso: "MQ", iso_name: "MARTINIQUE", numcode: "474" }, + { name: "Oman", iso3: "OMN", iso: "OM", iso_name: "OMAN", numcode: "512" }, + { name: "Seychelles", iso3: "SYC", iso: "SC", iso_name: "SEYCHELLES", numcode: "690" }, + { name: "Turks and Caicos Islands", iso3: "TCA", iso: "TC", iso_name: "TURKS AND CAICOS ISLANDS", numcode: "796" }, + { name: "Georgia", iso3: "GEO", iso: "GE", iso_name: "GEORGIA", numcode: "268" }, + { name: "Mauritania", iso3: "MRT", iso: "MR", iso_name: "MAURITANIA", numcode: "478" }, + { name: "Pakistan", iso3: "PAK", iso: "PK", iso_name: "PAKISTAN", numcode: "586" }, + { name: "Sierra Leone", iso3: "SLE", iso: "SL", iso_name: "SIERRA LEONE", numcode: "694" }, + { name: "Tuvalu", iso3: "TUV", iso: "TV", iso_name: "TUVALU", numcode: "798" }, + { name: "Costa Rica", iso3: "CRI", iso: "CR", iso_name: "COSTA RICA", numcode: "188" }, + { name: "Germany", iso3: "DEU", iso: "DE", iso_name: "GERMANY", numcode: "276" }, + { name: "Mauritius", iso3: "MUS", iso: "MU", iso_name: "MAURITIUS", numcode: "480" }, + { name: "Palau", iso3: "PLW", iso: "PW", iso_name: "PALAU", numcode: "585" }, + { name: "Cote D'Ivoire", iso3: "CIV", iso: "CI", iso_name: "COTE D'IVOIRE", numcode: "384" }, + { name: "Panama", iso3: "PAN", iso: "PA", iso_name: "PANAMA", numcode: "591" }, + { name: "Singapore", iso3: "SGP", iso: "SG", iso_name: "SINGAPORE", numcode: "702" }, + { name: "Croatia", iso3: "HRV", iso: "HR", iso_name: "CROATIA", numcode: "191" }, + { name: "Ghana", iso3: "GHA", iso: "GH", iso_name: "GHANA", numcode: "288" }, + { name: "Papua New Guinea", iso3: "PNG", iso: "PG", iso_name: "PAPUA NEW GUINEA", numcode: "598" }, + { name: "Slovakia", iso3: "SVK", iso: "SK", iso_name: "SLOVAKIA", numcode: "703" }, + { name: "Gibraltar", iso3: "GIB", iso: "GI", iso_name: "GIBRALTAR", numcode: "292" }, + { name: "Paraguay", iso3: "PRY", iso: "PY", iso_name: "PARAGUAY", numcode: "600" }, + { name: "Slovenia", iso3: "SVN", iso: "SI", iso_name: "SLOVENIA", numcode: "705" }, + { name: "Greece", iso3: "GRC", iso: "GR", iso_name: "GREECE", numcode: "300" }, + { name: "Peru", iso3: "PER", iso: "PE", iso_name: "PERU", numcode: "604" }, + { name: "Solomon Islands", iso3: "SLB", iso: "SB", iso_name: "SOLOMON ISLANDS", numcode: "90" }, + { name: "Greenland", iso3: "GRL", iso: "GL", iso_name: "GREENLAND", numcode: "304" }, + { name: "Somalia", iso3: "SOM", iso: "SO", iso_name: "SOMALIA", numcode: "706" }, + { name: "Grenada", iso3: "GRD", iso: "GD", iso_name: "GRENADA", numcode: "308" }, + { name: "South Africa", iso3: "ZAF", iso: "ZA", iso_name: "SOUTH AFRICA", numcode: "710" }, + { name: "Spain", iso3: "ESP", iso: "ES", iso_name: "SPAIN", numcode: "724" }, + { name: "Sri Lanka", iso3: "LKA", iso: "LK", iso_name: "SRI LANKA", numcode: "144" }, + { name: "Afghanistan", iso3: "AFG", iso: "AF", iso_name: "AFGHANISTAN", numcode: "4" }, + { name: "Albania", iso3: "ALB", iso: "AL", iso_name: "ALBANIA", numcode: "8" }, + { name: "Algeria", iso3: "DZA", iso: "DZ", iso_name: "ALGERIA", numcode: "12" }, + { name: "Latvia", iso3: "LVA", iso: "LV", iso_name: "LATVIA", numcode: "428" }, + { name: "American Samoa", iso3: "ASM", iso: "AS", iso_name: "AMERICAN SAMOA", numcode: "16" }, + { name: "Bulgaria", iso3: "BGR", iso: "BG", iso_name: "BULGARIA", numcode: "100" }, + { name: "Lebanon", iso3: "LBN", iso: "LB", iso_name: "LEBANON", numcode: "422" }, + { name: "Andorra", iso3: "AND", iso: "AD", iso_name: "ANDORRA", numcode: "20" }, + { name: "Burkina Faso", iso3: "BFA", iso: "BF", iso_name: "BURKINA FASO", numcode: "854" }, + { name: "Lesotho", iso3: "LSO", iso: "LS", iso_name: "LESOTHO", numcode: "426" }, + { name: "Angola", iso3: "AGO", iso: "AO", iso_name: "ANGOLA", numcode: "24" }, + { name: "Burundi", iso3: "BDI", iso: "BI", iso_name: "BURUNDI", numcode: "108" }, + { name: "Liberia", iso3: "LBR", iso: "LR", iso_name: "LIBERIA", numcode: "430" }, + { name: "Virgin Islands, British", iso3: "VGB", iso: "VG", iso_name: "VIRGIN ISLANDS, BRITISH", numcode: "92" }, + { name: "Anguilla", iso3: "AIA", iso: "AI", iso_name: "ANGUILLA", numcode: "660" }, + { name: "Cambodia", iso3: "KHM", iso: "KH", iso_name: "CAMBODIA", numcode: "116" }, + { name: "Equatorial Guinea", iso3: "GNQ", iso: "GQ", iso_name: "EQUATORIAL GUINEA", numcode: "226" }, + { name: "Libyan Arab Jamahiriya", iso3: "LBY", iso: "LY", iso_name: "LIBYAN ARAB JAMAHIRIYA", numcode: "434" }, + { name: "Nauru", iso3: "NRU", iso: "NR", iso_name: "NAURU", numcode: "520" }, + { name: "Virgin Islands, U.S.", iso3: "VIR", iso: "VI", iso_name: "VIRGIN ISLANDS, U.S.", numcode: "850" }, + { name: "Antigua and Barbuda", iso3: "ATG", iso: "AG", iso_name: "ANTIGUA AND BARBUDA", numcode: "28" }, + { name: "Cameroon", iso3: "CMR", iso: "CM", iso_name: "CAMEROON", numcode: "120" }, + { name: "Liechtenstein", iso3: "LIE", iso: "LI", iso_name: "LIECHTENSTEIN", numcode: "438" }, + { name: "Nepal", iso3: "NPL", iso: "NP", iso_name: "NEPAL", numcode: "524" }, + { name: "Wallis and Futuna", iso3: "WLF", iso: "WF", iso_name: "WALLIS AND FUTUNA", numcode: "876" }, + { name: "Western Sahara", iso3: "ESH", iso: "EH", iso_name: "WESTERN SAHARA", numcode: "732" }, + { name: "Argentina", iso3: "ARG", iso: "AR", iso_name: "ARGENTINA", numcode: "32" }, + { name: "Canada", iso3: "CAN", iso: "CA", iso_name: "CANADA", numcode: "124" }, + { name: "Eritrea", iso3: "ERI", iso: "ER", iso_name: "ERITREA", numcode: "232" }, + { name: "Lithuania", iso3: "LTU", iso: "LT", iso_name: "LITHUANIA", numcode: "440" }, + { name: "Netherlands", iso3: "NLD", iso: "NL", iso_name: "NETHERLANDS", numcode: "528" }, + { name: "Yemen", iso3: "YEM", iso: "YE", iso_name: "YEMEN", numcode: "887" }, + { name: "Cape Verde", iso3: "CPV", iso: "CV", iso_name: "CAPE VERDE", numcode: "132" }, + { name: "Estonia", iso3: "EST", iso: "EE", iso_name: "ESTONIA", numcode: "233" }, + { name: "Luxembourg", iso3: "LUX", iso: "LU", iso_name: "LUXEMBOURG", numcode: "442" }, + { name: "Netherlands Antilles", iso3: "ANT", iso: "AN", iso_name: "NETHERLANDS ANTILLES", numcode: "530" }, + { name: "Saint Helena", iso3: "SHN", iso: "SH", iso_name: "SAINT HELENA", numcode: "654" }, + { name: "Zambia", iso3: "ZMB", iso: "ZM", iso_name: "ZAMBIA", numcode: "894" }, + { name: "Cayman Islands", iso3: "CYM", iso: "KY", iso_name: "CAYMAN ISLANDS", numcode: "136" }, + { name: "Ethiopia", iso3: "ETH", iso: "ET", iso_name: "ETHIOPIA", numcode: "231" }, + { name: "Hungary", iso3: "HUN", iso: "HU", iso_name: "HUNGARY", numcode: "348" }, + { name: "Macao", iso3: "MAC", iso: "MO", iso_name: "MACAO", numcode: "446" }, + { name: "New Caledonia", iso3: "NCL", iso: "NC", iso_name: "NEW CALEDONIA", numcode: "540" }, + { name: "Zimbabwe", iso3: "ZWE", iso: "ZW", iso_name: "ZIMBABWE", numcode: "716" }, + { name: "Central African Republic", iso3: "CAF", iso: "CF", iso_name: "CENTRAL AFRICAN REPUBLIC", numcode: "140" }, + { name: "Falkland Islands (Malvinas)", iso3: "FLK", iso: "FK", iso_name: "FALKLAND ISLANDS (MALVINAS)", numcode: "238" }, + { name: "Iceland", iso3: "ISL", iso: "IS", iso_name: "ICELAND", numcode: "352" }, + { name: "Macedonia", iso3: "MKD", iso: "MK", iso_name: "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF", numcode: "807" }, + { name: "New Zealand", iso3: "NZL", iso: "NZ", iso_name: "NEW ZEALAND", numcode: "554" }, + { name: "Saint Kitts and Nevis", iso3: "KNA", iso: "KN", iso_name: "SAINT KITTS AND NEVIS", numcode: "659" }, + { name: "Serbia", iso3: "SRB", iso: "RS", "iso_name" => "SERBIA", numcode: "999" } +]) +Spree::Config[:default_country_id] = Spree::Country.find_by(name: "United States").id diff --git a/db/default/spree/countries.yml b/db/default/spree/countries.yml deleted file mode 100644 index 9e24fd9e289..00000000000 --- a/db/default/spree/countries.yml +++ /dev/null @@ -1,1360 +0,0 @@ ---- -countries_039: - name: Chad - iso3: TCD - iso: TD - iso_name: CHAD - numcode: "148" -countries_065: - name: Faroe Islands - iso3: FRO - iso: FO - iso_name: FAROE ISLANDS - numcode: "234" -countries_092: - name: India - iso3: IND - iso: IN - iso_name: INDIA - numcode: "356" -countries_146: - name: Nicaragua - iso3: NIC - iso: NI - iso_name: NICARAGUA - numcode: "558" -countries_172: - name: Saint Lucia - iso3: LCA - iso: LC - iso_name: SAINT LUCIA - numcode: "662" -countries_066: - name: Fiji - iso3: FJI - iso: FJ - iso_name: FIJI - numcode: "242" -countries_093: - name: Indonesia - iso3: IDN - iso: ID - iso_name: INDONESIA - numcode: "360" -countries_147: - name: Niger - iso3: NER - iso: NE - iso_name: NIGER - numcode: "562" -countries_173: - name: Saint Pierre and Miquelon - iso3: SPM - iso: PM - iso_name: SAINT PIERRE AND MIQUELON - numcode: "666" -countries_067: - name: Finland - iso3: FIN - iso: FI - iso_name: FINLAND - numcode: "246" -countries_148: - name: Nigeria - iso3: NGA - iso: NG - iso_name: NIGERIA - numcode: "566" -countries_174: - name: Saint Vincent and the Grenadines - iso3: VCT - iso: VC - iso_name: SAINT VINCENT AND THE GRENADINES - numcode: "670" -countries_068: - name: France - iso3: FRA - iso: FR - iso_name: FRANCE - numcode: "250" -countries_094: - name: Iran, Islamic Republic of - iso3: IRN - iso: IR - iso_name: IRAN, ISLAMIC REPUBLIC OF - numcode: "364" -countries_149: - name: Niue - iso3: NIU - iso: NU - iso_name: NIUE - numcode: "570" -countries_175: - name: Samoa - iso3: WSM - iso: WS - iso_name: SAMOA - numcode: "882" -countries_069: - name: French Guiana - iso3: GUF - iso: GF - iso_name: FRENCH GUIANA - numcode: "254" -countries_095: - name: Iraq - iso3: IRQ - iso: IQ - iso_name: IRAQ - numcode: "368" -countries_176: - name: San Marino - iso3: SMR - iso: SM - iso_name: SAN MARINO - numcode: "674" -countries_096: - name: Ireland - iso3: IRL - iso: IE - iso_name: IRELAND - numcode: "372" -countries_177: - name: Sao Tome and Principe - iso3: STP - iso: ST - iso_name: SAO TOME AND PRINCIPE - numcode: "678" -countries_097: - name: Israel - iso3: ISR - iso: IL - iso_name: ISRAEL - numcode: "376" -countries_178: - name: Saudi Arabia - iso3: SAU - iso: SA - iso_name: SAUDI ARABIA - numcode: "682" -countries_098: - name: Italy - iso3: ITA - iso: IT - iso_name: ITALY - numcode: "380" -countries_179: - name: Senegal - iso3: SEN - iso: SN - iso_name: SENEGAL - numcode: "686" -countries_099: - name: Jamaica - iso3: JAM - iso: JM - iso_name: JAMAICA - numcode: "388" -countries_100: - name: Japan - iso3: JPN - iso: JP - iso_name: JAPAN - numcode: "392" -countries_101: - name: Jordan - iso3: JOR - iso: JO - iso_name: JORDAN - numcode: "400" -countries_020: - name: Belgium - iso3: BEL - iso: BE - iso_name: BELGIUM - numcode: "56" -countries_021: - name: Belize - iso3: BLZ - iso: BZ - iso_name: BELIZE - numcode: "84" -countries_102: - name: Kazakhstan - iso3: KAZ - iso: KZ - iso_name: KAZAKHSTAN - numcode: "398" -countries_210: - name: Uganda - iso3: UGA - iso: UG - iso_name: UGANDA - numcode: "800" -countries_022: - name: Benin - iso3: BEN - iso: BJ - iso_name: BENIN - numcode: "204" -countries_103: - name: Kenya - iso3: KEN - iso: KE - iso_name: KENYA - numcode: "404" -countries_211: - name: Ukraine - iso3: UKR - iso: UA - iso_name: UKRAINE - numcode: "804" -countries_023: - name: Bermuda - iso3: BMU - iso: BM - iso_name: BERMUDA - numcode: "60" -countries_104: - name: Kiribati - iso3: KIR - iso: KI - iso_name: KIRIBATI - numcode: "296" -countries_130: - name: Mexico - iso3: MEX - iso: MX - iso_name: MEXICO - numcode: "484" -countries_212: - name: United Arab Emirates - iso3: ARE - iso: AE - iso_name: UNITED ARAB EMIRATES - numcode: "784" -countries_024: - name: Bhutan - iso3: BTN - iso: BT - iso_name: BHUTAN - numcode: "64" -countries_050: - name: Cuba - iso3: CUB - iso: CU - iso_name: CUBA - numcode: "192" -countries_105: - name: North Korea - iso3: PRK - iso: KP - iso_name: KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF - numcode: "408" -countries_131: - name: Micronesia, Federated States of - iso3: FSM - iso: FM - iso_name: MICRONESIA, FEDERATED STATES OF - numcode: "583" -countries_213: - name: United Kingdom - iso3: GBR - iso: GB - iso_name: UNITED KINGDOM - numcode: "826" -countries_025: - name: Bolivia - iso3: BOL - iso: BO - iso_name: BOLIVIA - numcode: "68" -countries_051: - name: Cyprus - iso3: CYP - iso: CY - iso_name: CYPRUS - numcode: "196" -countries_106: - name: South Korea - iso3: KOR - iso: KR - iso_name: KOREA, REPUBLIC OF - numcode: "410" -countries_132: - name: Moldova, Republic of - iso3: MDA - iso: MD - iso_name: MOLDOVA, REPUBLIC OF - numcode: "498" -countries_214: - name: United States - iso3: USA - iso: US - iso_name: UNITED STATES - numcode: "840" -countries_026: - name: Bosnia and Herzegovina - iso3: BIH - iso: BA - iso_name: BOSNIA AND HERZEGOVINA - numcode: "70" -countries_052: - name: Czech Republic - iso3: CZE - iso: CZ - iso_name: CZECH REPUBLIC - numcode: "203" -countries_107: - name: Kuwait - iso3: KWT - iso: KW - iso_name: KUWAIT - numcode: "414" -countries_133: - name: Monaco - iso3: MCO - iso: MC - iso_name: MONACO - numcode: "492" -countries_215: - name: Uruguay - iso3: URY - iso: UY - iso_name: URUGUAY - numcode: "858" -countries_027: - name: Botswana - iso3: BWA - iso: BW - iso_name: BOTSWANA - numcode: "72" -countries_053: - name: Denmark - iso3: DNK - iso: DK - iso_name: DENMARK - numcode: "208" -countries_080: - name: Guadeloupe - iso3: GLP - iso: GP - iso_name: GUADELOUPE - numcode: "312" -countries_108: - name: Kyrgyzstan - iso3: KGZ - iso: KG - iso_name: KYRGYZSTAN - numcode: "417" -countries_134: - name: Mongolia - iso3: MNG - iso: MN - iso_name: MONGOLIA - numcode: "496" -countries_160: - name: Philippines - iso3: PHL - iso: PH - iso_name: PHILIPPINES - numcode: "608" -countries_028: - name: Brazil - iso3: BRA - iso: BR - iso_name: BRAZIL - numcode: "76" -countries_054: - name: Djibouti - iso3: DJI - iso: DJ - iso_name: DJIBOUTI - numcode: "262" -countries_081: - name: Guam - iso3: GUM - iso: GU - iso_name: GUAM - numcode: "316" -countries_109: - name: Lao People's Democratic Republic - iso3: LAO - iso: LA - iso_name: LAO PEOPLE'S DEMOCRATIC REPUBLIC - numcode: "418" -countries_135: - name: Montserrat - iso3: MSR - iso: MS - iso_name: MONTSERRAT - numcode: "500" -countries_161: - name: Pitcairn - iso3: PCN - iso: PN - iso_name: PITCAIRN - numcode: "612" -countries_216: - name: Uzbekistan - iso3: UZB - iso: UZ - iso_name: UZBEKISTAN - numcode: "860" -countries_029: - name: Brunei Darussalam - iso3: BRN - iso: BN - iso_name: BRUNEI DARUSSALAM - numcode: "96" -countries_055: - name: Dominica - iso3: DMA - iso: DM - iso_name: DOMINICA - numcode: "212" -countries_082: - name: Guatemala - iso3: GTM - iso: GT - iso_name: GUATEMALA - numcode: "320" -countries_136: - name: Morocco - iso3: MAR - iso: MA - iso_name: MOROCCO - numcode: "504" -countries_162: - name: Poland - iso3: POL - iso: PL - iso_name: POLAND - numcode: "616" -countries_217: - name: Vanuatu - iso3: VUT - iso: VU - iso_name: VANUATU - numcode: "548" -countries_056: - name: Dominican Republic - iso3: DOM - iso: DO - iso_name: DOMINICAN REPUBLIC - numcode: "214" -countries_137: - name: Mozambique - iso3: MOZ - iso: MZ - iso_name: MOZAMBIQUE - numcode: "508" -countries_163: - name: Portugal - iso3: PRT - iso: PT - iso_name: PORTUGAL - numcode: "620" -countries_190: - name: Sudan - iso3: SDN - iso: SD - iso_name: SUDAN - numcode: "736" -countries_218: - name: Venezuela - iso3: VEN - iso: VE - iso_name: VENEZUELA - numcode: "862" -countries_057: - name: Ecuador - iso3: ECU - iso: EC - iso_name: ECUADOR - numcode: "218" -countries_083: - name: Guinea - iso3: GIN - iso: GN - iso_name: GUINEA - numcode: "324" -countries_138: - name: Myanmar - iso3: MMR - iso: MM - iso_name: MYANMAR - numcode: "104" -countries_164: - name: Puerto Rico - iso3: PRI - iso: PR - iso_name: PUERTO RICO - numcode: "630" -countries_191: - name: Suriname - iso3: SUR - iso: SR - iso_name: SURINAME - numcode: "740" -countries_219: - name: Viet Nam - iso3: VNM - iso: VN - iso_name: VIET NAM - numcode: "704" -countries_058: - name: Egypt - iso3: EGY - iso: EG - iso_name: EGYPT - numcode: "818" -countries_084: - name: Guinea-Bissau - iso3: GNB - iso: GW - iso_name: GUINEA-BISSAU - numcode: "624" -countries_139: - name: Namibia - iso3: NAM - iso: NA - iso_name: NAMIBIA - numcode: "516" -countries_165: - name: Qatar - iso3: QAT - iso: QA - iso_name: QATAR - numcode: "634" -countries_192: - name: Svalbard and Jan Mayen - iso3: SJM - iso: SJ - iso_name: SVALBARD AND JAN MAYEN - numcode: "744" -countries_059: - name: El Salvador - iso3: SLV - iso: SV - iso_name: EL SALVADOR - numcode: "222" -countries_085: - name: Guyana - iso3: GUY - iso: GY - iso_name: GUYANA - numcode: "328" -countries_166: - name: Reunion - iso3: REU - iso: RE - iso_name: REUNION - numcode: "638" -countries_086: - name: Haiti - iso3: HTI - iso: HT - iso_name: HAITI - numcode: "332" -countries_167: - name: Romania - iso3: ROM - iso: RO - iso_name: ROMANIA - numcode: "642" -countries_193: - name: Swaziland - iso3: SWZ - iso: SZ - iso_name: SWAZILAND - numcode: "748" -countries_087: - name: Holy See (Vatican City State) - iso3: VAT - iso: VA - iso_name: HOLY SEE (VATICAN CITY STATE) - numcode: "336" -countries_168: - name: Russian Federation - iso3: RUS - iso: RU - iso_name: RUSSIAN FEDERATION - numcode: "643" -countries_194: - name: Sweden - iso3: SWE - iso: SE - iso_name: SWEDEN - numcode: "752" -countries_088: - name: Honduras - iso3: HND - iso: HN - iso_name: HONDURAS - numcode: "340" -countries_169: - name: Rwanda - iso3: RWA - iso: RW - iso_name: RWANDA - numcode: "646" -countries_195: - name: Switzerland - iso3: CHE - iso: CH - iso_name: SWITZERLAND - numcode: "756" -countries_089: - name: Hong Kong - iso3: HKG - iso: HK - iso_name: HONG KONG - numcode: "344" -countries_196: - name: Syrian Arab Republic - iso3: SYR - iso: SY - iso_name: SYRIAN ARAB REPUBLIC - numcode: "760" -countries_197: - name: Taiwan - iso3: TWN - iso: TW - iso_name: TAIWAN, PROVINCE OF CHINA - numcode: "158" -countries_198: - name: Tajikistan - iso3: TJK - iso: TJ - iso_name: TAJIKISTAN - numcode: "762" -countries_199: - name: Tanzania, United Republic of - iso3: TZA - iso: TZ - iso_name: TANZANIA, UNITED REPUBLIC OF - numcode: "834" -countries_010: - name: Armenia - iso3: ARM - iso: AM - iso_name: ARMENIA - numcode: "51" -countries_011: - name: Aruba - iso3: ABW - iso: AW - iso_name: ARUBA - numcode: "533" -countries_012: - id: 12 - name: Australia - iso3: AUS - iso: AU - iso_name: AUSTRALIA - numcode: "36" -countries_200: - name: Thailand - iso3: THA - iso: TH - iso_name: THAILAND - numcode: "764" -countries_013: - name: Austria - iso3: AUT - iso: AT - iso_name: AUSTRIA - numcode: "40" -countries_120: - name: Madagascar - iso3: MDG - iso: MG - iso_name: MADAGASCAR - numcode: "450" -countries_201: - name: Togo - iso3: TGO - iso: TG - iso_name: TOGO - numcode: "768" -countries_014: - name: Azerbaijan - iso3: AZE - iso: AZ - iso_name: AZERBAIJAN - numcode: "31" -countries_040: - name: Chile - iso3: CHL - iso: CL - iso_name: CHILE - numcode: "152" -countries_121: - name: Malawi - iso3: MWI - iso: MW - iso_name: MALAWI - numcode: "454" -countries_202: - name: Tokelau - iso3: TKL - iso: TK - iso_name: TOKELAU - numcode: "772" -countries_015: - name: Bahamas - iso3: BHS - iso: BS - iso_name: BAHAMAS - numcode: "44" -countries_041: - name: China - iso3: CHN - iso: CN - iso_name: CHINA - numcode: "156" -countries_122: - name: Malaysia - iso3: MYS - iso: MY - iso_name: MALAYSIA - numcode: "458" -countries_203: - name: Tonga - iso3: TON - iso: TO - iso_name: TONGA - numcode: "776" -countries_016: - name: Bahrain - iso3: BHR - iso: BH - iso_name: BAHRAIN - numcode: "48" -countries_042: - name: Colombia - iso3: COL - iso: CO - iso_name: COLOMBIA - numcode: "170" -countries_123: - name: Maldives - iso3: MDV - iso: MV - iso_name: MALDIVES - numcode: "462" -countries_204: - name: Trinidad and Tobago - iso3: TTO - iso: TT - iso_name: TRINIDAD AND TOBAGO - numcode: "780" -countries_017: - name: Bangladesh - iso3: BGD - iso: BD - iso_name: BANGLADESH - numcode: "50" -countries_043: - name: Comoros - iso3: COM - iso: KM - iso_name: COMOROS - numcode: "174" -countries_070: - name: French Polynesia - iso3: PYF - iso: PF - iso_name: FRENCH POLYNESIA - numcode: "258" -countries_124: - name: Mali - iso3: MLI - iso: ML - iso_name: MALI - numcode: "466" -countries_150: - name: Norfolk Island - iso3: NFK - iso: NF - iso_name: NORFOLK ISLAND - numcode: "574" -countries_205: - name: Tunisia - iso3: TUN - iso: TN - iso_name: TUNISIA - numcode: "788" -countries_018: - name: Barbados - iso3: BRB - iso: BB - iso_name: BARBADOS - numcode: "52" -countries_044: - name: Congo - iso3: COG - iso: CG - iso_name: CONGO - numcode: "178" -countries_071: - name: Gabon - iso3: GAB - iso: GA - iso_name: GABON - numcode: "266" -countries_125: - name: Malta - iso3: MLT - iso: MT - iso_name: MALTA - numcode: "470" -countries_151: - name: Northern Mariana Islands - iso3: MNP - iso: MP - iso_name: NORTHERN MARIANA ISLANDS - numcode: "580" -countries_206: - name: Turkey - iso3: TUR - iso: TR - iso_name: TURKEY - numcode: "792" -countries_045: - name: Congo, the Democratic Republic of the - iso3: COD - iso: CD - iso_name: CONGO, THE DEMOCRATIC REPUBLIC OF THE - numcode: "180" -countries_126: - name: Marshall Islands - iso3: MHL - iso: MH - iso_name: MARSHALL ISLANDS - numcode: "584" -countries_152: - name: Norway - iso3: NOR - iso: "NO" - iso_name: NORWAY - numcode: "578" -countries_207: - name: Turkmenistan - iso3: TKM - iso: TM - iso_name: TURKMENISTAN - numcode: "795" -countries_019: - name: Belarus - iso3: BLR - iso: BY - iso_name: BELARUS - numcode: "112" -countries_046: - name: Cook Islands - iso3: COK - iso: CK - iso_name: COOK ISLANDS - numcode: "184" -countries_072: - name: Gambia - iso3: GMB - iso: GM - iso_name: GAMBIA - numcode: "270" -countries_127: - name: Martinique - iso3: MTQ - iso: MQ - iso_name: MARTINIQUE - numcode: "474" -countries_153: - name: Oman - iso3: OMN - iso: OM - iso_name: OMAN - numcode: "512" -countries_180: - name: Seychelles - iso3: SYC - iso: SC - iso_name: SEYCHELLES - numcode: "690" -countries_208: - name: Turks and Caicos Islands - iso3: TCA - iso: TC - iso_name: TURKS AND CAICOS ISLANDS - numcode: "796" -countries_073: - name: Georgia - iso3: GEO - iso: GE - iso_name: GEORGIA - numcode: "268" -countries_128: - name: Mauritania - iso3: MRT - iso: MR - iso_name: MAURITANIA - numcode: "478" -countries_154: - name: Pakistan - iso3: PAK - iso: PK - iso_name: PAKISTAN - numcode: "586" -countries_181: - name: Sierra Leone - iso3: SLE - iso: SL - iso_name: SIERRA LEONE - numcode: "694" -countries_209: - name: Tuvalu - iso3: TUV - iso: TV - iso_name: TUVALU - numcode: "798" -countries_047: - name: Costa Rica - iso3: CRI - iso: CR - iso_name: COSTA RICA - numcode: "188" -countries_074: - name: Germany - iso3: DEU - iso: DE - iso_name: GERMANY - numcode: "276" -countries_129: - name: Mauritius - iso3: MUS - iso: MU - iso_name: MAURITIUS - numcode: "480" -countries_155: - name: Palau - iso3: PLW - iso: PW - iso_name: PALAU - numcode: "585" -countries_048: - name: Cote D'Ivoire - iso3: CIV - iso: CI - iso_name: COTE D'IVOIRE - numcode: "384" -countries_156: - name: Panama - iso3: PAN - iso: PA - iso_name: PANAMA - numcode: "591" -countries_182: - name: Singapore - iso3: SGP - iso: SG - iso_name: SINGAPORE - numcode: "702" -countries_049: - name: Croatia - iso3: HRV - iso: HR - iso_name: CROATIA - numcode: "191" -countries_075: - name: Ghana - iso3: GHA - iso: GH - iso_name: GHANA - numcode: "288" -countries_157: - name: Papua New Guinea - iso3: PNG - iso: PG - iso_name: PAPUA NEW GUINEA - numcode: "598" -countries_183: - name: Slovakia - iso3: SVK - iso: SK - iso_name: SLOVAKIA - numcode: "703" -countries_076: - name: Gibraltar - iso3: GIB - iso: GI - iso_name: GIBRALTAR - numcode: "292" -countries_158: - name: Paraguay - iso3: PRY - iso: PY - iso_name: PARAGUAY - numcode: "600" -countries_184: - name: Slovenia - iso3: SVN - iso: SI - iso_name: SLOVENIA - numcode: "705" -countries_077: - name: Greece - iso3: GRC - iso: GR - iso_name: GREECE - numcode: "300" -countries_159: - name: Peru - iso3: PER - iso: PE - iso_name: PERU - numcode: "604" -countries_185: - name: Solomon Islands - iso3: SLB - iso: SB - iso_name: SOLOMON ISLANDS - numcode: "90" -countries_078: - name: Greenland - iso3: GRL - iso: GL - iso_name: GREENLAND - numcode: "304" -countries_186: - name: Somalia - iso3: SOM - iso: SO - iso_name: SOMALIA - numcode: "706" -countries_079: - name: Grenada - iso3: GRD - iso: GD - iso_name: GRENADA - numcode: "308" -countries_187: - name: South Africa - iso3: ZAF - iso: ZA - iso_name: SOUTH AFRICA - numcode: "710" -countries_188: - name: Spain - iso3: ESP - iso: ES - iso_name: SPAIN - numcode: "724" -countries_189: - name: Sri Lanka - iso3: LKA - iso: LK - iso_name: SRI LANKA - numcode: "144" -countries_001: - name: Afghanistan - iso3: AFG - iso: AF - iso_name: AFGHANISTAN - numcode: "4" -countries_002: - name: Albania - iso3: ALB - iso: AL - iso_name: ALBANIA - numcode: "8" -countries_003: - name: Algeria - iso3: DZA - iso: DZ - iso_name: ALGERIA - numcode: "12" -countries_110: - name: Latvia - iso3: LVA - iso: LV - iso_name: LATVIA - numcode: "428" -countries_004: - name: American Samoa - iso3: ASM - iso: AS - iso_name: AMERICAN SAMOA - numcode: "16" -countries_030: - name: Bulgaria - iso3: BGR - iso: BG - iso_name: BULGARIA - numcode: "100" -countries_111: - name: Lebanon - iso3: LBN - iso: LB - iso_name: LEBANON - numcode: "422" -countries_005: - name: Andorra - iso3: AND - iso: AD - iso_name: ANDORRA - numcode: "20" -countries_031: - name: Burkina Faso - iso3: BFA - iso: BF - iso_name: BURKINA FASO - numcode: "854" -countries_112: - name: Lesotho - iso3: LSO - iso: LS - iso_name: LESOTHO - numcode: "426" -countries_006: - name: Angola - iso3: AGO - iso: AO - iso_name: ANGOLA - numcode: "24" -countries_032: - name: Burundi - iso3: BDI - iso: BI - iso_name: BURUNDI - numcode: "108" -countries_113: - name: Liberia - iso3: LBR - iso: LR - iso_name: LIBERIA - numcode: "430" -countries_220: - name: Virgin Islands, British - iso3: VGB - iso: VG - iso_name: VIRGIN ISLANDS, BRITISH - numcode: "92" -countries_007: - name: Anguilla - iso3: AIA - iso: AI - iso_name: ANGUILLA - numcode: "660" -countries_033: - name: Cambodia - iso3: KHM - iso: KH - iso_name: CAMBODIA - numcode: "116" -countries_060: - name: Equatorial Guinea - iso3: GNQ - iso: GQ - iso_name: EQUATORIAL GUINEA - numcode: "226" -countries_114: - name: Libyan Arab Jamahiriya - iso3: LBY - iso: LY - iso_name: LIBYAN ARAB JAMAHIRIYA - numcode: "434" -countries_140: - name: Nauru - iso3: NRU - iso: NR - iso_name: NAURU - numcode: "520" -countries_221: - name: Virgin Islands, U.S. - iso3: VIR - iso: VI - iso_name: VIRGIN ISLANDS, U.S. - numcode: "850" -countries_008: - name: Antigua and Barbuda - iso3: ATG - iso: AG - iso_name: ANTIGUA AND BARBUDA - numcode: "28" -countries_034: - name: Cameroon - iso3: CMR - iso: CM - iso_name: CAMEROON - numcode: "120" -countries_115: - name: Liechtenstein - iso3: LIE - iso: LI - iso_name: LIECHTENSTEIN - numcode: "438" -countries_141: - name: Nepal - iso3: NPL - iso: NP - iso_name: NEPAL - numcode: "524" -countries_222: - name: Wallis and Futuna - iso3: WLF - iso: WF - iso_name: WALLIS AND FUTUNA - numcode: "876" -countries_223: - name: Western Sahara - iso3: ESH - iso: EH - iso_name: WESTERN SAHARA - numcode: "732" -countries_009: - name: Argentina - iso3: ARG - iso: AR - iso_name: ARGENTINA - numcode: "32" -countries_035: - name: Canada - iso3: CAN - iso: CA - iso_name: CANADA - numcode: "124" -countries_061: - name: Eritrea - iso3: ERI - iso: ER - iso_name: ERITREA - numcode: "232" -countries_116: - name: Lithuania - iso3: LTU - iso: LT - iso_name: LITHUANIA - numcode: "440" -countries_142: - name: Netherlands - iso3: NLD - iso: NL - iso_name: NETHERLANDS - numcode: "528" -countries_224: - name: Yemen - iso3: YEM - iso: YE - iso_name: YEMEN - numcode: "887" -countries_036: - name: Cape Verde - iso3: CPV - iso: CV - iso_name: CAPE VERDE - numcode: "132" -countries_062: - name: Estonia - iso3: EST - iso: EE - iso_name: ESTONIA - numcode: "233" -countries_117: - name: Luxembourg - iso3: LUX - iso: LU - iso_name: LUXEMBOURG - numcode: "442" -countries_143: - name: Netherlands Antilles - iso3: ANT - iso: AN - iso_name: NETHERLANDS ANTILLES - numcode: "530" -countries_170: - name: Saint Helena - iso3: SHN - iso: SH - iso_name: SAINT HELENA - numcode: "654" -countries_225: - name: Zambia - iso3: ZMB - iso: ZM - iso_name: ZAMBIA - numcode: "894" -countries_037: - name: Cayman Islands - iso3: CYM - iso: KY - iso_name: CAYMAN ISLANDS - numcode: "136" -countries_063: - name: Ethiopia - iso3: ETH - iso: ET - iso_name: ETHIOPIA - numcode: "231" -countries_090: - name: Hungary - iso3: HUN - iso: HU - iso_name: HUNGARY - numcode: "348" -countries_118: - name: Macao - iso3: MAC - iso: MO - iso_name: MACAO - numcode: "446" -countries_144: - name: New Caledonia - iso3: NCL - iso: NC - iso_name: NEW CALEDONIA - numcode: "540" -countries_226: - name: Zimbabwe - iso3: ZWE - iso: ZW - iso_name: ZIMBABWE - numcode: "716" -countries_038: - name: Central African Republic - iso3: CAF - iso: CF - iso_name: CENTRAL AFRICAN REPUBLIC - numcode: "140" -countries_064: - name: Falkland Islands (Malvinas) - iso3: FLK - iso: FK - iso_name: FALKLAND ISLANDS (MALVINAS) - numcode: "238" -countries_091: - name: Iceland - iso3: ISL - iso: IS - iso_name: ICELAND - numcode: "352" -countries_119: - name: Macedonia - iso3: MKD - iso: MK - iso_name: MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF - numcode: "807" -countries_145: - name: New Zealand - iso3: NZL - iso: NZ - iso_name: NEW ZEALAND - id: "145" - numcode: "554" -countries_171: - name: Saint Kitts and Nevis - iso3: KNA - iso: KN - iso_name: SAINT KITTS AND NEVIS - id: "171" - numcode: "659" diff --git a/db/default/spree/states.yml b/db/default/states.yml similarity index 100% rename from db/default/spree/states.yml rename to db/default/states.yml diff --git a/db/default/zones.rb b/db/default/zones.rb new file mode 100644 index 00000000000..19d04ca090b --- /dev/null +++ b/db/default/zones.rb @@ -0,0 +1,15 @@ +eu_vat = Spree::Zone.create!(name: "EU_VAT", description: "Countries that make up the EU VAT zone.") +north_america = Spree::Zone.create!(name: "North America", description: "USA + Canada") + +["Poland", "Finland", "Portugal", "Romania", "Germany", "France", + "Slovakia", "Hungary", "Slovenia", "Ireland", "Austria", "Spain", + "Italy", "Belgium", "Sweden", "Latvia", "Bulgaria", "United Kingdom", + "Lithuania", "Cyprus", "Luxembourg", "Malta", "Denmark", "Netherlands", + "Estonia"]. +each do |name| + eu_vat.zone_members.create!(zoneable: Spree::Country.find_by!(name: name)) +end + +["United States", "Canada"].each do |name| + north_america.zone_members.create!(zoneable: Spree::Country.find_by!(name: name)) +end diff --git a/db/seeds.rb b/db/seeds.rb index 9afe88de4bf..332e634d78c 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -20,32 +20,30 @@ def set_mail_configuration # We need mail_configuration to create a user account, because it sends a confirmation email. set_mail_configuration -# -- Spree +puts "[db:seed] Seeding Roles" +Spree::Role.where(:name => "admin").first_or_create +Spree::Role.where(:name => "user").first_or_create + +puts "[db:seed] Seeding Countries" unless Spree::Country.find_by(iso: ENV['DEFAULT_COUNTRY_CODE']) - puts "[db:seed] Seeding Spree" - Spree::Core::Engine.load_seed if defined?(Spree::Core) - Spree::Auth::Engine.load_seed if defined?(Spree::Auth) + require File.join(File.dirname(__FILE__), 'default', 'countries') end - country = Spree::Country.find_by(iso: ENV['DEFAULT_COUNTRY_CODE']) -puts "Country is #{country.to_s}" - -puts "[db:seed] loading states yaml" -states = YAML::load_file "db/default/spree/states.yml" -puts "States: #{states.to_s}" +puts "Default country is #{country.to_s}" -# -- Seeding States puts "[db:seed] Seeding states for " + country.name - +states = YAML::load_file "db/default/states.yml" states.each do |state| puts "State: " + state.to_s - unless Spree::State.find_by(name: state['name']) Spree::State.create!({ name: state['name'], abbr: state['abbr'], country: country }) end end -# Create users: +puts "[db:seed] Seeding Zones" +require File.join(File.dirname(__FILE__), 'default', 'zones') + +puts "[db:seed] Seeding Users" require File.join(File.dirname(__FILE__), 'default', 'users') DefaultStockLocation.find_or_create