diff --git a/config/smart_answers/marriage_abroad_data.yml b/config/smart_answers/marriage_abroad_data.yml deleted file mode 100644 index ea6b2404e63..00000000000 --- a/config/smart_answers/marriage_abroad_data.yml +++ /dev/null @@ -1,235 +0,0 @@ ---- -countries_with_18_outcomes: - - afghanistan - - albania - - algeria - - american-samoa - - andorra - - angola - - anguilla - - antigua-and-barbuda - - argentina - - armenia - - aruba - - austria - - azerbaijan - - bahamas - - bahrain - - bangladesh - - barbados - - belarus - - belgium - - belize - - benin - - bermuda - - bhutan - - bonaire-st-eustatius-saba - - bosnia-and-herzegovina - - botswana - - brazil - - british-indian-ocean-territory - - british-virgin-islands - - brunei - - bulgaria - - burkina-faso - - burundi - - cambodia - - cameroon - - canada - - cape-verde - - cayman-islands - - central-african-republic - - chad - - china - - colombia - - comoros - - costa-rica - - cote-d-ivoire - - cuba - - curacao - - czech-republic - - democratic-republic-of-the-congo - - djibouti - - dominica - - dominican-republic - - ecuador - - el-salvador - - equatorial-guinea - - eritrea - - estonia - - eswatini - - ethiopia - - falkland-islands - - fiji - - gabon - - georgia - - germany - - ghana - - gibraltar - - grenada - - guatemala - - guinea - - guinea-bissau - - guyana - - haiti - - honduras - - hong-kong - - indonesia - - iran - - iraq - - israel - - jamaica - - jordan - - kazakhstan - - kenya - - kiribati - - kosovo - - kuwait - - kyrgyzstan - - laos - - latvia - - lebanon - - lesotho - - liberia - - libya - - liechtenstein - - lithuania - - macao - - madagascar - - malawi - - malaysia - - maldives - - malta - - marshall-islands - - mauritania - - mauritius - - mexico - - micronesia - - moldova - - mongolia - - montenegro - - montserrat - - morocco - - mozambique - - myanmar - - namibia - - nauru - - nepal - - netherlands - - new-zealand - - nicaragua - - niger - - nigeria - - north-korea - - north-macedonia - - norway - - oman - - pakistan - - palau - - papua-new-guinea - - paraguay - - peru - - pitcairn-island - - qatar - - romania - - russia - - rwanda - - saint-barthelemy - - san-marino - - sao-tome-and-principe - - saudi-arabia - - senegal - - serbia - - seychelles - - sierra-leone - - singapore - - slovakia - - slovenia - - solomon-islands - - somalia - - south-georgia-and-the-south-sandwich-islands - - south-sudan - - sri-lanka - - st-helena-ascension-and-tristan-da-cunha - - st-kitts-and-nevis - - st-lucia - - st-maarten - - st-martin - - st-vincent-and-the-grenadines - - sudan - - suriname - - sweden - - syria - - taiwan - - tajikistan - - tanzania - - the-gambia - - timor-leste - - togo - - tonga - - trinidad-and-tobago - - tunisia - - turkmenistan - - turks-and-caicos-islands - - tuvalu - - uganda - - ukraine - - united-arab-emirates - - uruguay - - uzbekistan - - vanuatu - - venezuela - - western-sahara - - yemen - - zambia -countries_with_19_outcomes: - - bolivia - - panama - - vietnam -countries_with_2_outcomes: - - australia - - croatia - - cyprus - - egypt - - india - - ireland - - luxembourg - - mali - - philippines - - south-africa - - south-korea - - south-korea - - thailand - - turkey - - usa - - zimbabwe -countries_with_3_outcomes: - - japan -countries_with_2_outcomes_marriage_or_pacs: - - monaco -countries_with_6_outcomes: - - congo - - greece - - hungary - - italy - - poland - - spain - - switzerland -countries_with_ceremony_location_outcomes: - - denmark - - finland - - iceland -countries_with_9_outcomes: - - chile -countries_with_1_outcome: - - france - - french-guiana - - french-polynesia - - guadeloupe - - martinique - - mayotte - - new-caledonia - - portugal - - reunion - - st-pierre-and-miquelon - - wallis-and-futuna diff --git a/config/smart_answers/marriage_abroad_services.yml b/config/smart_answers/marriage_abroad_services.yml deleted file mode 100644 index cb1dd741973..00000000000 --- a/config/smart_answers/marriage_abroad_services.yml +++ /dev/null @@ -1,870 +0,0 @@ ---- -belgium: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -brazil: - opposite_sex: - third_country: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - third_country: - default: - - :affidavit_or_affirmation_for_marriage -china: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -ecuador: - opposite_sex: - default: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -egypt: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -finland: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_euros_or_visa_electron -iran: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_iranian_cash_only -lebanon: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -macao: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -mongolia: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -morocco: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -north-macedonia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -norway: - opposite_sex: - ceremony_country: - default: - - :affidavit_or_affirmation_for_marriage - uk: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_visas_or_mastercard -peru: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership_or_marriage - - :issuing_civil_partnership_or_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -philippines: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership_or_marriage - - :issuing_civil_partnership_or_marriage_certificate - payment_partial_name: pay_by_cash_or_bank_cheque -qatar: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -south-korea: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_in_local_currency_or_credit_card_not_cheque -thailand: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -turkey: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -united-arab-emirates: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -vietnam: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - partner_other: - - :receiving_notice_of_registration - - :registering_civil_partnership_or_marriage - - :issuing_civil_partnership_or_marriage_certificate - partner_british: - - :receiving_notice_of_registration - - :registering_civil_partnership_or_marriage - - :issuing_civil_partnership_or_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_personal_cheque -dominican-republic: - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -spain: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_visas_or_mastercard -belarus: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_only -cambodia: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - partner_other: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_in_us_dollars_or_maestro_or_visa_or_mastercard -albania: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership - - :issuing_civil_partnership_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -algeria: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -angola: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -armenia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_local_currency_ceremony_country_name -austria: - opposite_sex: - ceremony_country: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_mastercard_and_visa_credit_debit - same_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_mastercard_and_visa_credit_debit -azerbaijan: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -bahrain: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -bolivia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -bosnia-and-herzegovina: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_local_currency_ceremony_country_name -bulgaria: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership - - :issuing_civil_partnership_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -chile: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -croatia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership - - :issuing_civil_partnership_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -cuba: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -denmark: - opposite_sex: - ceremony_country: - default: - - :issuing_cni_or_nulla_osta - default: - default: - - :issuing_cni_or_nulla_osta - same_sex: - ceremony_country: - default: - - :issuing_cni_or_nulla_osta - default: - default: - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -el-salvador: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -estonia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -ethiopia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -georgia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -greece: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -guatemala: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership - - :issuing_civil_partnership_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -honduras: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -hungary: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -iceland: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_local_currency_ceremony_country_name -jordan: - opposite_sex: - ceremony_country: - default: - - :affidavit_or_affirmation_for_marriage - third_country: - default: - - :affidavit_or_affirmation_for_marriage - uk: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -kazakhstan: - opposite_sex: - ceremony_country: - default: - - :affidavit_or_affirmation_for_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_local_currency_ceremony_country_name -kyrgyzstan: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_local_currency_ceremony_country_name -latvia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - uk: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - partner_other: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_in_local_currency_ceremony_country_name -lithuania: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -luxembourg: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_cash_visa_or_mastercard -mexico: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -moldova: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership - - :issuing_civil_partnership_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -montenegro: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -nepal: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -nicaragua: - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - partner_local: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - partner_other: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -panama: - same_sex: - default: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - - :registering_marriage - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -romania: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - partner_other: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -russia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_mastercard_and_visa_only -serbia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -sudan: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -sweden: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - default: - default: - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -tajikistan: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_local_currency_ceremony_country_name -tunisia: - opposite_sex: - default: - default: - - :issuing_cni_or_nulla_osta - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_debit_or_credit_card -turkmenistan: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -uzbekistan: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -venezuela: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership - - :issuing_civil_partnership_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -germany: - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - partner_other: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -indonesia: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage -japan: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership_or_marriage - - :issuing_civil_partnership_or_marriage_certificate - payment_partial_name: pay_in_japan -kosovo: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - same_sex: - default: - partner_british: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - partner_other: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -kuwait: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque_nor_amex -laos: - opposite_sex: - default: - partner_local: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -oman: - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -saudi-arabia: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -poland: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -slovenia: - opposite_sex: - ceremony_country: - default: - - :affidavit_or_affirmation_for_marriage - uk: - default: - - :affidavit_or_affirmation_for_marriage - same_sex: - default: - default: - - :issuing_cni_or_nulla_osta - payment_partial_name: pay_in_local_currency_ceremony_country_name -cyprus: - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership - - :issuing_civil_partnership_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -malta: - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_civil_partnership_or_marriage - - :issuing_civil_partnership_or_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -australia: - same_sex: - default: - default: - - :receiving_notice_of_registration - - :registering_marriage - - :issuing_marriage_certificate - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -colombia: - same_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - opposite_sex: - default: - default: - - :affidavit_or_affirmation_for_marriage - payment_partial_name: pay_by_cash_or_credit_card_no_cheque -france: - default: - - :issuing_custom_and_law_certificate -french-guiana: - default: - - :issuing_custom_and_law_certificate -french-polynesia: - default: - - :issuing_custom_and_law_certificate -guadeloupe: - default: - - :issuing_custom_and_law_certificate -martinique: - default: - - :issuing_custom_and_law_certificate -mayotte: - default: - - :issuing_custom_and_law_certificate -monaco: - default: - - :issuing_custom_and_law_certificate -new-caledonia: - default: - - :issuing_custom_and_law_certificate -reunion: - default: - - :issuing_custom_and_law_certificate -st-pierre-and-miquelon: - default: - - :issuing_custom_and_law_certificate -wallis-and-futuna: - default: - - :issuing_custom_and_law_certificate -democratic-republic-of-the-congo: - opposite_sex: - ceremony_country: - default: - - :receiving_notice_of_marriage - - :issuing_cni_or_nulla_osta diff --git a/config/smart_answers/rates/marriage_abroad_consular_fees.yml b/config/smart_answers/rates/marriage_abroad_consular_fees.yml deleted file mode 100644 index 516ba4eaedc..00000000000 --- a/config/smart_answers/rates/marriage_abroad_consular_fees.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Only the current date is used, so this file should only have -# at most 2 items (current and future when uprating is coming), -# and usually 1. The last item in the file should have an end -# date of 2999-01-01 ---- -- start_date: 2016-04-06 - end_date: 2999-01-01 - affidavit_or_affirmation_for_marriage: 50 - issuing_civil_partnership_certificate: 50 - issuing_civil_partnership_or_marriage_certificate: 50 - issuing_cni_or_nulla_osta: 50 - issuing_custom_and_law_certificate: 50 - issuing_marriage_certificate: 50 - receiving_notice_of_marriage: 50 - receiving_notice_of_civil_partnership: 50 - receiving_notice_of_marriage_or_civil_partnership: 50 - receiving_notice_of_registration: 50 - registering_civil_partnership: 150 - registering_civil_partnership_or_marriage: 150 - registering_marriage: 150 diff --git a/docs/tasks/flattening-outcomes.md b/docs/tasks/flattening-outcomes.md deleted file mode 100644 index 64add946aa5..00000000000 --- a/docs/tasks/flattening-outcomes.md +++ /dev/null @@ -1,16 +0,0 @@ -# Flattening Marriage Abroad outcomes for a country - -**1. Run the rake task to flatten the outcomes:** - - `bundle exec rake marriage_abroad:flatten_outcomes[]` - - `# e.g. bundle exec rake "marriage_abroad:flatten_outcomes[qatar]"` - -**2. Add or move the country into the right section of these files:** - - `config/smart_answers/marriage_abroad_data.yml` - - `test/integration/flows/marriage_abroad_test.rb` - -**3. Update any special cases in these files:** - - `test/integration/flows/marriage_abroad_test.rb` - - `app/flows/marriage_abroad_flow.rb` - -**4. Remove any special-case outcome files for the country here:** - - `app/flows/marriage_abroad/outcomes` diff --git a/lib/marriage_abroad_outcome_flattener.rb b/lib/marriage_abroad_outcome_flattener.rb deleted file mode 100644 index c9bb83ed9a7..00000000000 --- a/lib/marriage_abroad_outcome_flattener.rb +++ /dev/null @@ -1,167 +0,0 @@ -require "rails/console/app" - -# TODO: Break this class up a bit -class MarriageAbroadOutcomeFlattener - COUNTRIES_DIR = "app/flows/marriage_abroad_flow/outcomes/countries".freeze - - include Rails::ConsoleMethods - - def initialize(country, logger: Logger.new($stdout)) - @country = country - @logger = logger - end - - def flatten - logger.info("Flattening outcomes for #{country}") - generate_and_add_partials_to_country_files - end - -private - - attr_reader :country, :logger - - def generate_and_add_partials_to_country_files - visited_nodes = Set.new - titles = {} - responses_and_expected_results.each do |responses_and_expected_node| - next_node = responses_and_expected_node[:next_node] - responses = responses_and_expected_node[:responses] - question_node = !responses_and_expected_node[:outcome_node] - - next unless %w[opposite_sex same_sex].include?(responses.last) - next if question_node && visited_nodes.include?(next_node) - - visited_nodes << next_node - - responses_path = responses.join("/") - - route = "/marriage-abroad/y/#{responses_path}.txt" - raise "Failed to load `#{route}`" unless app.get(route) == 200 - - body = app.response.body - template_path = "#{country_outcome_path(responses_path)}.erb" - - responses_directory = File.dirname(template_path) - FileUtils.mkdir_p(responses_directory) unless File.directory?(responses_directory) - - lines = body.split("\n") - titles[responses.last] = lines.shift - lines.shift - - File.write(template_path, "#{insert_payment_partials(lines.join("\n"))}\n") - end - - File.write("#{country_partials_dir}/_title.erb", title_contents(titles)) - end - - # Strips the first two lines of the file (the title). - # Replaces payment instructions with a shared partial erb snippet. - # Replaces service fee with a fees table shared partial erb snippet. - def insert_payment_partials(body) - replace_fee_table(replace_how_to_pay(body)) - end - - def country_outcome_path(responses_path) - "#{COUNTRIES_DIR}/#{responses_path}" - .gsub("same_sex", "_same_sex") - .gsub("opposite_sex", "_opposite_sex") - end - - def country_partials_dir - "#{COUNTRIES_DIR}/#{country}" - end - - def replace_how_to_pay(text) - text.gsub( - /^\^?You can( only)? pay by.*?\n.*?^$/mi, - <<~HOW_TO_PAY.freeze, - <%= render partial: 'how_to_pay.erb', locals: {calculator: calculator} %> - HOW_TO_PAY - ) - end - - def replace_fee_table(text) - text.gsub( - /^Service \| Fee\n.*?^$/mi, - <<~FEE_TABLE.freeze, - <%= render partial: 'consular_fees_table_items.erb', - collection: calculator.services, - as: :service, - locals: { calculator: calculator } %> - FEE_TABLE - ) - end - - def title_contents(titles) - <<~TITLE.freeze - <% if calculator.partner_is_same_sex? %> - #{titles['same_sex']} - <% else %> - #{titles['opposite_sex']} - <% end %> - TITLE - end - - def questions_and_responses - @questions_and_responses ||= flow.questions.each_with_object({}) do |question, hash| - if question.is_a?(SmartAnswer::Question::CountrySelect) - hash[question.name] = question.options.map(&:slug) - elsif question.respond_to?(:options) - hash[question.name] = question.options - else - question_node = flow.node(question) - question_text = QuestionPresenter.new(question_node, {}, helpers: [MethodMissingHelper]).title - - raise UnknownResponse, "Unknown response to this question: `#{question.name}`: #{question_text}" - end - end - end - - def flow - @flow ||= SmartAnswer::FlowRegistry.instance.find("marriage-abroad") - end - - def flow_with_country_selected - @flow_with_country_selected ||= flow.process([@country]) - end - - def responses_and_expected_results - @responses_and_expected_results ||= recursively_answer_questions(flow_with_country_selected, []) - end - - def recursively_answer_questions(state, array) - question_name = state.current_node - existing_responses = state.responses - - questions_and_responses[question_name].each do |response| - responses = existing_responses + [response] - state = flow.process(responses) - next_node = flow.node(state.current_node) - - array << { - current_node: question_name, - responses: responses.map(&:to_s), - next_node: next_node.name, - outcome_node: next_node.outcome?, - } - - unless next_node.outcome? || state.error - recursively_answer_questions(state, array) - end - end - - array - end - - # Disabling the linter here because this is already quite bad current_node - # but it was copied from elsewhere and I'm not messing with it now. - # rubocop:disable Style/MissingRespondToMissing - module MethodMissingHelper - def method_missing(method, *_args, &_block) - MethodMissingObject.new(method) - end - end - # rubocop:enable Style/MissingRespondToMissing - - class UnknownResponse < StandardError; end -end diff --git a/lib/tasks/marriage_abroad.rake b/lib/tasks/marriage_abroad.rake deleted file mode 100644 index e48c0392a7f..00000000000 --- a/lib/tasks/marriage_abroad.rake +++ /dev/null @@ -1,8 +0,0 @@ -namespace :marriage_abroad do - desc "Flatten a set of outcomes for a given country" - task :flatten_outcomes, %i[country] => [:environment] do |_, args| - ENV["GOVUK_WEBSITE_ROOT"] ||= "https://www.gov.uk" - ENV["PLEK_SERVICE_CONTENT_STORE_URI"] ||= "https://www.gov.uk/api" - MarriageAbroadOutcomeFlattener.new(args[:country]).flatten - end -end