<commit_before>module Pod
  class Resolver
    def initialize(specification)
      @specification = specification
    end

    def resolve
      @sets = []
      find_dependency_sets(@specification)
      @sets.map(&:podspec)
    end

    def find_dependency_sets(specification)
      specification.read(:dependencies).each do |dependency|
        Source.search(dependency).each do |set|
          # TODO ultimately this compatibility check should be used to try and
          # resolve the conflicts, but for now we'll keep it simple.
          if existing_set = @sets.find { |s| s == set }<commit_msg>Raise when a pod can't be found by name.<commit_after>module Pod
  class Resolver
    def initialize(specification)
      @specification = specification
    end

    def resolve
      @sets = []
      find_dependency_sets(@specification)
      @sets.map(&:podspec)
    end

    def find_dependency_sets(specification)
      specification.read(:dependencies).each do |dependency|
        sets = Source.search(dependency)
        if sets.empty?
          raise "Unable to find a pod named `#{dependency.name}'"
        end
        sets.each do |set|
          # TODO ultimately this compatibility check should be used to try and
          # resolve the conflicts, but for now we'll keep it simple.
          if existing_set = @sets.find { |s| s == set }
{'fraction_non_alphanumeric': 0.08197932053175776, 'fraction_numerical': 0.0, 'mean_word_length': 2.622994652406417, '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': '6929052', 'n_tokens_mistral': 376, 'n_tokens_neox': 356, 'n_words': 121}