<commit_before>$LOAD_PATH <<  File.expand_path(File.dirname(__FILE__))
require 'json'
require 'yaml'
require 'isp_unity_log'
require 'route/route'
require 'load_balance/load_balance'
require 'system_call'
require 'rule/rule'
require 'isp_unity/isp'
require 'isp_unity/version'
require 'isp_unity/routing_table'
require 'isp_unity/version'


module IspUnity

  config_file = File.join([File.expand_path(File.dirname(__FILE__)), '..', 'config', 'settings.yml'])
  ENV['GEM_ENV'] ||= 'development'
  PATH = YAML.load_file( config_file )[ENV['GEM_ENV']]['ubuntu']
  ConfigFilePath =  File.join([File.expand_path(File.dirname(__FILE__)), '..',PATH['config_file_path']])
  RoutingTablePath = PATH['rt_table_path'].to_s

  class IspUnityException < Exception
    def initialize(message)
      message = message['error'] if message.class == Hash
      super "[IspUnity] #{message}"
    end
  end

  class << self

    def setup
      IspUnity.config
      isp_lists = IspUnity.isp_config_list
      IspUnityLog.info(I18n.t('file.write'))<commit_msg>FIX# Config file path changes<commit_after>$LOAD_PATH <<  File.expand_path(File.dirname(__FILE__))
require 'json'
require 'yaml'
require 'isp_unity_log'
require 'route/route'
require 'load_balance/load_balance'
require 'system_call'
require 'rule/rule'
require 'isp_unity/isp'
require 'isp_unity/version'
require 'isp_unity/routing_table'
require 'isp_unity/version'


module IspUnity

  config_file = File.join([File.expand_path(File.dirname(__FILE__)), '..', 'config', 'settings.yml'])
  ENV['GEM_ENV'] ||= 'development'
  PATH = YAML.load_file( config_file )[ENV['GEM_ENV']]['ubuntu']
  ConfigFilePath =  File.join(PATH['config_file_path'])
  RoutingTablePath = PATH['rt_table_path'].to_s

  class IspUnityException < Exception
    def initialize(message)
      message = message['error'] if message.class == Hash
      super "[IspUnity] #{message}"
    end
  end

  class << self

    def setup
      IspUnity.config
      isp_lists = IspUnity.isp_config_list
      IspUnityLog.info(I18n.t('file.write'))
{'fraction_non_alphanumeric': 0.1381161542215715, 'fraction_numerical': 0.0019521717911176184, 'mean_word_length': 5.06508875739645, 'pattern_counts': {'":': 0, '<': 13, '<?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': '6463374', 'n_tokens_mistral': 723, 'n_tokens_neox': 680, 'n_words': 130}