mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-28 20:55:37 +01:00
Autofix Rubocop Style/HashSyntax (#23754)
This commit is contained in:
parent
d5a185d721
commit
da3bd913ae
7 changed files with 9 additions and 22 deletions
|
@ -1549,19 +1549,6 @@ Style/HashAsLastArrayItem:
|
|||
- 'app/services/notify_service.rb'
|
||||
- 'db/migrate/20181024224956_migrate_account_conversations.rb'
|
||||
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
||||
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
||||
# SupportedShorthandSyntax: always, never, either, consistent
|
||||
Style/HashSyntax:
|
||||
Exclude:
|
||||
- 'app/helpers/application_helper.rb'
|
||||
- 'app/models/media_attachment.rb'
|
||||
- 'lib/terrapin/multi_pipe_extensions.rb'
|
||||
- 'spec/controllers/admin/reports/actions_controller_spec.rb'
|
||||
- 'spec/controllers/admin/statuses_controller_spec.rb'
|
||||
- 'spec/controllers/concerns/signature_verification_spec.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/HashTransformValues:
|
||||
Exclude:
|
||||
|
|
|
@ -143,7 +143,7 @@ module ApplicationHelper
|
|||
if prefers_autoplay?
|
||||
image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:")
|
||||
else
|
||||
image_tag(custom_emoji.image.url(:static), class: 'emojione custom-emoji', alt: ":#{custom_emoji.shortcode}", 'data-original' => full_asset_url(custom_emoji.image.url), 'data-static' => full_asset_url(custom_emoji.image.url(:static)))
|
||||
image_tag(custom_emoji.image.url(:static), :class => 'emojione custom-emoji', :alt => ":#{custom_emoji.shortcode}", 'data-original' => full_asset_url(custom_emoji.image.url), 'data-static' => full_asset_url(custom_emoji.image.url(:static)))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ class MediaAttachment < ApplicationRecord
|
|||
|
||||
include Attachmentable
|
||||
|
||||
enum type: { :image => 0, :gifv => 1, :video => 2, :unknown => 3, :audio => 4 }
|
||||
enum processing: { :queued => 0, :in_progress => 1, :complete => 2, :failed => 3 }, _prefix: true
|
||||
enum type: { image: 0, gifv: 1, video: 2, unknown: 3, audio: 4 }
|
||||
enum processing: { queued: 0, in_progress: 1, complete: 2, failed: 3 }, _prefix: true
|
||||
|
||||
MAX_DESCRIPTION_LENGTH = 1_500
|
||||
|
||||
|
@ -135,7 +135,7 @@ class MediaAttachment < ApplicationRecord
|
|||
convert_options: {
|
||||
output: {
|
||||
'loglevel' => 'fatal',
|
||||
vf: 'scale=\'min(400\, iw):min(400\, ih)\':force_original_aspect_ratio=decrease',
|
||||
:vf => 'scale=\'min(400\, iw):min(400\, ih)\':force_original_aspect_ratio=decrease',
|
||||
}.freeze,
|
||||
}.freeze,
|
||||
format: 'png',
|
||||
|
|
|
@ -13,7 +13,7 @@ module Terrapin
|
|||
|
||||
def pipe_options
|
||||
# Add some flags to explicitly close the other end of the pipes
|
||||
{ out: @stdout_out, err: @stderr_out, @stdout_in => :close, @stderr_in => :close }
|
||||
{ :out => @stdout_out, :err => @stderr_out, @stdout_in => :close, @stderr_in => :close }
|
||||
end
|
||||
|
||||
def read
|
||||
|
|
|
@ -15,7 +15,7 @@ describe Admin::Reports::ActionsController do
|
|||
let(:report) { Fabricate(:report) }
|
||||
|
||||
before do
|
||||
post :preview, params: { report_id: report.id, action => '' }
|
||||
post :preview, params: { :report_id => report.id, action => '' }
|
||||
end
|
||||
|
||||
context 'when the action is "suspend"' do
|
||||
|
|
|
@ -43,7 +43,7 @@ describe Admin::StatusesController do
|
|||
|
||||
describe 'POST #batch' do
|
||||
before do
|
||||
post :batch, params: { account_id: account.id, action => '', admin_status_batch_action: { status_ids: status_ids } }
|
||||
post :batch, params: { :account_id => account.id, action => '', :admin_status_batch_action => { status_ids: status_ids } }
|
||||
end
|
||||
|
||||
let(:status_ids) { [media_attached_status.id] }
|
||||
|
|
|
@ -35,8 +35,8 @@ describe ApplicationController do
|
|||
|
||||
before do
|
||||
routes.draw do
|
||||
match via: [:get, :post], 'success' => 'anonymous#success'
|
||||
match via: [:get, :post], 'signature_required' => 'anonymous#signature_required'
|
||||
match :via => [:get, :post], 'success' => 'anonymous#success'
|
||||
match :via => [:get, :post], 'signature_required' => 'anonymous#signature_required'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue