<commit_before>require 'rbconfig'

module GemJacker
  class ExecutablePaths
    def self.sys_path_sep
      if /mswin|mingw/.match(RbConfig::CONFIG['host_os'])
        ';'
      else
        ':'
      end
    end

    # Load the system path with a specified priority.
    def self.inherit_sys_path(priority=0)
      @@path ||= []

      sys_path = ENV['PATH'].split(sys_path_sep)

      @@path += sys_path.map do |p| 
        {:path => p, :priority => priority}
      end
    end

    # Clears the path.<commit_msg>Include the system path by default. Optionally exclude it.<commit_after>require 'rbconfig'

module GemJacker
  # Push the configured path out to the system. By default, inherit
  # the system path and set its priority level to 0.
  def self.deploy(inherit_sys=true, sys_level=0)
    if inherit_sys
      GemJacker::ExecutablePaths.inherit_sys_path(sys_level)
    end
    GemJacker::ExecutablePaths.replace_sys_path
  end

  class ExecutablePaths
    def self.sys_path_sep
      if /mswin|mingw/.match(RbConfig::CONFIG['host_os'])
        ';'
      else
        ':'
      end
    end

    # Load the system path with a specified priority.
    def self.inherit_sys_path(priority=0)
      @@path ||= []

      sys_path = ENV['PATH'].split(sys_path_sep)

      @@path += sys_path.map do |p| 
        {:path => p, :priority => priority}
      end
    end

    # Clears the path.
{'fraction_non_alphanumeric': 0.10590778097982709, 'fraction_numerical': 0.002881844380403458, 'mean_word_length': 2.6077922077922078, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2527648', 'n_tokens_mistral': 462, 'n_tokens_neox': 439, 'n_words': 115}