about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-18 06:39:58 -0500
committerGitHub <noreply@github.com>2023-02-18 12:39:58 +0100
commitc38bd17657483013ed189eccf8262557e4d0c465 (patch)
tree698a17278dfd4d34bddc5d996f221f1d6ea75a2d
parentab7816a4141e88cf7e05ba49638ee95fcc6f71ff (diff)
Autofix Rubocop Style/TrailingCommaInArguments (#23694)
-rw-r--r--.rubocop_todo.yml10
-rw-r--r--app/controllers/tags_controller.rb2
-rw-r--r--spec/services/fetch_oembed_service_spec.rb2
-rw-r--r--spec/services/post_status_service_spec.rb12
4 files changed, 8 insertions, 18 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 2ec33fd30..e7be628ef 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -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.
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 750e15fa3..4b747c9ad 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -58,7 +58,7 @@ class TagsController < ApplicationController
   def collection_presenter
     ActivityPub::CollectionPresenter.new(
       id: tag_url(@tag),
-      type: :ordered,
+      type: :ordered
     )
   end
 end
diff --git a/spec/services/fetch_oembed_service_spec.rb b/spec/services/fetch_oembed_service_spec.rb
index da2a8d0d1..dcd0f80de 100644
--- a/spec/services/fetch_oembed_service_spec.rb
+++ b/spec/services/fetch_oembed_service_spec.rb
@@ -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,
diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb
index 76114a59c..7bb7dfb1f 100644
--- a/spec/services/post_status_service_spec.rb
+++ b/spec/services/post_status_service_spec.rb
@@ -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