<commit_before>require 'test_rail'
require 'res/ir'
require 'res/mappings'
require 'res/config'

module Res
  module Reporters
    class TestRail
      
      attr_accessor :ir, :case_status, :config, :project, :suite
      def initialize(args)
        @url = args[:url]
        @config = Res::Config.new([:user, :password, :namespace, :project, :suite], :optional => [:run_id, :run_name], :pre_env => 'testrail')
        config.process(args)

        @case_status = {}
        @io = File.new("./.test_rail_reporter.log","w+") 
      
        test_rail_project = config.project
        @suite_name = config.suite 
  
       begin
          @project = tr.find_project(:name => test_rail_project)
        rescue
          @io.puts "Project: #{test_rail_project} could not be found" 
          @io.puts "  Please create a project first to contain test suite #{@suite_name}"
          @io.close
          return "Project #{test_rail_project} could not be found" 
        end
      end # initialize

      # Creates a new suite within testrail<commit_msg>Correcction<commit_after>require 'test_rail'
require 'res/ir'
require 'res/mappings'
require 'res/config'

module Res
  module Reporters
    class TestRail
      
      attr_accessor :ir, :case_status, :config, :project, :suite
      def initialize(args)
        @url = args[:url]
        @config = Res::Config.new([:user, :password, :namespace, :project, :suite], :optional => [:run_id, :run_name], :pre_env => 'testrail_')
        config.process(args)

        @case_status = {}
        @io = File.new("./.test_rail_reporter.log","w+") 
      
        test_rail_project = config.project
        @suite_name = config.suite 
  
       begin
          @project = tr.find_project(:name => test_rail_project)
        rescue
          @io.puts "Project: #{test_rail_project} could not be found" 
          @io.puts "  Please create a project first to contain test suite #{@suite_name}"
          @io.close
          return "Project #{test_rail_project} could not be found" 
        end
      end # initialize

      # Creates a new suite within testrail
{'fraction_non_alphanumeric': 0.11719866603144355, 'fraction_numerical': 0.0, 'mean_word_length': 2.5413153456998314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2110755', 'n_tokens_mistral': 664, 'n_tokens_neox': 635, 'n_words': 165}