fix changelog task for github API v3

This commit is contained in:
Aaron Suggs 2012-07-02 15:44:39 -04:00
parent 2f226adcba
commit 59c9f44a44
1 changed files with 4 additions and 4 deletions

View File

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