Skip to content

Commit

Permalink
Merge pull request #7026 from alphagov/dependabot/bundler/erb_lint-0.8.0
Browse files Browse the repository at this point in the history
Bump erb_lint from 0.7.0 to 0.8.0
  • Loading branch information
mtaylorgds authored and baisa committed Jan 9, 2025
2 parents 02eacab + 0d03928 commit f17985c
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 121 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ GEM
docile (1.4.0)
domain_name (0.6.20240107)
drb (2.2.1)
erb_lint (0.7.0)
erb_lint (0.8.0)
activesupport
better_html (>= 2.0.1)
parser (>= 2.7.1.4)
Expand Down
33 changes: 18 additions & 15 deletions app/flows/check_uk_visa_flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def define
if calculator.travelling_to_channel_islands_or_isle_of_man?
next question(:channel_islands_or_isle_of_man?)
elsif calculator.travelling_to_ireland?
if calculator.passport_country_requires_electronic_travel_authorisation?
if calculator.passport_country_is_taiwan?
next outcome(:outcome_transit_to_the_republic_of_ireland)
elsif calculator.passport_country_requires_electronic_travel_authorisation?
next outcome(:outcome_transit_to_the_republic_of_ireland_electronic_travel_authorisation)
elsif (calculator.passport_country_in_non_visa_national_list? ||
calculator.passport_country_in_eea? ||
Expand Down Expand Up @@ -197,10 +199,10 @@ def define
end
elsif calculator.staying_for_six_months_or_less?
if calculator.study_visit?
if calculator.passport_country_requires_electronic_travel_authorisation?
outcome :outcome_study_electronic_travel_authorisation
elsif calculator.passport_country_is_taiwan?
if calculator.passport_country_is_taiwan?
outcome :outcome_study_waiver_taiwan
elsif calculator.passport_country_requires_electronic_travel_authorisation?
outcome :outcome_study_electronic_travel_authorisation
elsif calculator.passport_country_in_direct_airside_transit_visa_list? ||
calculator.passport_country_in_visa_national_list? ||
calculator.travel_document?
Expand All @@ -209,10 +211,11 @@ def define
outcome :outcome_study_no_visa_needed # outcome 1 no visa needed
end
elsif calculator.work_visit?
if calculator.passport_country_requires_electronic_travel_authorisation?
if calculator.passport_country_is_taiwan?
outcome :outcome_work_n
elsif calculator.passport_country_requires_electronic_travel_authorisation?
outcome :outcome_work_electronic_travel_authorisation
elsif (calculator.passport_country_in_british_overseas_territories_list? ||
calculator.passport_country_is_taiwan? ||
calculator.passport_country_in_non_visa_national_list? ||
calculator.passport_country_in_eea?) &&
!calculator.travel_document?
Expand Down Expand Up @@ -341,10 +344,10 @@ def travel_response_next_route(node)
end

if calculator.school_visit?
if calculator.passport_country_requires_electronic_travel_authorisation?
next outcome(:outcome_school_electronic_travel_authorisation)
elsif calculator.passport_country_is_taiwan?
if calculator.passport_country_is_taiwan?
next outcome(:outcome_study_waiver_taiwan)
elsif calculator.passport_country_requires_electronic_travel_authorisation?
next outcome(:outcome_school_electronic_travel_authorisation)
elsif calculator.passport_country_in_non_visa_national_list? || calculator.passport_country_in_british_overseas_territories_list? || calculator.passport_country_in_eea?
next outcome(:outcome_school_n)
else
Expand All @@ -353,10 +356,10 @@ def travel_response_next_route(node)
end

if calculator.medical_visit?
if calculator.passport_country_requires_electronic_travel_authorisation?
next outcome(:outcome_medical_electronic_travel_authorisation)
elsif calculator.passport_country_is_taiwan?
if calculator.passport_country_is_taiwan?
next outcome(:outcome_visit_waiver_taiwan)
elsif calculator.passport_country_requires_electronic_travel_authorisation?
next outcome(:outcome_medical_electronic_travel_authorisation)
elsif (calculator.passport_country_in_non_visa_national_list? ||
calculator.passport_country_in_eea? ||
calculator.passport_country_in_british_overseas_territories_list?) &&
Expand All @@ -368,10 +371,10 @@ def travel_response_next_route(node)
end

if calculator.tourism_visit?
if calculator.passport_country_requires_electronic_travel_authorisation?
next outcome(:outcome_tourism_electronic_travel_authorisation)
elsif calculator.passport_country_is_taiwan?
if calculator.passport_country_is_taiwan?
next outcome(:outcome_visit_waiver_taiwan)
elsif calculator.passport_country_requires_electronic_travel_authorisation?
next outcome(:outcome_tourism_electronic_travel_authorisation)
elsif (calculator.passport_country_in_non_visa_national_list? ||
calculator.passport_country_in_eea? ||
calculator.passport_country_in_british_overseas_territories_list?) &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<% if calculator.passport_country_in_eta_rollout_group_1_rest_of_the_world? %>
^If you’re travelling on or after 8 January 2025, you’ll need to apply for an [electronic travel authorisation (ETA)](/guidance/apply-for-an-electronic-travel-authorisation-eta).
<% elsif calculator.passport_country_in_eta_rollout_group_2_eu_eea? %>
<% if calculator.passport_country_in_eta_rollout_group_2_eu_eea? %>
^If you’re travelling on or after 2 April 2025, you’ll need to apply for an [electronic travel authorisation (ETA)](/guidance/apply-for-an-electronic-travel-authorisation-eta). You’ll be able to apply from 5 March 2025.
<% end %>
111 changes: 52 additions & 59 deletions lib/smart_answer/calculators/uk_visa_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ def passport_country_in_british_national_overseas_list?
COUNTRY_GROUP_BRITISH_NATIONAL_OVERSEAS.include?(@passport_country)
end

def passport_country_in_eta_rollout_group_1_rest_of_the_world?
COUNTRY_GROUP_ETA_ROLLOUT_GROUP_1_REST_OF_THE_WORLD.include?(@passport_country)
end

def passport_country_in_eta_rollout_group_2_eu_eea?
COUNTRY_GROUP_ETA_ROLLOUT_GROUP_2_EU_EEA.include?(@passport_country)
end
Expand Down Expand Up @@ -553,12 +549,63 @@ def show_colombia_visa_change_transition_text?
].freeze

COUNTRY_GROUP_ELECTRONIC_TRAVEL_AUTHORISATION = %w[
qatar
antigua-and-barbuda
argentina
australia
bahamas
bahrain
barbados
belize
botswana
brazil
british-national-overseas
brunei
canada
chile
colombia
costa-rica
federated-states-of-micronesia
grenada
guatemala
guyana
hong-kong
hong-kong-(british-national-overseas)
israel
japan
kiribati
kuwait
macao
malaysia
maldives
marshall-islands
mauritius
mexico
nauru
new-zealand
nicaragua
oman
palau
panama
papua-new-guinea
paraguay
peru
qatar
samoa
saudi-arabia
seychelles
singapore
solomon-islands
south-korea
st-kitts-and-nevis
st-lucia
st-vincent-and-the-grenadines
taiwan
tonga
trinidad-and-tobago
tuvalu
united-arab-emirates
uruguay
usa
].freeze

COUNTRY_GROUP_EPASSPORT_GATES = %w[
Expand Down Expand Up @@ -630,60 +677,6 @@ def show_colombia_visa_change_transition_text?
"zimbabwe",
].flatten.freeze

COUNTRY_GROUP_ETA_ROLLOUT_GROUP_1_REST_OF_THE_WORLD = %w[
antigua-and-barbuda
argentina
australia
bahamas
barbados
belize
botswana
brazil
british-national-overseas
brunei
canada
chile
colombia
costa-rica
federated-states-of-micronesia
grenada
guatemala
guyana
hong-kong
hong-kong-(british-national-overseas)
israel
japan
kiribati
macao
malaysia
maldives
marshall-islands
mauritius
mexico
nauru
new-zealand
nicaragua
palau
panama
papua-new-guinea
paraguay
peru
samoa
seychelles
singapore
solomon-islands
south-korea
st-kitts-and-nevis
st-lucia
st-vincent-and-the-grenadines
taiwan
tonga
trinidad-and-tobago
tuvalu
uruguay
usa
].freeze

COUNTRY_GROUP_ETA_ROLLOUT_GROUP_2_EU_EEA = %w[
andorra
austria
Expand Down
Loading

0 comments on commit f17985c

Please sign in to comment.