mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
add rake authors
This commit is contained in:
parent
6d7c4c001d
commit
cbd32dae0a
2 changed files with 17 additions and 0 deletions
2
AUTHORS
2
AUTHORS
|
@ -54,3 +54,5 @@ and last but not least:
|
||||||
|
|
||||||
* Frank Sinatra (chairman of the board) for having so much class he
|
* Frank Sinatra (chairman of the board) for having so much class he
|
||||||
deserves a web-framework named after him.
|
deserves a web-framework named after him.
|
||||||
|
|
||||||
|
For a complete list of all contributors to Sinatra itself, run `rake authors`.
|
||||||
|
|
15
Rakefile
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})"
|
"(based on commits included in #{a.release}, but not in #{a.backports})"
|
||||||
end
|
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 ============================================================
|
# PACKAGING ============================================================
|
||||||
|
|
||||||
if defined?(Gem)
|
if defined?(Gem)
|
||||||
|
|
Loading…
Reference in a new issue