SLOC stats generator.
Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
COPYING
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
app.rb
config.ru

README.md

SlocStar

SlocStar is a dummy stats generator that shows how much lines of code (SLOC) belongs whom in the latest snapshot of git repo. It was written just to play with resque and posix-spawn before starting APICD.

To calculate amount of lines of code per-author I use piped bunch of commands that are running in a spawned process by resque. You can get such stats by yourself running following in the dir with your repo (no ruby needed at all):

git ls-tree -r --name-only HEAD | while read file ; do
  git blame --line-porcelain HEAD "$file" | sed -n 's/^author //p'
done | sort | uniq -c | sort -rn

Deployment

  • $ bundle install
  • Start resque worker: $ bundle exec rake resque:work QUEUE=* or multiple workers: $ bundle exec rake resque:workers QUEUE=* COUNT=2 (see resque documentation for more details)
  • Start resque scheduler: $ bundle exec rake resque:scheduler
  • Start web interface: $ bundle exec rackup -p 8080

Licence & Copyrights

See COPYING.