<commit_before>module Adminable
  module Configuration
    # Finds all controllers from `app/controllers/adminable` directory
    # @return [Array] of {Adminable::Resource} objects
    def self.resources
      @resources ||= resources_paths.map do |resource_path|
        Adminable::Resource.new(
          resource_path.to_s.split('adminable/').last.sub(
            /_controller\.rb$/, ''
          )
        )
      end
    end

    def self.find_resource(name)
      resources.find { |resource| resource.name == name }
    end

    def self.resources_paths
      Dir[Rails.root.join('app/controllers/adminable/**/*_controller.rb')]
        .reject { |f| f['app/controllers/adminable/application_controller.rb'] }
    end
  end
end<commit_msg>Do not save resources into variable for configuration module<commit_after>module Adminable
  module Configuration
    # Finds all controllers from `app/controllers/adminable` directory
    # @return [Array] of {Adminable::Resource} objects
    def self.resources
      resources_paths.map do |resource_path|
        Adminable::Resource.new(
          resource_path.to_s.split('adminable/').last.sub(
            /_controller\.rb$/, ''
          )
        )
      end
    end

    def self.find_resource(name)
      resources.find { |resource| resource.name == name }
    end

    def self.resources_paths
      Dir[Rails.root.join('app/controllers/adminable/**/*_controller.rb')]
        .reject { |f| f['app/controllers/adminable/application_controller.rb'] }
    end
  end
end
{'fraction_non_alphanumeric': 0.1141732283464567, 'fraction_numerical': 0.0, 'mean_word_length': 2.746928746928747, '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': '752478', 'n_tokens_mistral': 451, 'n_tokens_neox': 440, 'n_words': 90}