Permalink
Browse files

Add Yardstick

  • Loading branch information...
1 parent 049a113 commit c46d1d7ab6fb7714b85a5a1259adbb45a9e6420e @sferik sferik committed Dec 31, 2013
Showing with 29 additions and 47 deletions.
  1. +5 −35 .gitignore
  2. +2 −2 CONTRIBUTING.md
  3. +4 −2 Gemfile
  4. +18 −8 Rakefile
View
@@ -1,41 +1,11 @@
-!.gitignore
*.gem
-*.rbc
-*.sw[a-p]
-*.tmproj
-*.tmproject
-*.un~
*~
-.DS_Store
-.Spotlight-V100
-.Trashes
-._*
.bundle
-.config
-.directory
-.elc
-.redcar
+.rvmrc
.yardoc
-/.emacs.desktop
-/.emacs.desktop.lock
-Desktop.ini
Gemfile.lock
-Icon?
-InstalledFiles
-Session.vim
-Thumbs.db
-\#*\#
-_yardoc
-auto-save-list
-coverage
-doc/
-lib/bundler/man
-pkg
+coverage/*
+doc/*
+log/*
+measurement/*
pkg/*
-rdoc
-spec/reports
-test/tmp
-test/version_tmp
-tmp
-tmtags
-tramp
View
@@ -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. Commit and push your changes.
11. [Submit a pull request.][pr]
View
@@ -1,26 +1,28 @@
source 'https://rubygems.org'
-gem 'rake'
gem 'jruby-openssl', :platforms => :jruby
+gem 'rake'
+gem 'yard'
group :development do
gem 'kramdown'
gem 'pry'
gem 'pry-rescue'
- gem 'yard'
platforms :ruby_19, :ruby_20 do
gem 'pry-debugger'
gem 'pry-stack_explorer'
end
end
group :test do
+ gem 'backports'
gem 'coveralls', :require => false
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
gem 'rspec', '>= 2.14'
gem 'rubocop', '>= 0.16', :platforms => [:ruby_19, :ruby_20, :ruby_21]
gem 'simplecov', :require => false
gem 'webmock'
+ gem 'yardstick'
end
platforms :rbx do
View
@@ -6,6 +6,15 @@ RSpec::Core::RakeTask.new(:spec)
task :test => :spec
+begin
+ require 'rubocop/rake_task'
+ Rubocop::RakeTask.new
+rescue LoadError
+ task :rubocop do
+ $stderr.puts 'Rubocop is disabled'
+ end
+end
+
require 'yard'
namespace :doc do
YARD::Rake::YardocTask.new do |task|
@@ -14,13 +23,14 @@ namespace :doc do
end
end
-begin
- require 'rubocop/rake_task'
- Rubocop::RakeTask.new
-rescue LoadError
- task :rubocop do
- $stderr.puts 'Rubocop is disabled'
- end
+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 = 60.4
end
-task :default => [:spec, :rubocop]
+task :default => [:spec, :rubocop, :verify_measurements]

0 comments on commit c46d1d7

Please sign in to comment.