From 39b289be04cf19e9b24c53983732d15070012366 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Tue, 10 Jan 2017 15:40:43 +1030 Subject: [PATCH] Rubocop: Unused args --- .rubocop_todo.yml | 14 -------------- config/unicorn.rb | 4 ++-- spec/support/auth_macros.rb | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6a53bf2934..18d8c5c4fe 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -73,20 +73,6 @@ Lint/UnifiedInteger: Exclude: - 'lib/fat_free_crm/i18n.rb' -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. -Lint/UnusedBlockArgument: - Exclude: - - 'config/unicorn.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. -Lint/UnusedMethodArgument: - Exclude: - - 'spec/support/auth_macros.rb' - # Offense count: 4 # Configuration parameters: ContextCreatingMethods. Lint/UselessAccessModifier: diff --git a/config/unicorn.rb b/config/unicorn.rb index 328265cb21..f680d61f98 100755 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -12,7 +12,7 @@ timeout 15 preload_app true -before_fork do |server, worker| +before_fork do |_server, _worker| Signal.trap 'TERM' do puts 'Unicorn master intercepting TERM and sending myself QUIT instead' Process.kill 'QUIT', Process.pid @@ -22,7 +22,7 @@ ActiveRecord::Base.connection.disconnect! end -after_fork do |server, worker| +after_fork do |_server, _worker| Signal.trap 'TERM' do puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT' end diff --git a/spec/support/auth_macros.rb b/spec/support/auth_macros.rb index d91f95d13d..bd758d94bb 100755 --- a/spec/support/auth_macros.rb +++ b/spec/support/auth_macros.rb @@ -32,7 +32,7 @@ def login_and_assign(user_stubs = {}, session_stubs = {}) assigns[:current_user] = current_user end -def login_and_assign!(user_stubs = {}, session_stubs = {}) +def login_and_assign!(_user_stubs = {}, _session_stubs = {}) login assigns[:current_user] = current_user end