diff --git a/.gitignore b/.gitignore index c6de9ad..af948e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ *.gem -*.rbc +*~ .bundle +.rvmrc .yardoc Gemfile.lock coverage/* doc/* log/* +measurement/* pkg/* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b54b30e..c9e45f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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] diff --git a/Gemfile b/Gemfile index 767ed09..43b12ee 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Rakefile b/Rakefile index e001d6c..930005f 100644 --- a/Rakefile +++ b/Rakefile @@ -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]