<commit_before>require 'yaml'
require 'fileutils'

module Pomodori
  module Config
    attr_reader :config

    def read_config(file_path = nil)
      config_file = file_path || ENV['HOME'] + "/.pomodori/pomodori.yml"

      if !File.exists?( config_file )
        raise Errno::ENOENT, "#{config_file}"
      end

      config = YAML.load( File.read( config_file ) )

      @config = config
    end
  end
end<commit_msg>Will be making config.rb easier to mock for testing<commit_after>require 'yaml'
require 'fileutils'

module Pomodori
  module Config
    attr_reader :config

    # TODO: Build default_config_file

    def read_config(file_path = nil)
      config_file = file_path || ENV['HOME'] + "/.pomodori/pomodori.yml"

      if !File.exists?( config_file )
        raise Errno::ENOENT, "#{config_file}"
      end

      config = YAML.load( File.read( config_file ) )

      @config = config
    end
  end
end
{'fraction_non_alphanumeric': 0.10577971646673937, 'fraction_numerical': 0.0, 'mean_word_length': 2.939914163090129, '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': '5683283', 'n_tokens_mistral': 315, 'n_tokens_neox': 299, 'n_words': 76}