diff --git a/lib/sidekiq/statistic/statistic/workers.rb b/lib/sidekiq/statistic/statistic/workers.rb index 5ea94b6..2fb1dce 100644 --- a/lib/sidekiq/statistic/statistic/workers.rb +++ b/lib/sidekiq/statistic/statistic/workers.rb @@ -18,12 +18,12 @@ def display end def display_by_last_status - filtered_workers = display.group_by {|worker| worker[:last_job_status] } + filtered_workers = display.group_by { |worker| worker[:last_job_status] } filtered_workers['passed'] ||= [] filtered_workers['failed'] ||= [] - filtered_workers.transform_keys(&:to_sym) + filtered_workers end def display_per_day(worker_name) diff --git a/test/test_sidekiq/statistic_test.rb b/test/test_sidekiq/statistic_test.rb index df7d072..732bc20 100644 --- a/test/test_sidekiq/statistic_test.rb +++ b/test/test_sidekiq/statistic_test.rb @@ -112,14 +112,14 @@ module Statistic _(subject).must_be_instance_of Hash assert_equal subject.keys.sort, - %i[passed failed].sort + %w[passed failed].sort - _(subject[:passed]).must_be_instance_of Array - _(subject[:failed]).must_be_instance_of Array - assert_equal subject[:passed][0].keys.sort, + _(subject['passed']).must_be_instance_of Array + _(subject['failed']).must_be_instance_of Array + assert_equal subject['passed'][0].keys.sort, %i[name last_job_status number_of_calls queue runtime].sort - assert_equal worker, subject[:passed][0][:name] + assert_equal worker, subject['passed'][0][:name] end end