<commit_before>
module Ginatra
  class Stat

    class << self

      def commits(repo_id)
        repo_conf = Ginatra::Config.repositories.select { |repo|
          repo['id'] == repo_id
        }.first
        return false if repo_conf.nil?
        id = repo_conf['id']
        name = repo_conf['name']
        path = repo_conf['path']
        Repository.new(id, name, path).commits
      end
    end
  end
end<commit_msg>commit stats<commit_after>module Ginatra
  class Stat

    class << self
      def commits(repo_id)
        repo = Ginatra::Config.repositories[repo_id]
        return false if repo.nil?
        repo['id'] = repo_id
        Ginatra::Repository.new(repo).commits
      end

      def all_commits
        commits = []
        repos = Ginatra::Config.repositories
        repos.each do |id, repo|
          repo['id'] = id
          commits << Ginatra::Repository.new(repo).commits
        end
        commits
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.10010427528675704, 'fraction_numerical': 0.0, 'mean_word_length': 1.9906542056074767, 'pattern_counts': {'":': 0, '<': 9, '<?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': '69977', 'n_tokens_mistral': 309, 'n_tokens_neox': 294, 'n_words': 69}