<commit_before>module Plz
  class CommandBuilder
    SCHEMA_FILE_PATH_PATTERN = "{.,config}/schema.{json,yml}"

    # Builds callable command object from given ARGV
    # @return [Plz::Command]
    # @example
    #   Plz::CommandBuilder.call(ARGV).call
    def self.call(arguments)
      new(arguments).call
    end

    # @param [Array<String>] ARGV
    def initialize(arguments)
      @arguments = arguments
    end

    # @return [Plz::Command] Callable command object
    def call
      validate!
      Command.new(
        method: method,
        base_url: base_url,
        path: path,
        headers: headers,
        params: params,
      )
    rescue Error => error
      ErrorCommand.new(error)
    end

    private
<commit_msg>Find schema file only at ./schema.json or ./schema.yml<commit_after>module Plz
  class CommandBuilder
    SCHEMA_FILE_PATH_PATTERN = "schema.{json,yml}"

    # Builds callable command object from given ARGV
    # @return [Plz::Command]
    # @example
    #   Plz::CommandBuilder.call(ARGV).call
    def self.call(arguments)
      new(arguments).call
    end

    # @param [Array<String>] ARGV
    def initialize(arguments)
      @arguments = arguments
    end

    # @return [Plz::Command] Callable command object
    def call
      validate!
      Command.new(
        method: method,
        base_url: base_url,
        path: path,
        headers: headers,
        params: params,
      )
    rescue Error => error
      ErrorCommand.new(error)
    end

    private

{'fraction_non_alphanumeric': 0.09615384615384616, 'fraction_numerical': 0.0, 'mean_word_length': 2.383408071748879, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2820552', 'n_tokens_mistral': 470, 'n_tokens_neox': 452, 'n_words': 115}