<commit_before>require 'fileutils'

module Codeqa
  class Installer
    def self.call(app_root)
      new(app_root).call
    end

    def initialize(app_root)
      @app_root = Pathname.new(File.expand_path(app_root))
    end

    def call
      generate_dot_codeqa
      install_codeqa_git_hook
    end

  private

    def dot_path(*args)
      app_path('.codeqa').join(*args)
    end

    def app_path(*args)
      @app_root.join(*args)
    end

  private

    def template_path(*args)<commit_msg>duplicate private<commit_after>require 'fileutils'

module Codeqa
  class Installer
    def self.call(app_root)
      new(app_root).call
    end

    def initialize(app_root)
      @app_root = Pathname.new(File.expand_path(app_root))
    end

    def call
      generate_dot_codeqa
      install_codeqa_git_hook
    end

  private

    def dot_path(*args)
      app_path('.codeqa').join(*args)
    end

    def app_path(*args)
      @app_root.join(*args)
    end

    def template_path(*args)
{'fraction_non_alphanumeric': 0.08879919273461151, 'fraction_numerical': 0.0, 'mean_word_length': 2.757575757575758, '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': '1743914', 'n_tokens_mistral': 349, 'n_tokens_neox': 334, 'n_words': 63}