<commit_before>class Repositories
  class Clojars < Base
    HAS_VERSIONS = false
    HAS_DEPENDENCIES = true
    URL = 'https://clojars.org'
    COLOR = '#db5855'

    def self.project_names
      projects.keys
    end

    def self.projects
      @projects ||= get("http://clojars-json.herokuapp.com/feed.json")
    end

    def self.versions
      @versions ||= get("http://clojars-json.herokuapp.com/packages.json")
    end

    def self.project(name)
      projects[name.downcase].try(:first).merge(name: name)
    end

    def self.mapping(project)
      {
        :name => project["name"],
        :description => project["description"],
        :repository_url => repo_fallback(project["scm"]["url"], '')
      }
    end

    def self.versions(project)
      []
    end
  end
end<commit_msg>Clojars importer<commit_after>class Repositories
  class Clojars < Base
    HAS_VERSIONS = true
    HAS_DEPENDENCIES = false
    URL = 'https://clojars.org'
    COLOR = '#db5855'

    def self.project_names
      projects.keys
    end

    def self.projects
      @projects ||= get("http://clojars-json.herokuapp.com/feed.json")
    end

    def self.versions
      @versions ||= get("http://clojars-json.herokuapp.com/packages.json")
    end

    def self.project(name)
      projects[name.downcase].try(:first).merge(name: name)
    end

    def self.mapping(project)
      name = project[:name] == project["group-id"] ? project[:name] : "#{project["group-id"]}/#{project[:name]}"
      {
        :name => name,
        :description => project["description"],
        :repository_url => repo_fallback(project["scm"]["url"], '')
      }
    end

    def self.versions(project)
      project['versions'].map do |v|
        {
          :number => v['version']
        }
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.14540389972144846, 'fraction_numerical': 0.004456824512534819, 'mean_word_length': 2.5009746588693957, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '745655', 'n_tokens_mistral': 598, 'n_tokens_neox': 577, 'n_words': 103}