mojombo/grit — Issue #96: Commit stats for Ruby libraries does not work (Rails app does)
Author: senthilnambi
Created: 2011-10-08 08:18:59+00:00
State: open

Here's output of mongomapper library.

```ruby
pry(main)> repo = Grit::Repo.new('.')
=> #
pry(main)> c = repo.commits
=> [#,
#,
#,
#,
#,
#,
#,
#,
#,
#]
pry(main)> c.first.stats
=> #">
pry(main)> c.first.stats.additions
=> 0
pry(main)> c.first.stats.deletions
=> 0
pry(main)> c.first.stats.to_hash
=> {"id"=>"Keepers>\e[m", "files"=>[], "additions"=>0, "deletions"=>0, "total"=>0}
pry(main)> c.first.diffs
=> [#,
@a_mode=nil,
@a_path="lib/mongo_mapper/plugins/associations/belongs_to_association.rb",
@b_blob=#,
@b_mode="100644",
@b_path="lib/mongo_mapper/plugins/associations/belongs_to_association.rb",
@deleted_file=false,
@diff=
"--- a/lib/mongo_mapper/plugins/associations/belongs_to_association.rb\n+++ b
@new_file=false,
@renamed_file=false,
@repo=
#,
@similarity_index=0>,
```

Am I doing something wrong or does Grit not support it for plain Ruby libraries? Thanks!