Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add rake authors

  • Loading branch information...
commit cbd32dae0a48ffac8ef74d942f1065fba28974a8 1 parent 6d7c4c0
@rkh rkh authored
Showing with 17 additions and 0 deletions.
  1. +2 −0  AUTHORS
  2. +15 −0 Rakefile
View
2  AUTHORS
@@ -54,3 +54,5 @@ and last but not least:
* Frank Sinatra (chairman of the board) for having so much class he
deserves a web-framework named after him.
+
+For a complete list of all contributors to Sinatra itself, run `rake authors`.
View
15 Rakefile
@@ -80,6 +80,21 @@ task :thanks, [:release,:backports] do |t, a|
"(based on commits included in #{a.release}, but not in #{a.backports})"
end
+task :authors, [:format, :sep] do |t, a|
+ a.with_defaults :format => "%s (%d)", :sep => ', '
+ authors = Hash.new { |h,k| h[k] = 0 }
+ blake = "Blake Mizerany"
+ mapping = {
+ "blake.mizerany@gmail.com" => blake, "bmizerany" => blake,
+ "a_user@mac.com" => blake, "ichverstehe" => "Harry Vangberg",
+ "Wu Jiang (nouse)" => "Wu Jiang" }
+ `git shortlog -s`.lines.map do |line|
+ num, name = line.split("\t", 2).map(&:strip)
+ authors[mapping[name] || name] += num.to_i
+ end
+ puts authors.sort_by { |n,c| -c }.map { |e| a.format % e }.join(a.sep)
+end
+
# PACKAGING ============================================================
if defined?(Gem)
Please sign in to comment.
Something went wrong with that request. Please try again.