1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Fix Ruby warnings, thanks for the reminder @nateberkopec

This commit is contained in:
Mike Perham 2016-08-30 13:29:03 -07:00
parent 6f9fbb53e4
commit de13425b44
7 changed files with 7 additions and 8 deletions

View file

@ -171,6 +171,7 @@ module Sidekiq
def self.default_retries_exhausted=(prok)
@default_retries_exhausted = prok
end
@default_retries_exhausted = ->(job, ex) { }
def self.default_retries_exhausted
@default_retries_exhausted
end

View file

@ -46,6 +46,7 @@ module Sidekiq
@enq = (Sidekiq.options[:scheduled_enq] || Sidekiq::Scheduled::Enq).new
@sleeper = ConnectionPool::TimedStack.new
@done = false
@thread = nil
end
# Shut down this instance, will pause until the thread is dead.

View file

@ -63,10 +63,6 @@ module Sidekiq
@views ||= VIEWS
end
def session_secret=(secret)
@session_secret = secret
end
attr_accessor :app_url, :session_secret, :redis_pool
attr_writer :locales, :views
end

View file

@ -78,6 +78,7 @@ module Sidekiq
end
def initialize(env, block)
@_erb = false
@env = env
@block = block
@@files ||= {}

View file

@ -52,7 +52,7 @@ module Sidekiq
end
def display_custom_head
@head_html.join if @head_html
@head_html.join if defined?(@head_html)
end
# Given a browser request Accept-Language header like

View file

@ -88,7 +88,7 @@ module Sidekiq
{} if path == matcher
else
if path_match = path.match(matcher)
params = Hash[path_match.names.map(&:to_sym).zip(path_match.captures)]
Hash[path_match.names.map(&:to_sym).zip(path_match.captures)]
end
end
end

View file

@ -342,7 +342,7 @@ class TestCli < Sidekiq::Test
end
after do
File.unlink @tmp_log_path if File.exists? @tmp_log_path
File.unlink @tmp_log_path if File.exist? @tmp_log_path
end
it 'shuts down the worker' do
@ -377,7 +377,7 @@ class TestCli < Sidekiq::Test
end
after do
File.unlink @tmp_log_path if File.exists? @tmp_log_path
File.unlink @tmp_log_path if File.exist? @tmp_log_path
end
describe 'with backtrace' do