<commit_before># Mechanism to cache gems
#
# Licensed under the MIT license
# Copyright (C) 2013-2014 Red Hat, Inc.

require 'fileutils'

module Polisher
  class GemCache
    DIR = '~/.polisher/gems'

    def self.create!
      FileUtils.mkdir_p(DIR) unless File.directory?(DIR)
    end

    def self.clear!
      FileUtils.rm_rf(DIR)
    end

    def self.path_for(name, version)<commit_msg>Small fix to gem cache location<commit_after># Mechanism to cache gems
#
# Licensed under the MIT license
# Copyright (C) 2013-2014 Red Hat, Inc.

require 'fileutils'

module Polisher
  class GemCache
    DIR = "#{ENV['HOME']}/.polisher/gems"

    def self.create!
      FileUtils.mkdir_p(DIR) unless File.directory?(DIR)
    end

    def self.clear!
      FileUtils.rm_rf(DIR)
    end

    def self.path_for(name, version)
{'fraction_non_alphanumeric': 0.10306748466257669, 'fraction_numerical': 0.0196319018404908, 'mean_word_length': 3.2061855670103094, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4979001', 'n_tokens_mistral': 295, 'n_tokens_neox': 267, 'n_words': 78}