-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
31 lines (27 loc) · 1.08 KB
/
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
require "bundler/gem_tasks"
desc "yardoc"
task :yard do
puts %x{ yardoc --protected ./lib/httperf.rb ./lib/**/*.rb }
end
desc "rspec"
task :rspec do
puts %x{ rspec -f d -c | tee rspec.tmp }
%x{ cat rspec.tmp | sed -e 's/^/\t\t/g' > RSPECOUT.md && rm rspec.tmp }
end
desc "generate and update gh-pages"
task :pages do
system(" set -x; bundle exec rspec ") or abort
system(" set -x; bundle exec yardoc --protected ./lib/httperf.rb ./lib/**/*.rb ") or abort
system(" set -x; rm -rf /tmp/doc /tmp/coverage ") or abort
system(" set -x; mv -v ./doc /tmp ") or abort
system(" set -x; mv -v ./coverage /tmp ") or abort
system(" set -x; git checkout gh-pages ") or abort
system(" set -x; rm -rf ./doc ./coverage ") or abort
system(" set -x; mv -v /tmp/doc . ") or abort
system(" set -x; mv -v /tmp/coverage . ") or abort
system(" set -x; git add . ") or abort
system(" set -x; git commit --all -m 'updating doc and coverage' ") or abort
system(" set -x; git checkout master ") or abort
puts "don't forget to run: git push origin gh-pages"
end
task :finish => [ :rspec, :yard ]