AndrewVos/github-statistics — Issue #3: missing repositories.yml
Author: hsanchez
Created: 2011-11-03 19:30:41+00:00
State: open

I am interested in using your ruby scripts to collect commit messages from Github. I will performing sentiment analysis on them.

Since the repositories.yml ( or commits*.yml) was not available, I defined one for my experiment. Unfortunately, the way I defined this file does not seem to match the format expected by your program.

For example, this is what I have in repositories.yml:
[{user_id: rails, repository: rails}, {user_id: MacRuby, repository: MacRuby}]

or

- { user_id: rails, repository: rails }
- { user_id: MacRuby, repository: MacRuby }

Then, when I executed the following rake rip:commits, I get the following errors

** Invoke rip:commits (first_time)
** Execute rip:commits
Repository 1 of 2
repositoryrailsuser_idrails
repositoryrailsuser_idrails
nil
Commit page 1
rake aborted!
undefined method `map' for nil:NilClass
/github-statistics/lib/github_commit_ripper.rb:38:in `rip_commits'
/github-statistics/lib/github_commit_ripper.rb:28:in `loop'
/github-statistics/lib/github_commit_ripper.rb:28:in `rip_commits'
/github-statistics/lib/github_commit_ripper.rb:14:in `rip_all_commits'
/github-statistics/lib/github_commit_ripper.rb:11:in `each_index'
/github-statistics/lib/github_commit_ripper.rb:11:in `rip_all_commits'
/github-statistics/Rakefile:21
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Tasks: TOP => rip:commits
nil
http://github.com/api/v2/json/commits/list///master/?page=1{"error":"api route not recognized"}

From the last line, the values for user_id and repository are nil.

Any help on the repositories.yml file or any other file that I need in order to run your scripts will be greatly appreciated. Thanks.

Huascar A. Sanchez