<commit_before>class JRails
  @@config = {
    :google           => false,
    :jquery_version   => "1.4.2",
    :jqueryui_version => "1.8.4",
    :compressed       => true
  }

  def self.load_config
    config_file = File.join(Rails.root, "config", "jrails.yml")
    if File.exist? config_file
      loaded_config = YAML.load_file(config_file) 
      if loaded_config and loaded_config.key? Rails.env
        @@config.merge!(loaded_config[Rails.env].symbolize_keys) 
        if google?
          @@jquery_path   = "http://ajax.googleapis.com/ajax/libs/jquery/#{@@config[:jquery_version]}/jquery#{".min" if compressed?}.js"
          @@jqueryui_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/#{@@config[:jqueryui_version]}/jquery-ui#{".min" if compressed?}.js"
          @@jqueryui_i18n_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/#{@@config[:jqueryui_version]}/i18n/jquery-ui-i18n#{".min" if compressed?}.js"
        end
      else
        raise Exception.new "Failed finding '#{Rails.env}' environment in config. check your 'config/jrails.yml' or delete that file "
      end
    end
  end

  def self.config        ; @@config              ; end
  def self.google?       ; @@config[:google]     ; end
  def self.compressed?   ; @@config[:compressed] ; end
  def self.jquery_path   ; @@jquery_path         ; end
  def self.jqueryui_path ; @@jqueryui_path       ; end
  def self.jqueryui_i18n_path ; @@jqueryui_i18n_path  ; end
end



module ActionView
  module Helpers
    
    module JavaScriptHelper<commit_msg>I got "jrails.rb:10:in `join': can't convert nil into String" because Rails.root isn't available for some reason at this time.<commit_after>class JRails
  @@config = {
    :google           => false,
    :jquery_version   => "1.4.2",
    :jqueryui_version => "1.8.4",
    :compressed       => true
  }

  def self.load_config
    config_file = File.join("./", "config", "jrails.yml")
    if File.exist? config_file
      loaded_config = YAML.load_file(config_file) 
      if loaded_config and loaded_config.key? Rails.env
        @@config.merge!(loaded_config[Rails.env].symbolize_keys) 
        if google?
          @@jquery_path   = "http://ajax.googleapis.com/ajax/libs/jquery/#{@@config[:jquery_version]}/jquery#{".min" if compressed?}.js"
          @@jqueryui_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/#{@@config[:jqueryui_version]}/jquery-ui#{".min" if compressed?}.js"
          @@jqueryui_i18n_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/#{@@config[:jqueryui_version]}/i18n/jquery-ui-i18n#{".min" if compressed?}.js"
        end
      else
        raise Exception.new "Failed finding '#{Rails.env}' environment in config. check your 'config/jrails.yml' or delete that file "
      end
    end
  end

  def self.config        ; @@config              ; end
  def self.google?       ; @@config[:google]     ; end
  def self.compressed?   ; @@config[:compressed] ; end
  def self.jquery_path   ; @@jquery_path         ; end
  def self.jqueryui_path ; @@jqueryui_path       ; end
  def self.jqueryui_i18n_path ; @@jqueryui_i18n_path  ; end
end



module ActionView
  module Helpers
    
    module JavaScriptHelper
{'fraction_non_alphanumeric': 0.1390728476821192, 'fraction_numerical': 0.010722169662567014, 'mean_word_length': 2.8448484848484847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2840719', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1024, 'n_words': 203}