Skip to content

Commit

Permalink
Merge pull request #1482 from alphagov/dependabot/bundler/rubocop-gov…
Browse files Browse the repository at this point in the history
…uk-4.13.0

Bump rubocop-govuk from 4.12.0 to 4.13.0
  • Loading branch information
jkempster34 authored Dec 28, 2023
2 parents 4bf1acb + b995d7e commit 9b51bef
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 22 deletions.
29 changes: 15 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.6.3)
json (2.7.1)
jwt (2.7.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
Expand Down Expand Up @@ -578,7 +578,7 @@ GEM
paper_trail (15.1.0)
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.23.0)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
Expand Down Expand Up @@ -686,37 +686,38 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rubocop (1.55.0)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-govuk (4.12.0)
rubocop (= 1.55.0)
rubocop-ast (= 1.29.0)
rubocop-rails (= 2.20.2)
rubocop-govuk (4.13.0)
rubocop (= 1.59.0)
rubocop-ast (= 1.30.0)
rubocop-rails (= 2.23.0)
rubocop-rake (= 0.6.0)
rubocop-rspec (= 2.22.0)
rubocop-rails (2.20.2)
rubocop-rspec (= 2.25.0)
rubocop-rails (2.23.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/hits_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def universal_category
protected

def set_period
@period = (View::Hits::TimePeriod[params[:period]] || View::Hits::TimePeriod.default)
@period = View::Hits::TimePeriod[params[:period]] || View::Hits::TimePeriod.default
end

def hits_in_period
Expand Down
2 changes: 1 addition & 1 deletion app/models/mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def path_is_valid_for_canonicalization?
# '/' is a homepage path and not valid for a mapping
# a path that doesn't start with a '/' isn't a valid path
# full validation still needs to be run on the path
!((path == "/" || path =~ /^[^\/]/))
!(path == "/" || path =~ /^[^\/]/)
end

def tna_timestamp
Expand Down
2 changes: 1 addition & 1 deletion app/validators/host_in_whitelist_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def validate_each(record, attribute, value)
return if value.blank?

unless in_whitelist?(value)
message = (options[:message] || "must be on a whitelisted domain. <a href='https://support.publishing.service.gov.uk/general_request/new'>Raise a support request through the GOV.UK Support form</a> for more information.")
message = options[:message] || "must be on a whitelisted domain. <a href='https://support.publishing.service.gov.uk/general_request/new'>Raise a support request through the GOV.UK Support form</a> for more information."
record.errors.add(attribute, message)
end
end
Expand Down
4 changes: 3 additions & 1 deletion features/step_definitions/hits_assertion_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@

Then(/^each hit except homepages and global redirects or archives should have a link to check its mapping$/) do
within ".hits tbody" do
page.all("tr").each do |row|
rows = page.all("tr")

rows.each do |row|
path = row.find(:css, ".path").text
next if path == "/" || @site.global_type.present?

Expand Down
4 changes: 3 additions & 1 deletion features/step_definitions/mappings_assertion_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@
expect(page).to have_selector(".mappings-index .tag-list", count: @site.mappings.count)

expected_tags = tag_list.split(",").map(&:strip)
page.all(".tag-list").each do |mapping_tags_list|
mapping_tags_lists = page.all(".tag-list")

mapping_tags_lists.each do |mapping_tags_list|
expected_tags.each do |tag|
expect(mapping_tags_list).to have_selector(".tag", text: tag)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/transition/import/materialized_views/hits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def self.all_hits_all_time(site)
end

def self.replace!
Site.where(precompute_all_hits_view: true).each do |site|
Site.where(precompute_all_hits_view: true).find_each do |site|
view_name = "all_hits_#{site.id}"

doing = Postgres::MaterializedView.exists?(view_name) ? "Refreshing" : "Creating"
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/bulk_add_batches_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def make_request
end

it "has the long url for each" do
Mapping.all.each do |mapping|
Mapping.all.find_each do |mapping|
expect(mapping.new_url).to eql(long_url)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/transition/import/hits_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def mock_s3_response(contents)
lambda do |context|
key = context.params[:key]
file = contents[key]
return { body: File.open("spec/fixtures/hits/#{file}") }
{ body: File.open("spec/fixtures/hits/#{file}") }
end,
)

Expand Down

0 comments on commit 9b51bef

Please sign in to comment.