From e4e3ca8737d0df88f9ef759aa0440efe827b6ae4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2020 16:07:15 +0000 Subject: [PATCH 1/2] Bump rubocop-govuk from 3.15.0 to 3.16.0 Bumps [rubocop-govuk](https://github.com/alphagov/rubocop-govuk) from 3.15.0 to 3.16.0. - [Release notes](https://github.com/alphagov/rubocop-govuk/releases) - [Changelog](https://github.com/alphagov/rubocop-govuk/blob/master/CHANGELOG.md) - [Commits](https://github.com/alphagov/rubocop-govuk/compare/v3.15.0...v3.16.0) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5bff69e67..91f9f4933 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,7 +54,7 @@ GEM asset_bom_removal-rails (1.0.2) rails (>= 4.2) sass (> 3.4) - ast (2.4.0) + ast (2.4.1) better_errors (2.7.1) coderay (>= 1.0.0) erubi (>= 1.0.0) @@ -236,7 +236,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (1.7.0) + regexp_parser (1.7.1) request_store (1.5.0) rack (>= 1.4) rest-client (2.1.0) @@ -247,7 +247,7 @@ GEM rexml (3.2.4) robotex (1.0.0) rouge (3.20.0) - rubocop (0.85.0) + rubocop (0.85.1) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) @@ -258,15 +258,15 @@ GEM unicode-display_width (>= 1.4.0, < 2.0) rubocop-ast (0.0.3) parser (>= 2.7.0.1) - rubocop-govuk (3.15.0) - rubocop (= 0.85.0) - rubocop-rails (~> 2) - rubocop-rake (~> 0.5.1) - rubocop-rspec (~> 1.28) - rubocop-rails (2.5.2) - activesupport + rubocop-govuk (3.16.0) + rubocop (= 0.85.1) + rubocop-rails (= 2.6.0) + rubocop-rake (= 0.5.1) + rubocop-rspec (= 1.39.0) + rubocop-rails (2.6.0) + activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.72.0) + rubocop (>= 0.82.0) rubocop-rake (0.5.1) rubocop rubocop-rspec (1.39.0) From a9cec974f5ef5aff6cd3cdae6ff57396727f5060 Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Wed, 10 Jun 2020 17:16:54 +0100 Subject: [PATCH 2/2] Linting auto-correct --- app/presenters/content_item/corporate_information_groups.rb | 6 ++---- app/presenters/content_item/withdrawable.rb | 3 +-- app/presenters/speech_presenter.rb | 2 +- app/presenters/travel_advice_presenter.rb | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/presenters/content_item/corporate_information_groups.rb b/app/presenters/content_item/corporate_information_groups.rb index 5b3baf355..d433a6ee2 100644 --- a/app/presenters/content_item/corporate_information_groups.rb +++ b/app/presenters/content_item/corporate_information_groups.rb @@ -9,8 +9,7 @@ def corporate_information? def corporate_information corporate_information_groups.map do |group| { - heading: view_context.content_tag( - :h3, + heading: view_context.tag.h3( group["name"], id: group_title_id(group["name"]), ), @@ -20,8 +19,7 @@ def corporate_information end def corporate_information_heading_tag - view_context.content_tag( - :h2, + view_context.tag.h2( corporate_information_heading[:text], id: corporate_information_heading[:id], ) diff --git a/app/presenters/content_item/withdrawable.rb b/app/presenters/content_item/withdrawable.rb index bc8a9e2c3..382a8802d 100644 --- a/app/presenters/content_item/withdrawable.rb +++ b/app/presenters/content_item/withdrawable.rb @@ -33,8 +33,7 @@ def withdrawal_notice_context end def withdrawal_notice_time - view_context.content_tag( - :time, + view_context.tag.time( english_display_date(withdrawal_notice["withdrawn_at"]), datetime: withdrawal_notice["withdrawn_at"], ) diff --git a/app/presenters/speech_presenter.rb b/app/presenters/speech_presenter.rb index 6aa091eeb..b364fcd53 100644 --- a/app/presenters/speech_presenter.rb +++ b/app/presenters/speech_presenter.rb @@ -39,7 +39,7 @@ def location def delivered_on delivered_on_date = content_item["details"]["delivered_on"] - view_context.content_tag(:time, display_date(delivered_on_date), datetime: delivered_on_date) + view_context.tag.time(display_date(delivered_on_date), datetime: delivered_on_date) end def speech_type_explanation diff --git a/app/presenters/travel_advice_presenter.rb b/app/presenters/travel_advice_presenter.rb index 982f8a9ea..2661e226b 100644 --- a/app/presenters/travel_advice_presenter.rb +++ b/app/presenters/travel_advice_presenter.rb @@ -77,7 +77,7 @@ def alert_status alert_statuses = alert_statuses.map do |alert| if allowed_statuses.include?(alert) copy = I18n.t("travel_advice.alert_status.#{alert}").html_safe - view_context.content_tag(:p, copy) + view_context.tag.p(copy) end end