<commit_before>require 'multi_json'
module Dotify
  VERSION = "0.6.6"

  class Version
    class << self
      def run_check!
        return if !@version.nil?

        resp = Net::HTTP.get('rubygems.org', '/api/v1/versions/dotify.json')
        json = MultiJson.load(resp)
        @version = json.map { |v| v['number'] }.max
      end

      def to_s
        VERSION
      end

      def current?
        VERSION == self.version
      end

      def out_of_date?
        !current?
      end

      def version
        @version || self.run_check!
      end

      def handle_error(e)
        "Version Check Error: #{e.message}\n#{e.backtrace.join("\n")}"
      end
    end
  end

end
<commit_msg>only require multi_json when running version check<commit_after>module Dotify
  VERSION = "0.6.6"

  class Version
    class << self
      def run_check!
        require 'multi_json'
        return if !@version.nil?

        resp = Net::HTTP.get('rubygems.org', '/api/v1/versions/dotify.json')
        json = MultiJson.load(resp)
        @version = json.map { |v| v['number'] }.max
      end

      def to_s
        VERSION
      end

      def current?
        VERSION == self.version
      end

      def out_of_date?
        !current?
      end

      def version
        @version || self.run_check!
      end

      def handle_error(e)
        "Version Check Error: #{e.message}\n#{e.backtrace.join("\n")}"
      end
    end
  end

end

{'fraction_non_alphanumeric': 0.11428571428571428, 'fraction_numerical': 0.005574912891986063, 'mean_word_length': 1.8101761252446185, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1739307', 'n_tokens_mistral': 482, 'n_tokens_neox': 461, 'n_words': 114}