mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-15 08:48:15 +00:00
Update rubocop to version 1.77.0 (#35128)
This commit is contained in:
parent
ac039d5f13
commit
8837fd8c54
|
@ -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.76.2.
|
||||
# using RuboCop version 1.77.0.
|
||||
# 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,7 @@ Metrics/PerceivedComplexity:
|
|||
Max: 27
|
||||
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowedVars.
|
||||
# Configuration parameters: AllowedVars, DefaultToNil.
|
||||
Style/FetchEnvVar:
|
||||
Exclude:
|
||||
- 'config/initializers/paperclip.rb'
|
||||
|
|
|
@ -761,7 +761,7 @@ GEM
|
|||
rspec-mocks (~> 3.0)
|
||||
sidekiq (>= 5, < 9)
|
||||
rspec-support (3.13.4)
|
||||
rubocop (1.76.2)
|
||||
rubocop (1.77.0)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
|
|
|
@ -32,7 +32,7 @@ class Api::V1::FiltersController < Api::BaseController
|
|||
ApplicationRecord.transaction do
|
||||
@filter.update!(keyword_params)
|
||||
@filter.custom_filter.assign_attributes(filter_params)
|
||||
raise Mastodon::ValidationError, I18n.t('filters.errors.deprecated_api_multiple_keywords') if @filter.custom_filter.changed? && @filter.custom_filter.keywords.count > 1
|
||||
raise Mastodon::ValidationError, I18n.t('filters.errors.deprecated_api_multiple_keywords') if @filter.custom_filter.changed? && @filter.custom_filter.keywords.many?
|
||||
|
||||
@filter.custom_filter.save!
|
||||
end
|
||||
|
|
|
@ -4,6 +4,6 @@ class BackupPolicy < ApplicationPolicy
|
|||
MIN_AGE = 6.days
|
||||
|
||||
def create?
|
||||
user_signed_in? && current_user.backups.where(created_at: MIN_AGE.ago..).count.zero?
|
||||
user_signed_in? && current_user.backups.where(created_at: MIN_AGE.ago..).none?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -112,17 +112,17 @@ namespace :tests do
|
|||
exit(1)
|
||||
end
|
||||
|
||||
unless Identity.where(provider: 'foo', uid: 0).count == 1
|
||||
unless Identity.where(provider: 'foo', uid: 0).one?
|
||||
puts 'Identities not deduplicated as expected'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
unless WebauthnCredential.where(user_id: 1, nickname: 'foo').count == 1
|
||||
unless WebauthnCredential.where(user_id: 1, nickname: 'foo').one?
|
||||
puts 'Webauthn credentials not deduplicated as expected'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
unless AccountAlias.where(account_id: 1, uri: 'https://example.com/users/foobar').count == 1
|
||||
unless AccountAlias.where(account_id: 1, uri: 'https://example.com/users/foobar').one?
|
||||
puts 'Account aliases not deduplicated as expected'
|
||||
exit(1)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user