[release] add collaborator count to changelog stats

This commit is contained in:
geemus 2011-09-22 15:47:05 -05:00
parent b0ec2f014f
commit 3345c598c4
1 changed files with 4 additions and 2 deletions

View File

@ -191,8 +191,10 @@ task :changelog do
changelog << ''
require 'multi_json'
github_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/geemus/fog').body)
data = github_data['repository'].reject {|key, value| !['forks', 'open_issues', 'watchers'].include?(key)}
github_repo_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/geemus/fog').body)
data = github_repo_data['repository'].reject {|key, value| !['forks', 'open_issues', 'watchers'].include?(key)}
github_collaborator_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/geemus/fog/collaborators').body)
data['collaborators'] = github_collaborator_data['collaborators'].length
rubygems_data = MultiJson.decode(Excon.get('https://rubygems.org/api/v1/gems/fog.json').body)
data['downloads'] = rubygems_data['downloads']
stats = []