<commit_before>module Para
  module Config
    mattr_accessor :authenticate_admin_method
    @@authenticate_admin_method = :authenticate_admin_user!

    mattr_accessor :current_admin_method
    @@current_admin_method = :current_admin_user

    mattr_accessor :pagination_theme
    @@pagination_theme = 'twitter-bootstrap-3'

    mattr_accessor :admin_title
    @@admin_title = nil

    mattr_accessor :default_tree_max_depth
    @@default_tree_max_depth = 3

    mattr_accessor :resource_name_methods
    @@resource_name_methods = [:name, :title]

    mattr_accessor :ability_class_name
    @@ability_class_name = 'Para::Ability'

    mattr_accessor :plugins
    @@plugins = []

    # Allows accessing plugins root module to configure them through a method
    # from the Para::Config class.
    #
    # Example :
    #
    #   Para.config do |config|
    #     config.my_plugin.my_var = 'foo'
    #   end
    #
    def self.method_missing(method_name, *args, &block)
      if plugins.include?(method_name)
        plugin = Para::Plugins.module_name_for(method_name).constantize
        block ? block.call(plugin) : plugin
      else
        super
      end
    end
  end
end
<commit_msg>add #admin_title and #admin_name methods to default Para.config.resource_title_methods used to fetch the name of a resource throughout the lib<commit_after>module Para
  module Config
    mattr_accessor :authenticate_admin_method
    @@authenticate_admin_method = :authenticate_admin_user!

    mattr_accessor :current_admin_method
    @@current_admin_method = :current_admin_user

    mattr_accessor :pagination_theme
    @@pagination_theme = 'twitter-bootstrap-3'

    mattr_accessor :admin_title
    @@admin_title = nil

    mattr_accessor :default_tree_max_depth
    @@default_tree_max_depth = 3

    mattr_accessor :resource_name_methods
    @@resource_name_methods = [:admin_name, :admin_title, :name, :title]

    mattr_accessor :ability_class_name
    @@ability_class_name = 'Para::Ability'

    mattr_accessor :plugins
    @@plugins = []

    # Allows accessing plugins root module to configure them through a method
    # from the Para::Config class.
    #
    # Example :
    #
    #   Para.config do |config|
    #     config.my_plugin.my_var = 'foo'
    #   end
    #
    def self.method_missing(method_name, *args, &block)
      if plugins.include?(method_name)
        plugin = Para::Plugins.module_name_for(method_name).constantize
        block ? block.call(plugin) : plugin
      else
        super
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.07971586424625099, 'fraction_numerical': 0.0015785319652722968, 'mean_word_length': 3.3631669535283994, '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': '2596364', 'n_tokens_mistral': 831, 'n_tokens_neox': 788, 'n_words': 170}