<commit_before>require_relative 'storage'
require 'hamster'
require 'active_support/core_ext'

module Moltrio
  module Config
    class StorageChain < Storage

      def initialize(storages)
        @storages = Hamster.list(*storages)
      end

      def [](key)
        storages_for_key(key)
          .reverse
          .map { |storage| storage.fetch(key) }<commit_msg>require only what we use<commit_after>require_relative 'storage'

require 'hamster'
require 'active_support/core_ext/hash/deep_merge'

module Moltrio
  module Config
    class StorageChain < Storage

      def initialize(storages)
        @storages = Hamster.list(*storages)
      end

      def [](key)
        storages_for_key(key)
          .reverse
          .map { |storage| storage.fetch(key) }
{'fraction_non_alphanumeric': 0.09067357512953368, 'fraction_numerical': 0.0, 'mean_word_length': 2.865, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4721008', 'n_tokens_mistral': 242, 'n_tokens_neox': 239, 'n_words': 54}