<commit_before>module Sidekiq
  module Helpers
    def configured_workers(config)
      @configured_workers ||= config.to_hash.reject { |k, v| k.to_s =~ /restart_command|syslog/ }
    end
  end
end

Chef::Recipe.send(:include, Sidekiq::Helpers)<commit_msg>Include helpers in Templates<commit_after>module Sidekiq
  module Helpers
    def configured_workers(config)
      @configured_workers ||= config.each_with_object({}) do |(k, v), memo|
        next if k.to_s =~ /restart_command|syslog/
        memo[k] = v
      end
    end
  end
end

Chef::Recipe.send(:include, Sidekiq::Helpers)
Chef::Resource::Template.send(:include, Sidekiq::Helpers)
{'fraction_non_alphanumeric': 0.12422360248447205, 'fraction_numerical': 0.0, 'mean_word_length': 4.201612903225806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4124184', 'n_tokens_mistral': 225, 'n_tokens_neox': 227, 'n_words': 45}