diff --git a/Gemfile.lock b/Gemfile.lock index 7737fac0..8565be39 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -90,7 +90,7 @@ GEM byebug (11.1.3) climate_control (1.2.0) coderay (1.1.3) - concurrent-ruby (1.3.4) + concurrent-ruby (1.3.5) connection_pool (2.5.0) crack (1.0.0) bigdecimal @@ -509,7 +509,7 @@ GEM term-ansicolor (~> 1.7) thor (>= 0.20, < 2.0) parallel (1.26.3) - parser (3.3.6.0) + parser (3.3.7.0) ast (~> 2.4.1) racc parslet (2.0.0) @@ -620,7 +620,7 @@ GEM rspec-mocks (~> 3.0) sidekiq (>= 5, < 8) rspec-support (3.13.1) - rubocop (1.69.2) + rubocop (1.70.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -634,8 +634,8 @@ GEM parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-govuk (5.0.7) - rubocop (= 1.69.2) + rubocop-govuk (5.0.8) + rubocop (= 1.70.0) rubocop-ast (= 1.37.0) rubocop-capybara (= 2.21.0) rubocop-rails (= 2.28.0) @@ -702,7 +702,7 @@ GEM sync tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.3) + unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) uri (1.0.2) diff --git a/app/lib/link_checker/uri_checker/http_checker.rb b/app/lib/link_checker/uri_checker/http_checker.rb index dda24f5d..4dd551cb 100644 --- a/app/lib/link_checker/uri_checker/http_checker.rb +++ b/app/lib/link_checker/uri_checker/http_checker.rb @@ -175,9 +175,9 @@ def check_request add_problem(SlowResponse.new(from_redirect: from_redirect?)) if response_time > RESPONSE_TIME_WARNING - if response.status == 404 || response.status == 410 + if [404, 410].include?(response.status) add_problem(PageNotFound.new(from_redirect: from_redirect?)) - elsif response.status == 401 || response.status == 403 + elsif [401, 403].include?(response.status) if response.headers["cf-mitigated"] == "challenge" add_problem(PageBlocksBots.new(from_redirect: from_redirect?)) else