<commit_before>module Gon
  module Helpers
    def self.included base
      base.send(:include, InstanceMethods)
    end

    module InstanceMethods
      def include_gon(options = {})
        if Gon.request_env && Gon.all_variables.present?
          data = Gon.all_variables
          namespace = options[:namespace] || 'gon'
          script = "<script>window." + namespace + " = {};"
          unless options[:camel_case]
            data.each do |key, val|
              script += namespace + "." + key.to_s + '=' + val.to_json + ";"
            end
          else
            data.each do |key, val|
              script += namespace + "." + key.to_s.camelize(:lower) + '=' + val.to_json + ";"
            end
          end
          script += "</script>"
          script.html_safe
        else
          ""
        end
      end
    end
  end

  module GonHelpers
    def self.included base<commit_msg>Replace += with << for string concatenation<commit_after>module Gon
  module Helpers
    def self.included base
      base.send(:include, InstanceMethods)
    end

    module InstanceMethods
      def include_gon(options = {})
        if Gon.request_env && Gon.all_variables.present?
          data = Gon.all_variables
          namespace = options[:namespace] || 'gon'
          script = '<script>window.' + namespace + ' = {};'
          if options[:camel_case]
            data.each do |key, val|
              script << namespace + '.' + key.to_s.camelize(:lower) + '=' + val.to_json + ';'
            end
          else
            data.each do |key, val|
              script << namespace + '.' + key.to_s + '=' + val.to_json + ';'
            end
          end
          script << '</script>'
          script.html_safe
        else
          ""
        end
      end
    end
  end

  module GonHelpers
    def self.included base
{'fraction_non_alphanumeric': 0.11700975081256772, 'fraction_numerical': 0.0, 'mean_word_length': 1.642346208869814, 'pattern_counts': {'":': 0, '<': 15, '<?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': '2532167', 'n_tokens_mistral': 523, 'n_tokens_neox': 529, 'n_words': 123}