<commit_before>module Repositories
  class Homebrew < Base
    HAS_VERSIONS = false
    HAS_DEPENDENCIES = false
    LIBRARIAN_PLANNED = true
    SECURITY_PLANNED = false
    URL = 'http://brew.sh/'
    COLOR = '#a1804c'

    def self.project_names
      page = 1
      projects = []
      while true
        r = get("http://brewformulas.org/?format=json&page=#{page}")['formulas']
        break if  r == []
        projects += r
        page +=1
      end
      projects.map{|project| project['formula'] }.uniq
    end

    def self.recent_names
      get("http://brewformulas.org/?format=json&page=#{page}")['new_formulas'].map{|project| project['formula'] }.uniq
    end

    def self.project(name)
      get("http://brewformulas.org/#{name}.json")
    end

    def self.mapping(project)
      {
        :name => project['formula'],
        :description => project['description'],
        :homepage => project['homepage'],
        :repository_url => repo_fallback('', project['homepage'])
      }
    end
  end
end
<commit_msg>Fixed homebrew recent names<commit_after>module Repositories
  class Homebrew < Base
    HAS_VERSIONS = false
    HAS_DEPENDENCIES = false
    LIBRARIAN_PLANNED = true
    SECURITY_PLANNED = false
    URL = 'http://brew.sh/'
    COLOR = '#a1804c'

    def self.project_names
      page = 1
      projects = []
      while true
        r = get("http://brewformulas.org/?format=json&page=#{page}")['formulas']
        break if  r == []
        projects += r
        page +=1
      end
      projects.map{|project| project['formula'] }.uniq
    end

    def self.recent_names
      get("http://brewformulas.org/?format=json&page=1")['new_formulas'].map{|project| project['formula'] }.uniq
    end

    def self.project(name)
      get("http://brewformulas.org/#{name}.json")
    end

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

{'fraction_non_alphanumeric': 0.1455512572533849, 'fraction_numerical': 0.006286266924564797, 'mean_word_length': 2.5428082191780823, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '955102', 'n_tokens_mistral': 690, 'n_tokens_neox': 644, 'n_words': 127}