Add Yardstick
This commit is contained in:
parent
125d2f1c8c
commit
2a7298a3f3
|
@ -1,9 +1,11 @@
|
||||||
*.gem
|
*.gem
|
||||||
*.rbc
|
*~
|
||||||
.bundle
|
.bundle
|
||||||
|
.rvmrc
|
||||||
.yardoc
|
.yardoc
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
coverage/*
|
coverage/*
|
||||||
doc/*
|
doc/*
|
||||||
log/*
|
log/*
|
||||||
|
measurement/*
|
||||||
pkg/*
|
pkg/*
|
||||||
|
|
|
@ -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
|
7. Run `open coverage/index.html`. If your changes are not completely covered
|
||||||
by your tests, return to step 3.
|
by your tests, return to step 3.
|
||||||
8. Add documentation for your feature or bug fix.
|
8. Add documentation for your feature or bug fix.
|
||||||
9. Run `bundle exec rake yard`. If your changes are not 100% documented, go
|
9. Run `bundle exec rake verify_measurements`. If your changes are not 100%
|
||||||
back to step 8.
|
documented, go back to step 8.
|
||||||
10. Add, commit, and push your changes.
|
10. Add, commit, and push your changes.
|
||||||
11. [Submit a pull request.][pr]
|
11. [Submit a pull request.][pr]
|
||||||
|
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -15,12 +15,14 @@ group :development do
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
|
gem 'backports'
|
||||||
gem 'coveralls', :require => false
|
gem 'coveralls', :require => false
|
||||||
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
|
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
|
||||||
gem 'rspec', '>= 2.11'
|
gem 'rspec', '>= 2.11'
|
||||||
gem 'rubocop', '>= 0.16', :platforms => [:ruby_19, :ruby_20, :ruby_21]
|
gem 'rubocop', '>= 0.16', :platforms => [:ruby_19, :ruby_20, :ruby_21]
|
||||||
gem 'simplecov', :require => false
|
gem 'simplecov', :require => false
|
||||||
gem 'webmock'
|
gem 'webmock'
|
||||||
|
gem 'yardstick'
|
||||||
end
|
end
|
||||||
|
|
||||||
platforms :rbx do
|
platforms :rbx do
|
||||||
|
|
12
Rakefile
12
Rakefile
|
@ -29,4 +29,14 @@ end
|
||||||
require 'yard'
|
require 'yard'
|
||||||
YARD::Rake::YardocTask.new
|
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]
|
||||||
|
|
Loading…
Reference in New Issue