<commit_before>module Pod
  class Source
    def self.all
      @sources ||= begin
        repos_dir = Config.instance.repos_dir
        unless repos_dir.exist?
          raise Informative, "No spec repos found in `#{repos_dir}'. " \
                             "To fetch the `master' repo run: $ pod setup"
        end
        repos_dir.children.select(&:directory?).map { |repo| new(repo) }
      end
    end

    def self.search(dependency)
      all.map { |s| s.search(dependency) }.compact.first ||
        raise(Informative, "Unable to find a pod named `#{dependency.name}'")
    end

    def self.search_by_name(query, full_text_search)
      result = all.map { |s| s.search_by_name(query, full_text_search) }.flatten
      if result.empty?
        extra = ", summary, or description" if full_text_search
        raise(Informative, "Unable to find a pod with name" \
                           "#{extra} matching `#{query}'")
      end
      result
    end<commit_msg>Hint to `pod repo update` when Pod can't be found.<commit_after>module Pod
  class Source
    def self.all
      @sources ||= begin
        repos_dir = Config.instance.repos_dir
        unless repos_dir.exist?
          raise Informative, "No spec repos found in `#{repos_dir}'. " \
                             "To fetch the `master' repo run: $ pod setup"
        end
        repos_dir.children.select(&:directory?).map { |repo| new(repo) }
      end
    end

    def self.search(dependency)
      all.map { |s| s.search(dependency) }.compact.first ||
        raise(Informative, "Unable to find a pod named `#{dependency.name}'.\n" \
                           "You might want to run `pod repo update` and try again.")
    end

    def self.search_by_name(query, full_text_search)
      result = all.map { |s| s.search_by_name(query, full_text_search) }.flatten
      if result.empty?
        extra = ", summary, or description" if full_text_search
        raise(Informative, "Unable to find a pod with name" \
                           "#{extra} matching `#{query}'")
      end
      result
    end
{'fraction_non_alphanumeric': 0.10875842155919153, 'fraction_numerical': 0.0, 'mean_word_length': 2.1216216216216215, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1967324', 'n_tokens_mistral': 638, 'n_tokens_neox': 617, 'n_words': 179}