mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Update rubocop to version 1.79.0 (#35502)
This commit is contained in:
parent
960f693219
commit
2e35defeec
|
@ -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.77.0.
|
||||
# using RuboCop version 1.79.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
|
||||
|
|
|
@ -765,7 +765,7 @@ GEM
|
|||
rspec-mocks (~> 3.0)
|
||||
sidekiq (>= 5, < 9)
|
||||
rspec-support (3.13.4)
|
||||
rubocop (1.78.0)
|
||||
rubocop (1.79.0)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
|
@ -773,8 +773,9 @@ GEM
|
|||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 2.9.3, < 3.0)
|
||||
rubocop-ast (>= 1.45.1, < 2.0)
|
||||
rubocop-ast (>= 1.46.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
tsort (>= 0.2.0)
|
||||
unicode-display_width (>= 2.4.0, < 4.0)
|
||||
rubocop-ast (1.46.0)
|
||||
parser (>= 3.3.7.2)
|
||||
|
@ -880,6 +881,7 @@ GEM
|
|||
bindata (~> 2.4)
|
||||
openssl (> 2.0)
|
||||
openssl-signature_algorithm (~> 1.0)
|
||||
tsort (0.2.0)
|
||||
tty-color (0.6.0)
|
||||
tty-cursor (0.7.1)
|
||||
tty-prompt (0.23.1)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
class Api::V1::Admin::TagsController < Api::BaseController
|
||||
include Authorization
|
||||
|
||||
before_action -> { authorize_if_got_token! :'admin:read' }, only: [:index, :show]
|
||||
before_action -> { authorize_if_got_token! :'admin:write' }, only: :update
|
||||
|
||||
|
|
|
@ -45,7 +45,9 @@ class EmojiFormatter
|
|||
i += 1
|
||||
|
||||
if inside_shortname && text[i] == ':'
|
||||
inside_shortname = false
|
||||
# https://github.com/rubocop/rubocop/issues/14383
|
||||
# False positive in line below, remove disable when resolved
|
||||
inside_shortname = false # rubocop:disable Lint/UselessAssignment
|
||||
shortcode = text[(shortname_start_index + 1)..(i - 1)]
|
||||
char_after = text[i + 1]
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ RSpec.describe AccountableConcern do
|
|||
let(:hoge_class) do
|
||||
Class.new do
|
||||
include AccountableConcern
|
||||
|
||||
attr_reader :current_account
|
||||
|
||||
def initialize(current_account)
|
||||
|
|
|
@ -49,6 +49,7 @@ RSpec.describe 'Routes under accounts/' do
|
|||
|
||||
context 'with local username encoded at' do
|
||||
include RSpec::Rails::RequestExampleGroup
|
||||
|
||||
let(:username) { 'alice' }
|
||||
|
||||
it 'routes /%40:username' do
|
||||
|
@ -140,6 +141,7 @@ RSpec.describe 'Routes under accounts/' do
|
|||
|
||||
context 'with remote username encoded at' do
|
||||
include RSpec::Rails::RequestExampleGroup
|
||||
|
||||
let(:username) { 'alice%40example.com' }
|
||||
let(:username_decoded) { 'alice@example.com' }
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ RSpec.describe ExistingUsernameValidator do
|
|||
let(:record_class) do
|
||||
Class.new do
|
||||
include ActiveModel::Validations
|
||||
|
||||
attr_accessor :contact, :friends
|
||||
|
||||
def self.name
|
||||
|
|
|
@ -6,6 +6,7 @@ RSpec.describe LanguageValidator do
|
|||
let(:record_class) do
|
||||
Class.new do
|
||||
include ActiveModel::Validations
|
||||
|
||||
attr_accessor :locale
|
||||
|
||||
validates :locale, language: true
|
||||
|
|
|
@ -6,6 +6,7 @@ RSpec.describe UnreservedUsernameValidator do
|
|||
let(:record_class) do
|
||||
Class.new do
|
||||
include ActiveModel::Validations
|
||||
|
||||
attr_accessor :username
|
||||
|
||||
validates_with UnreservedUsernameValidator
|
||||
|
|
|
@ -6,6 +6,7 @@ RSpec.describe URLValidator do
|
|||
let(:record_class) do
|
||||
Class.new do
|
||||
include ActiveModel::Validations
|
||||
|
||||
attr_accessor :profile
|
||||
|
||||
validates :profile, url: true
|
||||
|
|
Loading…
Reference in New Issue
Block a user