From d86fe256e8f6afff8d0da020e5eea718826fd505 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Mon, 24 May 2021 12:30:03 -0700 Subject: [PATCH] Update standard gem --- Gemfile.lock | 25 ++++++++++++++----------- lib/sidekiq/launcher.rb | 30 +++++++++++++----------------- lib/sidekiq/web/helpers.rb | 15 +++++++-------- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b6107ba2..75702bce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,7 +107,7 @@ GEM mini_portile2 (~> 2.5.0) racc (~> 1.4) parallel (1.20.1) - parser (3.0.0.0) + parser (3.0.1.1) ast (~> 2.4.1) racc (1.5.2) rack (2.2.3) @@ -143,20 +143,20 @@ GEM rake (13.0.3) redis (4.2.5) regexp_parser (2.1.1) - rexml (3.2.4) - rubocop (1.11.0) + rexml (3.2.5) + rubocop (1.14.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.2.0, < 2.0) + rubocop-ast (>= 1.5.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) - rubocop-performance (1.10.1) - rubocop (>= 0.90.0, < 2.0) + rubocop-ast (1.5.0) + parser (>= 3.0.1.1) + rubocop-performance (1.11.2) + rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.11.0) simplecov (0.19.0) @@ -171,9 +171,9 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) - standard (1.0.4) - rubocop (= 1.11.0) - rubocop-performance (= 1.10.1) + standard (1.1.1) + rubocop (= 1.14.0) + rubocop-performance (= 1.11.2) thor (1.1.0) toxiproxy (1.0.3) tzinfo (2.0.4) @@ -200,3 +200,6 @@ DEPENDENCIES sqlite3 standard toxiproxy + +BUNDLED WITH + 2.2.15 diff --git a/lib/sidekiq/launcher.rb b/lib/sidekiq/launcher.rb index 3250c76d..ef6d8b32 100644 --- a/lib/sidekiq/launcher.rb +++ b/lib/sidekiq/launcher.rb @@ -238,26 +238,22 @@ module Sidekiq end def to_data - @data ||= begin - { - "hostname" => hostname, - "started_at" => Time.now.to_f, - "pid" => ::Process.pid, - "tag" => @options[:tag] || "", - "concurrency" => @options[:concurrency], - "queues" => @options[:queues].uniq, - "labels" => @options[:labels], - "identity" => identity - } - end + @data ||= { + "hostname" => hostname, + "started_at" => Time.now.to_f, + "pid" => ::Process.pid, + "tag" => @options[:tag] || "", + "concurrency" => @options[:concurrency], + "queues" => @options[:queues].uniq, + "labels" => @options[:labels], + "identity" => identity + } end def to_json - @json ||= begin - # this data changes infrequently so dump it to a string - # now so we don't need to dump it every heartbeat. - Sidekiq.dump_json(to_data) - end + # this data changes infrequently so dump it to a string + # now so we don't need to dump it every heartbeat. + @json ||= Sidekiq.dump_json(to_data) end end end diff --git a/lib/sidekiq/web/helpers.rb b/lib/sidekiq/web/helpers.rb index 17440722..d93420f0 100644 --- a/lib/sidekiq/web/helpers.rb +++ b/lib/sidekiq/web/helpers.rb @@ -10,14 +10,13 @@ module Sidekiq module WebHelpers def strings(lang) @strings ||= {} - @strings[lang] ||= begin - # Allow sidekiq-web extensions to add locale paths - # so extensions can be localized - settings.locales.each_with_object({}) do |path, global| - find_locale_files(lang).each do |file| - strs = YAML.load(File.open(file)) - global.merge!(strs[lang]) - end + + # Allow sidekiq-web extensions to add locale paths + # so extensions can be localized + @strings[lang] ||= settings.locales.each_with_object({}) do |path, global| + find_locale_files(lang).each do |file| + strs = YAML.load(File.open(file)) + global.merge!(strs[lang]) end end end