Autofix Rubocop Style/HashSyntax (#23754)
parent
d5a185d721
commit
da3bd913ae
|
@ -1549,19 +1549,6 @@ Style/HashAsLastArrayItem:
|
||||||
- 'app/services/notify_service.rb'
|
- 'app/services/notify_service.rb'
|
||||||
- 'db/migrate/20181024224956_migrate_account_conversations.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).
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||||
Style/HashTransformValues:
|
Style/HashTransformValues:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|
|
@ -143,7 +143,7 @@ module ApplicationHelper
|
||||||
if prefers_autoplay?
|
if prefers_autoplay?
|
||||||
image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:")
|
image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:")
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@ class MediaAttachment < ApplicationRecord
|
||||||
|
|
||||||
include Attachmentable
|
include Attachmentable
|
||||||
|
|
||||||
enum type: { :image => 0, :gifv => 1, :video => 2, :unknown => 3, :audio => 4 }
|
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 processing: { queued: 0, in_progress: 1, complete: 2, failed: 3 }, _prefix: true
|
||||||
|
|
||||||
MAX_DESCRIPTION_LENGTH = 1_500
|
MAX_DESCRIPTION_LENGTH = 1_500
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ class MediaAttachment < ApplicationRecord
|
||||||
convert_options: {
|
convert_options: {
|
||||||
output: {
|
output: {
|
||||||
'loglevel' => 'fatal',
|
'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,
|
||||||
}.freeze,
|
}.freeze,
|
||||||
format: 'png',
|
format: 'png',
|
||||||
|
|
|
@ -13,7 +13,7 @@ module Terrapin
|
||||||
|
|
||||||
def pipe_options
|
def pipe_options
|
||||||
# Add some flags to explicitly close the other end of the pipes
|
# 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
|
end
|
||||||
|
|
||||||
def read
|
def read
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe Admin::Reports::ActionsController do
|
||||||
let(:report) { Fabricate(:report) }
|
let(:report) { Fabricate(:report) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
post :preview, params: { report_id: report.id, action => '' }
|
post :preview, params: { :report_id => report.id, action => '' }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the action is "suspend"' do
|
context 'when the action is "suspend"' do
|
||||||
|
|
|
@ -43,7 +43,7 @@ describe Admin::StatusesController do
|
||||||
|
|
||||||
describe 'POST #batch' do
|
describe 'POST #batch' do
|
||||||
before 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
|
end
|
||||||
|
|
||||||
let(:status_ids) { [media_attached_status.id] }
|
let(:status_ids) { [media_attached_status.id] }
|
||||||
|
|
|
@ -35,8 +35,8 @@ describe ApplicationController do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
routes.draw do
|
routes.draw do
|
||||||
match via: [:get, :post], 'success' => 'anonymous#success'
|
match :via => [:get, :post], 'success' => 'anonymous#success'
|
||||||
match via: [:get, :post], 'signature_required' => 'anonymous#signature_required'
|
match :via => [:get, :post], 'signature_required' => 'anonymous#signature_required'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue