<commit_before>module Tanuki

  # Tanuki::Configurator is a scope for evaluating a Tanuki application configuration block.
  # Use Tanuki::development_application and Tanuki::production_application to create such a block.
  class Configurator

    # Creates a new configurator.
    def initialize(ctx)
      @context = ctx
      set :root, File.expand_path('..', $0)
      @config_root = File.join(@context.root, 'config');
    end

    # Loads and executes a given configuraion file with symbolic name +config+.
    def load_config(config)
      instance_eval File.read(File.join(@config_root, config.to_s) << '.rb')
    end

    private

    # Invokes Tanuki::Argument::store.
    def argument(klass, arg_class)
      Argument.store(klass, arg_class)
    end

    # Sets an +option+ to +value+ in the current context.
    def set(option, value)
      @context.send("#{option}=".to_sym, value)
    end

    # Invokes Tanuki::Application::use.
    def use(middleware, *args, &block)
      Application.use(middleware, *args, &block)
    end

    # Invokes Tanuki::Application::discard.
    def discard(middleware)
      Application.discard(middleware)
    end

    # Invokes Tanuki::Application::visitor.
    def visitor(sym, &block)
      Application.visitor(sym, &block)
    end

  end # end Configurator

      set :connections, {}
      set :namespace_contexts, {}
end # end Tanuki<commit_msg>Woops, merge mistake<commit_after>module Tanuki

  # Tanuki::Configurator is a scope for evaluating a Tanuki application configuration block.
  # Use Tanuki::development_application and Tanuki::production_application to create such a block.
  class Configurator

    # Creates a new configurator.
    def initialize(ctx)
      @context = ctx
      set :root, File.expand_path('..', $0)
      @config_root = File.join(@context.root, 'config');
    end

    # Loads and executes a given configuraion file with symbolic name +config+.
    def load_config(config)
      instance_eval File.read(File.join(@config_root, config.to_s) << '.rb')
    end

    private

    # Invokes Tanuki::Argument::store.
    def argument(klass, arg_class)
      Argument.store(klass, arg_class)
    end

    # Sets an +option+ to +value+ in the current context.
    def set(option, value)
      @context.send("#{option}=".to_sym, value)
    end

    # Invokes Tanuki::Application::use.
    def use(middleware, *args, &block)
      Application.use(middleware, *args, &block)
    end

    # Invokes Tanuki::Application::discard.
    def discard(middleware)
      Application.discard(middleware)
    end

    # Invokes Tanuki::Application::visitor.
    def visitor(sym, &block)
      Application.visitor(sym, &block)
    end

  end # end Configurator

end # end Tanuki
{'fraction_non_alphanumeric': 0.10701241782322864, 'fraction_numerical': 0.0007304601899196494, 'mean_word_length': 3.2730109204368176, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2981466', 'n_tokens_mistral': 854, 'n_tokens_neox': 821, 'n_words': 229}