Browse Source

Autofix Rubocop Style/EmptyLambdaParameter (#23705)

closed-social-glitch-2
Nick Schonning 1 year ago
committed by GitHub
parent
commit
1a02101100
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions
  1. +0
    -6
      .rubocop_todo.yml
  2. +3
    -3
      spec/config/initializers/rack_attack_spec.rb

+ 0
- 6
.rubocop_todo.yml View File

@ -2708,12 +2708,6 @@ Style/ConcatArrayLiterals:
Style/Documentation:
Enabled: false
# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
Style/EmptyLambdaParameter:
Exclude:
- 'spec/config/initializers/rack_attack_spec.rb'
# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.

+ 3
- 3
spec/config/initializers/rack_attack_spec.rb View File

@ -32,7 +32,7 @@ describe Rack::Attack do
describe 'throttle excessive sign-up requests by IP address' do
context 'through the website' do
let(:limit) { 25 }
let(:request) { ->() { post path, {}, 'REMOTE_ADDR' => remote_ip } }
let(:request) { -> { post path, {}, 'REMOTE_ADDR' => remote_ip } }
context 'for exact path' do
let(:path) { '/auth' }
@ -49,7 +49,7 @@ describe Rack::Attack do
context 'through the API' do
let(:limit) { 5 }
let(:request) { ->() { post path, {}, 'REMOTE_ADDR' => remote_ip } }
let(:request) { -> { post path, {}, 'REMOTE_ADDR' => remote_ip } }
context 'for exact path' do
let(:path) { '/api/v1/accounts' }
@ -70,7 +70,7 @@ describe Rack::Attack do
describe 'throttle excessive sign-in requests by IP address' do
let(:limit) { 25 }
let(:request) { ->() { post path, {}, 'REMOTE_ADDR' => remote_ip } }
let(:request) { -> { post path, {}, 'REMOTE_ADDR' => remote_ip } }
context 'for exact path' do
let(:path) { '/auth/sign_in' }

Loading…
Cancel
Save