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