Add Yardstick

This commit is contained in:
Erik Michaels-Ober 2013-12-31 06:08:57 +01:00
parent 125d2f1c8c
commit 2a7298a3f3
4 changed files with 18 additions and 4 deletions

4
.gitignore vendored
View File

@ -1,9 +1,11 @@
*.gem
*.rbc
*~
.bundle
.rvmrc
.yardoc
Gemfile.lock
coverage/*
doc/*
log/*
measurement/*
pkg/*

View File

@ -39,8 +39,8 @@ Ideally, a bug report should include a pull request with failing specs.
7. Run `open coverage/index.html`. If your changes are not completely covered
by your tests, return to step 3.
8. Add documentation for your feature or bug fix.
9. Run `bundle exec rake yard`. If your changes are not 100% documented, go
back to step 8.
9. Run `bundle exec rake verify_measurements`. If your changes are not 100%
documented, go back to step 8.
10. Add, commit, and push your changes.
11. [Submit a pull request.][pr]

View File

@ -15,12 +15,14 @@ group :development do
end
group :test do
gem 'backports'
gem 'coveralls', :require => false
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
gem 'rspec', '>= 2.11'
gem 'rubocop', '>= 0.16', :platforms => [:ruby_19, :ruby_20, :ruby_21]
gem 'simplecov', :require => false
gem 'webmock'
gem 'yardstick'
end
platforms :rbx do

View File

@ -29,4 +29,14 @@ end
require 'yard'
YARD::Rake::YardocTask.new
task :default => [:spec, :rubocop]
require 'yardstick/rake/measurement'
Yardstick::Rake::Measurement.new do |measurement|
measurement.output = 'measurement/report.txt'
end
require 'yardstick/rake/verify'
Yardstick::Rake::Verify.new do |verify|
verify.threshold = 55.7
end
task :default => [:spec, :rubocop, :verify_measurements]