From 09d40ab6a15786fdc6e12413571a8b135ecebc41 Mon Sep 17 00:00:00 2001 From: Tobias Svensson Date: Tue, 27 Aug 2013 11:38:45 +0100 Subject: [PATCH] Fix Ruby parser warnings in web.rb. --- CHANGELOG.md | 1 + lib/sidetiq/web.rb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f8b679..a5bce7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Bump Sidekiq dependency to ~> 2.14.0. - Use ERB templates instead of slim. - Don't check if `Sidekiq::Web.tabs` is an Array in Sidetiq::Web. +- Fix Ruby parser warnings in web.rb. 0.3.6 ----- diff --git a/lib/sidetiq/web.rb b/lib/sidetiq/web.rb index 65bb600..3d81ac2 100644 --- a/lib/sidetiq/web.rb +++ b/lib/sidetiq/web.rb @@ -26,7 +26,7 @@ module Sidetiq @time = sidetiq_clock.gettime - @worker, @schedule = sidetiq_schedules.select do |worker, schedule| + @worker, @schedule = sidetiq_schedules.select do |worker, _| worker.name == name end.flatten @@ -36,8 +36,8 @@ module Sidetiq app.post "/sidetiq/:name/trigger" do halt 404 unless (name = params[:name]) - worker, _ = sidetiq_schedules.select do |worker, schedule| - worker.name == name + worker, _ = sidetiq_schedules.select do |w, _| + w.name == name end.flatten worker.perform_async