<commit_before>require "rubygems"
$: << File.join(File.dirname(__FILE__), "..")
$: << File.join(File.dirname(__FILE__), "..", "..", "test")
require "logstash/namespace"
require "java"

class LogStash::Runner
  def main(args)
    $: << File.join(File.dirname(__FILE__), "../")

    if args.empty?
      $stderr.puts "No arguments given."
      java.lang.System.exit(1)
    end

    @runners = []
    while !args.empty?
      #p :args => args
      args = run(args)
    end
<commit_msg>- Abort and notify the user if we are running outside of jruby or   outside of 1.9.2 mode<commit_after>require "rubygems"
$: << File.join(File.dirname(__FILE__), "..")
$: << File.join(File.dirname(__FILE__), "..", "..", "test")
require "logstash/namespace"

class LogStash::Runner
  def main(args)
    $: << File.join(File.dirname(__FILE__), "../")

    if args.empty?
      $stderr.puts "No arguments given."
      java.lang.System.exit(1)
    end

    if (RUBY_ENGINE rescue nil) != "jruby"
      $stderr.puts "JRuby is required to use this."
      return 1
    end

    if RUBY_VERSION != "1.9.2"
      $stderr.puts "Ruby 1.9.2 mode is required."
      $stderr.puts "Options for fixin this: "
      $stderr.puts "  * If doing 'ruby bin/logstash ...' add --1.9 flag to 'ruby'"
      $stderr.puts "  * If doing 'java -jar ... ' add -Djruby.compat.version=RUBY1_9 to java flags"
      return 1
    end

    require "java"

    @runners = []
    while !args.empty?
      #p :args => args
      args = run(args)
    end

{'fraction_non_alphanumeric': 0.16711051930758988, 'fraction_numerical': 0.011318242343541944, 'mean_word_length': 2.587112171837709, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, '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': '5487187', 'n_tokens_mistral': 553, 'n_tokens_neox': 519, 'n_words': 131}