Skip to content

Commit 26ba052

Browse files
author
Ben Thorner
committed
Manually fix remaining linting issues
1 parent 853a8c5 commit 26ba052

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

app/presenters/content_item/metadata.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def publisher_metadata
2323
{
2424
published: published,
2525
last_updated: updated,
26-
link_to_history: !!updated,
26+
link_to_history: updated.present?,
2727
other: {
2828
from: from,
2929
},

app/presenters/content_item/parts.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def requesting_a_part?
1616
end
1717

1818
def has_valid_part?
19-
!!current_part && current_part != parts.first
19+
current_part && current_part != parts.first
2020
end
2121

2222
def current_part_title

app/presenters/content_item/updatable.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def change_history
3535
end
3636
end
3737

38-
# The direction of change history isnt guaranteed
38+
# The direction of change history isn't guaranteed
3939
# https://github.com/alphagov/govuk-content-schemas/issues/545
4040
def reverse_chronological_change_history
4141
change_history.sort_by { |item| Time.zone.parse(item[:timestamp]) }.reverse

app/presenters/specialist_document_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def any_updates?
214214
# Example:
215215
# https://www.gov.uk/aaib-reports/lockheed-l1011-385-1-15-g-bhbr-19-december-1989
216216
def bulk_published?
217-
!!facet_values["bulk_published"]
217+
facet_values["bulk_published"].present?
218218
end
219219

220220
def statutory_instrument?

app/presenters/travel_advice_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def change_description
123123
# This led to users appending (in a variety of formats)
124124
# "Latest update:" to the start of the change description. The frontend now
125125
# has a latest update label, so we can strip this out.
126-
# Avoids: "Latest update: Latest update - "
126+
# Avoids: "Latest update: Latest update - ..."
127127
def latest_update
128128
change_description.sub(/^Latest update:?\s-?\s?/i, "").tap do |latest|
129129
latest[0] = latest[0].capitalize if latest.present?

test/integration/consultation_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ConsultationTest < ActionDispatch::IntegrationTest
5656

5757
assert page.has_text?("Consultation")
5858

59-
# Theres no daylight savings after 2037
59+
# There's no daylight savings after 2037
6060
# http://timezonesjl.readthedocs.io/en/stable/faq/#far-future-zoneddatetime-with-variabletimezone
6161
assert page.has_css?(".gem-c-notice", text: "This consultation opens at 1pm on 5 October 2200")
6262
assert page.has_text?(:all, "It closes at 4pm on 31 October 2210")

0 commit comments

Comments
 (0)