forked from ruby-amqp/amqp
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
38 lines (33 loc) · 851 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
desc "Generate AMQP specification classes"
task :codegen do
sh 'ruby protocol/codegen.rb > lib/amqp/spec.rb'
sh 'ruby lib/amqp/spec.rb'
end
desc "Run spec suite (uses bacon gem)"
task :spec do
sh 'bacon lib/amqp.rb'
end
desc "Build the gem"
task :gem do
sh 'gem build *.gemspec'
end
desc "Synonym for gem"
task :pkg => :gem
desc "Synonym for gem"
task :package => :gem
desc "Regenerate contributors file."
task :contributors do
authors = %x{git log | grep ^Author:}.split("\n")
results = authors.reduce(Hash.new) do |results, line|
name = line.sub(/^Author: (.+) <.+>$/, '\1')
results[name] ||= 0
results[name] += 1
results
end
results = results.sort_by { |_, count| count }.reverse
File.open("CONTRIBUTORS", "w") do |file|
results.each do |name, count|
file.puts "#{name}: #{count}"
end
end
end