<commit_before>require "optparse"
require "socket"

require "testjour/commands/command"
require "testjour/http_queue"
require "testjour/configuration"
require "testjour/cucumber_extensions/step_counter"
require "testjour/results_formatter"

module Testjour
module Commands
    
  class Run < Command
    
    def execute
      configuration.unshift_args(testjour_yml_args)
      configuration.parse!
      
      HttpQueue.with_queue_server do
        configuration.setup
        queue_features
        start_slaves
        print_results
      end
    end
    
    def queue_features
      HttpQueue.with_queue(queue_uri) do |queue|
        configuration.feature_files.each do |feature_file|
          queue.push(:feature_files, feature_file)
        end
      end
    end
    <commit_msg>Don't start if no feature files. Log queued features<commit_after>require "optparse"
require "socket"

require "testjour/commands/command"
require "testjour/http_queue"
require "testjour/configuration"
require "testjour/cucumber_extensions/step_counter"
require "testjour/results_formatter"

module Testjour
module Commands
    
  class Run < Command
    
    def execute
      configuration.unshift_args(testjour_yml_args)
      configuration.parse!
      
      HttpQueue.with_queue_server do
        configuration.setup
        
        if configuration.feature_files.any?
          queue_features
          start_slaves
          print_results
        end
      end
    end
    
    def queue_features
      Testjour.logger.info("Queuing features...")
      
      HttpQueue.with_queue(queue_uri) do |queue|
        configuration.feature_files.each do |feature_file|
          queue.push(:feature_files, feature_file)
          Testjour.logger.info "Queued: #{feature_file}"
        end
      end
    end
    
{'fraction_non_alphanumeric': 0.06326304106548279, 'fraction_numerical': 0.0, 'mean_word_length': 2.7175257731958764, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4711478', 'n_tokens_mistral': 512, 'n_tokens_neox': 506, 'n_words': 108}