<commit_before>module Exhaust
  class Runner

    attr_reader :configuration
    def initialize(configuration=Exhaust::Configuration.new)
      @configuration = configuration
    end

    def run
      while running = ember_server.gets
        if running =~ /build successful/i
          break
        end
      end

      while running = rails_server.gets
        if running =~ /info/i
          break
        end
      end
    end

    def ember_host
      "http://localhost:#{ember_port}"
    end

    def ember_port
      configuration.ember_port.to_s
    end
<commit_msg>Add a timeout for Ember/Rails boot time<commit_after>module Exhaust
  class Runner

    attr_reader :configuration
    def initialize(configuration=Exhaust::Configuration.new)
      @configuration = configuration
    end

    def run
      Timeout::timeout(30) do
        while running = ember_server.gets
          if running =~ /build successful/i
            break
          end
        end

        while running = rails_server.gets
          puts running
          if running =~ /info/i
            break
          end
        end
      end
    end

    def ember_host
      "http://localhost:#{ember_port}"
    end

    def ember_port
      configuration.ember_port.to_s
    end

{'fraction_non_alphanumeric': 0.05947660586835844, 'fraction_numerical': 0.0015860428231562252, 'mean_word_length': 1.8487584650112867, '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': '3998705', 'n_tokens_mistral': 355, 'n_tokens_neox': 341, 'n_words': 93}