From 1a6c2e450a1fafc53ab4c435c5760a9c1c9d61e9 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 13 Jul 2023 05:11:55 -0400 Subject: [PATCH] Update rubocop to v1.54.1 (#25627) --- .rubocop_todo.yml | 4 +--- Gemfile.lock | 4 +++- app/helpers/domain_control_helper.rb | 2 +- app/lib/connection_pool/shared_connection_pool.rb | 2 +- app/lib/request_pool.rb | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 83c0ef0f0..0f8fa6770 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.52.1. +# using RuboCop version 1.54.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -28,7 +28,6 @@ Layout/ArgumentAlignment: # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit Layout/HashAlignment: Exclude: - - 'config/boot.rb' - 'config/environments/production.rb' - 'config/initializers/rack_attack.rb' - 'config/routes.rb' @@ -252,7 +251,6 @@ RSpec/HookArgument: - 'spec/serializers/activitypub/note_serializer_spec.rb' - 'spec/serializers/activitypub/update_poll_serializer_spec.rb' - 'spec/services/import_service_spec.rb' - - 'spec/spec_helper.rb' # Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: diff --git a/Gemfile.lock b/Gemfile.lock index 990fe3f9b..7cd102c5a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -379,6 +379,7 @@ GEM marcel (~> 1.0.1) mime-types terrapin (~> 0.6.0) + language_server-protocol (3.17.0.3) launchy (2.5.2) addressable (~> 2.8) letter_opener (1.8.1) @@ -595,8 +596,9 @@ GEM sidekiq (>= 2.4.0) rspec-support (3.12.0) rspec_chunked (0.6) - rubocop (1.52.1) + rubocop (1.54.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) diff --git a/app/helpers/domain_control_helper.rb b/app/helpers/domain_control_helper.rb index ffcf375ea..6fce7eb1f 100644 --- a/app/helpers/domain_control_helper.rb +++ b/app/helpers/domain_control_helper.rb @@ -2,7 +2,7 @@ module DomainControlHelper def domain_not_allowed?(uri_or_domain) - return if uri_or_domain.blank? + return false if uri_or_domain.blank? domain = if uri_or_domain.include?('://') Addressable::URI.parse(uri_or_domain).host diff --git a/app/lib/connection_pool/shared_connection_pool.rb b/app/lib/connection_pool/shared_connection_pool.rb index 741529652..3ca22d0ef 100644 --- a/app/lib/connection_pool/shared_connection_pool.rb +++ b/app/lib/connection_pool/shared_connection_pool.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'connection_pool' -require_relative './shared_timed_stack' +require_relative 'shared_timed_stack' class ConnectionPool::SharedConnectionPool < ConnectionPool def initialize(options = {}, &block) diff --git a/app/lib/request_pool.rb b/app/lib/request_pool.rb index 86c825498..82d9a71c9 100644 --- a/app/lib/request_pool.rb +++ b/app/lib/request_pool.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative './connection_pool/shared_connection_pool' +require_relative 'connection_pool/shared_connection_pool' class RequestPool def self.current