<commit_before>module Repositories
  class Carthage < Base
    HAS_VERSIONS = false
    HAS_DEPENDENCIES = false
    LIBRARIAN_SUPPORT = true
    URL = 'https://github.com/Carthage/Carthage'
    COLOR = '#ffac45'

    def self.project_names
      Manifest.platform('Carthage').includes(:repository_dependencies).map{|m| m.repository_dependencies.pluck(:project_name).map(&:downcase)}.flatten.uniq
    end

    def self.project(name)
      if name.match(/^([-\w]+)\/([-_.\w]+)$/)
        begin
          repo = AuthToken.client.repo(name, accept: 'application/vnd.github.drax-preview+json')
          return repo.to_hash
        rescue
          return nil
        end
      elsif name_with_owner = GithubUrls.parse(name)
        begin<commit_msg>Use the preloaded deps<commit_after>module Repositories
  class Carthage < Base
    HAS_VERSIONS = false
    HAS_DEPENDENCIES = false
    LIBRARIAN_SUPPORT = true
    URL = 'https://github.com/Carthage/Carthage'
    COLOR = '#ffac45'

    def self.project_names
      Manifest.platform('Carthage').includes(:repository_dependencies).map{|m| m.repository_dependencies.map(&:project_name).map(&:downcase)}.flatten.uniq
    end

    def self.project(name)
      if name.match(/^([-\w]+)\/([-_.\w]+)$/)
        begin
          repo = AuthToken.client.repo(name, accept: 'application/vnd.github.drax-preview+json')
          return repo.to_hash
        rescue
          return nil
        end
      elsif name_with_owner = GithubUrls.parse(name)
        begin
{'fraction_non_alphanumeric': 0.12466666666666666, 'fraction_numerical': 0.0026666666666666666, 'mean_word_length': 2.8096446700507616, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2345789', 'n_tokens_mistral': 506, 'n_tokens_neox': 477, 'n_words': 80}