Autofix Rubocop Style/TrailingCommaInArguments (#23694)
This commit is contained in:
parent
ab7816a414
commit
c38bd17657
|
@ -3412,16 +3412,6 @@ Style/SymbolProc:
|
|||
Exclude:
|
||||
- 'spec/lib/request_spec.rb'
|
||||
|
||||
# Offense count: 8
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyleForMultiline.
|
||||
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
||||
Style/TrailingCommaInArguments:
|
||||
Exclude:
|
||||
- 'app/controllers/tags_controller.rb'
|
||||
- 'spec/services/fetch_oembed_service_spec.rb'
|
||||
- 'spec/services/post_status_service_spec.rb'
|
||||
|
||||
# Offense count: 10
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyleForMultiline.
|
||||
|
|
|
@ -58,7 +58,7 @@ class TagsController < ApplicationController
|
|||
def collection_presenter
|
||||
ActivityPub::CollectionPresenter.new(
|
||||
id: tag_url(@tag),
|
||||
type: :ordered,
|
||||
type: :ordered
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ describe FetchOEmbedService, type: :service do
|
|||
stub_request(:get, 'https://www.youtube.com/watch?v=IPSbNdBmWKE').to_return(
|
||||
status: 200,
|
||||
headers: { 'Content-Type': 'text/html' },
|
||||
body: request_fixture('oembed_youtube.html'),
|
||||
body: request_fixture('oembed_youtube.html')
|
||||
)
|
||||
stub_request(:get, 'https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIPSbNdBmWKE').to_return(
|
||||
status: 200,
|
||||
|
|
|
@ -200,7 +200,7 @@ RSpec.describe PostStatusService, type: :service do
|
|||
status = subject.call(
|
||||
account,
|
||||
text: "test status update",
|
||||
media_ids: [media.id],
|
||||
media_ids: [media.id]
|
||||
)
|
||||
|
||||
expect(media.reload.status).to eq status
|
||||
|
@ -213,7 +213,7 @@ RSpec.describe PostStatusService, type: :service do
|
|||
status = subject.call(
|
||||
account,
|
||||
text: "test status update",
|
||||
media_ids: [media.id],
|
||||
media_ids: [media.id]
|
||||
)
|
||||
|
||||
expect(media.reload.status).to eq nil
|
||||
|
@ -232,11 +232,11 @@ RSpec.describe PostStatusService, type: :service do
|
|||
Fabricate(:media_attachment, account: account),
|
||||
Fabricate(:media_attachment, account: account),
|
||||
Fabricate(:media_attachment, account: account),
|
||||
].map(&:id),
|
||||
].map(&:id)
|
||||
)
|
||||
end.to raise_error(
|
||||
Mastodon::ValidationError,
|
||||
I18n.t('media_attachments.validations.too_many'),
|
||||
I18n.t('media_attachments.validations.too_many')
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -254,11 +254,11 @@ RSpec.describe PostStatusService, type: :service do
|
|||
media_ids: [
|
||||
video,
|
||||
image,
|
||||
].map(&:id),
|
||||
].map(&:id)
|
||||
)
|
||||
end.to raise_error(
|
||||
Mastodon::ValidationError,
|
||||
I18n.t('media_attachments.validations.images_and_video'),
|
||||
I18n.t('media_attachments.validations.images_and_video')
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue