<commit_before>require 'yaml'

module Liftoff
  class ConfigurationParser

    def project_configuration
      @configuration ||= evaluated_configuration
    end

    private

    def default_configuration
      configuration_from_file(File.expand_path('../../../defaults/liftoffrc', __FILE__))
    end

    def local_configuration
      configuration_from_file(Dir.pwd + '/.liftoffrc')
    end

    def user_configuration
      configuration_from_file(ENV['HOME'] + '/.liftoffrc')
    end

    def evaluated_configuration
      default_configuration.
        merge(user_configuration).
        merge(local_configuration)<commit_msg>Put more-abstract methods above less-abstract ones<commit_after>require 'yaml'

module Liftoff
  class ConfigurationParser

    def project_configuration
      @configuration ||= evaluated_configuration
    end

    private

    def evaluated_configuration
      default_configuration.
        merge(user_configuration).
        merge(local_configuration)
    end

    def default_configuration
      configuration_from_file(File.expand_path('../../../defaults/liftoffrc', __FILE__))
    end

    def user_configuration
      configuration_from_file(ENV['HOME'] + '/.liftoffrc')
    end

    def local_configuration
      configuration_from_file(Dir.pwd + '/.liftoffrc')
{'fraction_non_alphanumeric': 0.08135072908672294, 'fraction_numerical': 0.0, 'mean_word_length': 3.3178807947019866, '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': '2630085', 'n_tokens_mistral': 356, 'n_tokens_neox': 340, 'n_words': 68}