Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Commit 2c05f2f

Browse files
committed
Add Yardstick
1 parent 2b91c9c commit 2c05f2f

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
*.gem
2-
*.rbc
32
*~
43
.bundle
54
.rvmrc
65
.yardoc
6+
Gemfile.lock
77
coverage/*
88
doc/*
9-
Gemfile.lock
109
log/*
10+
measurement/*
1111
pkg/*

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Ideally, a bug report should include a pull request with failing specs.
4141
8. Run `RUBYOPT=W2 bundle exec rake spec 2>&1 | grep twitter`. If your changes
4242
produce any warnings, return to step 5.
4343
9. Add documentation for your feature or bug fix.
44-
10. Run `bundle exec rake yard`. If your changes are not 100% documented, go
44+
10. Run `bundle exec rake verify_measurements`. If your changes are not 100% documented, go
4545
back to step 9.
4646
11. Commit and push your changes.
4747
12. [Submit a pull request.][pr]

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ group :development do
1515
end
1616

1717
group :test do
18+
gem 'backports'
1819
gem 'coveralls', :require => false
1920
gem 'mime-types', '~> 1.25', :platforms => :ruby_18
2021
gem 'rspec', '>= 2.14'
2122
gem 'rubocop', '>= 0.15', :platforms => [:ruby_19, :ruby_20]
2223
gem 'simplecov', :require => false
2324
gem 'timecop', '0.6.1'
2425
gem 'webmock'
26+
gem 'yardstick'
2527
end
2628

2729
platforms :rbx do

Rakefile

+11-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,14 @@ end
2525
require 'yard'
2626
YARD::Rake::YardocTask.new
2727

28-
task :default => [:spec, :rubocop]
28+
require 'yardstick/rake/measurement'
29+
Yardstick::Rake::Measurement.new do |measurement|
30+
measurement.output = 'measurement/report.txt'
31+
end
32+
33+
require 'yardstick/rake/verify'
34+
Yardstick::Rake::Verify.new do |verify|
35+
verify.threshold = 60.1
36+
end
37+
38+
task :default => [:spec, :rubocop, :verify_measurements]

0 commit comments

Comments
 (0)