<commit_before>module Nyauth
  module ClientConcern
    extend ActiveSupport::Concern
    included do |base|
      helper_method :nyauth_client_class
      helper_method :nyauth_client_name
      helper_method :client_class # deprecated
      helper_method :client_name # deprecated
    end

    def initialize
      @nyauth_client_classes = {}
      super
    end

    private

    def nyauth_mounted_path
      request.script_name.presence || "/#{request.path.split('/').try(:second)}"
    end

    # specify client class from nyauth_mounted_path
    def nyauth_client_class
      @nyauth_client_classes[nyauth_mounted_path] ||= nyauth_mounted_path[1..-1].classify.constantize
    rescue
      @nyauth_client_classes[nyauth_mounted_path] = User
    end

    def nyauth_client_name
      nyauth_client_class.name.underscore.to_sym
    end

    def client_class
      warn 'DEPRECATION WARNING: client_class is deprecated. Please use nyauth_client_class'
      nyauth_client_class
    end

    def client_name
      warn 'DEPRECATION WARNING: client_name is deprecated. Please use nyauth_client_name'
      nyauth_client_name
    end
  end
end<commit_msg>Remove deprecated methods<commit_after>module Nyauth
  module ClientConcern
    extend ActiveSupport::Concern
    included do |base|
      helper_method :nyauth_client_class
      helper_method :nyauth_client_name
    end

    def initialize
      @nyauth_client_classes = {}
      super
    end

    private

    def nyauth_mounted_path
      request.script_name.presence || "/#{request.path.split('/').try(:second)}"
    end

    # specify client class from nyauth_mounted_path
    def nyauth_client_class
      @nyauth_client_classes[nyauth_mounted_path] ||= nyauth_mounted_path[1..-1].classify.constantize
    rescue
      @nyauth_client_classes[nyauth_mounted_path] = User
    end

    def nyauth_client_name
      nyauth_client_class.name.underscore.to_sym
    end
  end
end
{'fraction_non_alphanumeric': 0.06304909560723514, 'fraction_numerical': 0.0020671834625322996, 'mean_word_length': 3.331096196868009, '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': '5388889', 'n_tokens_mistral': 618, 'n_tokens_neox': 588, 'n_words': 121}