<commit_before>module Pakyow
  class Application
    class << self
      attr_accessor :routes_proc, :middleware_proc, :configurations, :error_handlers
      
      # Sets the path to the application file so it can be reloaded later.
      #
      def inherited(subclass)
        Pakyow::Configuration::App.application_path = caller[0].match(/^(.+)(:?:\d+(:?:in `.+')?$)/)[1]
      end
      
      # Runs the application. Accepts the environment(s) to run, for example:
      # run(:development)
      # run([:development, :staging])
      #
      def run(*args)<commit_msg>Moved path parsing so it can be isolated/tested.<commit_after>module Pakyow
  class Application
    class << self
      attr_accessor :routes_proc, :middleware_proc, :configurations, :error_handlers
      
      # Sets the path to the application file so it can be reloaded later.
      #
      def inherited(subclass)
        Pakyow::Configuration::App.application_path = parse_path_from_caller(caller[0])
      end
      
      def parse_path_from_caller(caller)
        caller.match(/^(.+)(:?:\d+(:?:in `.+')?$)/)[1]
      end
      
      # Runs the application. Accepts the environment(s) to run, for example:
      # run(:development)
      # run([:development, :staging])
      #
      def run(*args)
{'fraction_non_alphanumeric': 0.12480499219968799, 'fraction_numerical': 0.0031201248049922, 'mean_word_length': 2.784660766961652, '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': '4920474', 'n_tokens_mistral': 403, 'n_tokens_neox': 392, 'n_words': 100}