<commit_before>require 'roo_on_rails/checks/sidekiq/sidekiq'
require 'roo_on_rails/checks/base'
require 'thor'

module RooOnRails
  module Checks
    module Sidekiq
      class Settings < Base
        requires Sidekiq
        def intro
          'Checking Sidekiq settings.yml...'
        end

        def call
          fail! 'No sidekiq settings found' unless File.exist?('config/sidekiq.yml')
          return if File.read('config/sidekiq.yml') == yaml_template
          final_fail! 'Custom sidekiq settings found.'
        end

        def fix
          create_file 'config/sidekiq.yml', yaml_template
        end

        def yaml_template
          %Q{
<% require 'roo_on_rails/sidekiq/settings' %>
<%= RooOnRails::Sidekiq::Settings.settings_template %>
          }.strip
        end
      end
    end
  end
end<commit_msg>IP-470/fail if we find sidekiq settings<commit_after>require 'roo_on_rails/checks/sidekiq/sidekiq'
require 'roo_on_rails/checks/base'
require 'thor'

module RooOnRails
  module Checks
    module Sidekiq
      class Settings < Base
        requires Sidekiq
        def intro
          'Checking Sidekiq settings.yml...'
        end

        def call
          final_fail! 'Sidekiq settings file found.' if File.exist?('config/sidekiq.yml')
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08180428134556575, 'fraction_numerical': 0.0022935779816513763, 'mean_word_length': 2.264339152119701, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '4430316', 'n_tokens_mistral': 438, 'n_tokens_neox': 406, 'n_words': 101}