mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-23 11:03:50 -05:00
Update rubocop to version 1.72.2 and use plugins
configuration style (#33946)
This commit is contained in:
parent
405fa6de55
commit
d75c4bf53e
@ -26,9 +26,11 @@ inherit_mode:
|
||||
merge:
|
||||
- Exclude
|
||||
|
||||
require:
|
||||
plugins:
|
||||
- rubocop-rails
|
||||
- rubocop-rspec
|
||||
- rubocop-rspec_rails
|
||||
- rubocop-performance
|
||||
|
||||
require:
|
||||
- rubocop-rspec_rails
|
||||
- rubocop-capybara
|
||||
|
@ -2,6 +2,9 @@
|
||||
Rails/BulkChangeTable:
|
||||
Enabled: false # Conflicts with strong_migrations features
|
||||
|
||||
Rails/Delegate:
|
||||
Enabled: false
|
||||
|
||||
Rails/FilePath:
|
||||
EnforcedStyle: arguments
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
|
||||
# using RuboCop version 1.70.0.
|
||||
# using RuboCop version 1.72.2.
|
||||
# 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
|
||||
|
27
Gemfile.lock
27
Gemfile.lock
@ -383,10 +383,11 @@ GEM
|
||||
railties (>= 6.1)
|
||||
rexml
|
||||
link_header (0.0.8)
|
||||
lint_roller (1.1.0)
|
||||
llhttp-ffi (0.5.0)
|
||||
ffi-compiler (~> 1.0)
|
||||
rake (~> 13.0)
|
||||
logger (1.6.5)
|
||||
logger (1.6.6)
|
||||
lograge (0.14.0)
|
||||
actionpack (>= 4)
|
||||
activesupport (>= 4)
|
||||
@ -722,9 +723,10 @@ GEM
|
||||
rspec-mocks (~> 3.0)
|
||||
sidekiq (>= 5, < 8)
|
||||
rspec-support (3.13.2)
|
||||
rubocop (1.71.2)
|
||||
rubocop (1.72.2)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (>= 3.17.0)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
@ -736,16 +738,19 @@ GEM
|
||||
parser (>= 3.3.1.0)
|
||||
rubocop-capybara (2.21.0)
|
||||
rubocop (~> 1.41)
|
||||
rubocop-performance (1.23.1)
|
||||
rubocop (>= 1.48.1, < 2.0)
|
||||
rubocop-ast (>= 1.31.1, < 2.0)
|
||||
rubocop-rails (2.29.1)
|
||||
rubocop-performance (1.24.0)
|
||||
lint_roller (~> 1.1)
|
||||
rubocop (>= 1.72.1, < 2.0)
|
||||
rubocop-ast (>= 1.38.0, < 2.0)
|
||||
rubocop-rails (2.30.1)
|
||||
activesupport (>= 4.2.0)
|
||||
lint_roller (~> 1.1)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.52.0, < 2.0)
|
||||
rubocop-ast (>= 1.31.1, < 2.0)
|
||||
rubocop-rspec (3.4.0)
|
||||
rubocop (~> 1.61)
|
||||
rubocop (>= 1.72.1, < 2.0)
|
||||
rubocop-ast (>= 1.38.0, < 2.0)
|
||||
rubocop-rspec (3.5.0)
|
||||
lint_roller (~> 1.1)
|
||||
rubocop (~> 1.72, >= 1.72.1)
|
||||
rubocop-rspec_rails (2.30.0)
|
||||
rubocop (~> 1.61)
|
||||
rubocop-rspec (~> 3, >= 3.0.1)
|
||||
|
@ -260,7 +260,7 @@ class Request
|
||||
outer_e = nil
|
||||
port = args.first
|
||||
|
||||
addresses = [] # rubocop:disable Lint/UselessAssignment # TODO: https://github.com/rubocop/rubocop/issues/13395
|
||||
addresses = [] # rubocop:disable Lint/UselessAssignment -- TODO: https://github.com/rubocop/rubocop/issues/13395
|
||||
begin
|
||||
addresses = [IPAddr.new(host)]
|
||||
rescue IPAddr::InvalidAddressError
|
||||
|
@ -6,6 +6,8 @@ class BackupService < BaseService
|
||||
include Payloadable
|
||||
include ContextHelper
|
||||
|
||||
CHUNK_SIZE = 1.megabyte
|
||||
|
||||
attr_reader :account, :backup
|
||||
|
||||
def call(backup)
|
||||
@ -181,8 +183,6 @@ class BackupService < BaseService
|
||||
).as_json
|
||||
end
|
||||
|
||||
CHUNK_SIZE = 1.megabyte
|
||||
|
||||
def download_to_zip(zipfile, attachment, filename)
|
||||
adapter = Paperclip.io_adapters.for(attachment)
|
||||
|
||||
|
@ -289,6 +289,16 @@ module Mastodon::CLI
|
||||
fail_with_message 'Invalid URL'
|
||||
end
|
||||
|
||||
PRELOADED_MODELS = %w(
|
||||
Account
|
||||
Backup
|
||||
CustomEmoji
|
||||
Import
|
||||
MediaAttachment
|
||||
PreviewCard
|
||||
SiteUpload
|
||||
).freeze
|
||||
|
||||
private
|
||||
|
||||
def object_storage_summary
|
||||
@ -310,16 +320,6 @@ module Mastodon::CLI
|
||||
SQL
|
||||
end
|
||||
|
||||
PRELOADED_MODELS = %w(
|
||||
Account
|
||||
Backup
|
||||
CustomEmoji
|
||||
Import
|
||||
MediaAttachment
|
||||
PreviewCard
|
||||
SiteUpload
|
||||
).freeze
|
||||
|
||||
def preload_records_from_mixed_objects(objects)
|
||||
preload_map = Hash.new { |hash, key| hash[key] = [] }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user