mirror of
https://github.com/mastodon/mastodon.git
synced 2025-05-11 20:21:10 +00:00
Update rubocop
to version 1.75.0 (#34283)
This commit is contained in:
parent
e9fe01e2a6
commit
0e3ff680d3
|
@ -1,6 +1,6 @@
|
||||||
# This configuration was generated by
|
# This configuration was generated by
|
||||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
|
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
|
||||||
# using RuboCop version 1.73.2.
|
# using RuboCop version 1.75.0.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
|
@ -45,7 +45,7 @@ Style/FetchEnvVar:
|
||||||
- 'lib/tasks/repo.rake'
|
- 'lib/tasks/repo.rake'
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
# This cop supports safe autocorrection (--autocorrect).
|
||||||
# Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
|
# Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
|
||||||
# SupportedStyles: annotated, template, unannotated
|
# SupportedStyles: annotated, template, unannotated
|
||||||
# AllowedMethods: redirect
|
# AllowedMethods: redirect
|
||||||
Style/FormatStringToken:
|
Style/FormatStringToken:
|
||||||
|
@ -73,7 +73,6 @@ Style/MapToHash:
|
||||||
# AllowedMethods: respond_to_missing?
|
# AllowedMethods: respond_to_missing?
|
||||||
Style/OptionalBooleanParameter:
|
Style/OptionalBooleanParameter:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/helpers/json_ld_helper.rb'
|
|
||||||
- 'app/lib/admin/system_check/message.rb'
|
- 'app/lib/admin/system_check/message.rb'
|
||||||
- 'app/lib/request.rb'
|
- 'app/lib/request.rb'
|
||||||
- 'app/lib/webfinger.rb'
|
- 'app/lib/webfinger.rb'
|
||||||
|
|
12
Gemfile.lock
12
Gemfile.lock
|
@ -580,7 +580,7 @@ GEM
|
||||||
ox (2.14.22)
|
ox (2.14.22)
|
||||||
bigdecimal (>= 3.0)
|
bigdecimal (>= 3.0)
|
||||||
parallel (1.26.3)
|
parallel (1.26.3)
|
||||||
parser (3.3.7.2)
|
parser (3.3.7.3)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
racc
|
racc
|
||||||
parslet (2.0.0)
|
parslet (2.0.0)
|
||||||
|
@ -600,6 +600,7 @@ GEM
|
||||||
net-smtp
|
net-smtp
|
||||||
premailer (~> 1.7, >= 1.7.9)
|
premailer (~> 1.7, >= 1.7.9)
|
||||||
prettyprint (0.2.0)
|
prettyprint (0.2.0)
|
||||||
|
prism (1.4.0)
|
||||||
prometheus_exporter (2.2.0)
|
prometheus_exporter (2.2.0)
|
||||||
webrick
|
webrick
|
||||||
propshaft (1.1.0)
|
propshaft (1.1.0)
|
||||||
|
@ -733,7 +734,7 @@ GEM
|
||||||
rspec-mocks (~> 3.0)
|
rspec-mocks (~> 3.0)
|
||||||
sidekiq (>= 5, < 9)
|
sidekiq (>= 5, < 9)
|
||||||
rspec-support (3.13.2)
|
rspec-support (3.13.2)
|
||||||
rubocop (1.74.0)
|
rubocop (1.75.0)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (~> 3.17.0.2)
|
language_server-protocol (~> 3.17.0.2)
|
||||||
lint_roller (~> 1.1.0)
|
lint_roller (~> 1.1.0)
|
||||||
|
@ -741,11 +742,12 @@ GEM
|
||||||
parser (>= 3.3.0.2)
|
parser (>= 3.3.0.2)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 2.9.3, < 3.0)
|
regexp_parser (>= 2.9.3, < 3.0)
|
||||||
rubocop-ast (>= 1.38.0, < 2.0)
|
rubocop-ast (>= 1.43.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 2.4.0, < 4.0)
|
unicode-display_width (>= 2.4.0, < 4.0)
|
||||||
rubocop-ast (1.38.1)
|
rubocop-ast (1.43.0)
|
||||||
parser (>= 3.3.1.0)
|
parser (>= 3.3.7.2)
|
||||||
|
prism (~> 1.4)
|
||||||
rubocop-capybara (2.22.1)
|
rubocop-capybara (2.22.1)
|
||||||
lint_roller (~> 1.1)
|
lint_roller (~> 1.1)
|
||||||
rubocop (~> 1.72, >= 1.72.1)
|
rubocop (~> 1.72, >= 1.72.1)
|
||||||
|
|
|
@ -260,7 +260,7 @@ class Request
|
||||||
outer_e = nil
|
outer_e = nil
|
||||||
port = args.first
|
port = args.first
|
||||||
|
|
||||||
addresses = [] # rubocop:disable Lint/UselessAssignment -- TODO: https://github.com/rubocop/rubocop/issues/13395
|
addresses = []
|
||||||
begin
|
begin
|
||||||
addresses = [IPAddr.new(host)]
|
addresses = [IPAddr.new(host)]
|
||||||
rescue IPAddr::InvalidAddressError
|
rescue IPAddr::InvalidAddressError
|
||||||
|
|
|
@ -33,7 +33,8 @@ class Trends::Links < Trends::Base
|
||||||
def register(status, at_time = Time.now.utc)
|
def register(status, at_time = Time.now.utc)
|
||||||
original_status = status.proper
|
original_status = status.proper
|
||||||
|
|
||||||
return unless (original_status.public_visibility? && status.public_visibility?) &&
|
return unless original_status.public_visibility? &&
|
||||||
|
status.public_visibility? &&
|
||||||
!(original_status.account.silenced? || status.account.silenced?) &&
|
!(original_status.account.silenced? || status.account.silenced?) &&
|
||||||
!(original_status.spoiler_text? || original_status.sensitive?)
|
!(original_status.spoiler_text? || original_status.sensitive?)
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ module Payloadable
|
||||||
payload = ActiveModelSerializers::SerializableResource.new(record, options.merge(serializer: serializer, adapter: ActivityPub::Adapter)).as_json
|
payload = ActiveModelSerializers::SerializableResource.new(record, options.merge(serializer: serializer, adapter: ActivityPub::Adapter)).as_json
|
||||||
object = record.respond_to?(:virtual_object) ? record.virtual_object : record
|
object = record.respond_to?(:virtual_object) ? record.virtual_object : record
|
||||||
|
|
||||||
if (object.respond_to?(:sign?) && object.sign?) && signer && (always_sign || signing_enabled?)
|
if object.respond_to?(:sign?) && object.sign? && signer && (always_sign || signing_enabled?)
|
||||||
ActivityPub::LinkedDataSignature.new(payload).sign!(signer, sign_with: sign_with)
|
ActivityPub::LinkedDataSignature.new(payload).sign!(signer, sign_with: sign_with)
|
||||||
else
|
else
|
||||||
payload
|
payload
|
||||||
|
|
|
@ -8,7 +8,7 @@ class PollExpirationNotifyWorker
|
||||||
def perform(poll_id)
|
def perform(poll_id)
|
||||||
@poll = Poll.find(poll_id)
|
@poll = Poll.find(poll_id)
|
||||||
|
|
||||||
return if does_not_expire?
|
return if missing_expiration?
|
||||||
requeue! && return if not_due_yet?
|
requeue! && return if not_due_yet?
|
||||||
|
|
||||||
notify_remote_voters_and_owner! if @poll.local?
|
notify_remote_voters_and_owner! if @poll.local?
|
||||||
|
@ -24,7 +24,7 @@ class PollExpirationNotifyWorker
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def does_not_expire?
|
def missing_expiration?
|
||||||
@poll.expires_at.nil?
|
@poll.expires_at.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user