2013-11-26 15:53:45 -05:00
|
|
|
require 'rake/clean'
|
|
|
|
require 'bundler/gem_tasks'
|
|
|
|
require 'rspec/core/rake_task'
|
2014-06-15 13:24:15 -04:00
|
|
|
require File.expand_path('on_what', File.dirname(__FILE__))
|
2011-12-06 14:31:22 -05:00
|
|
|
|
2013-07-28 15:30:47 -04:00
|
|
|
# Default task for `rake` is to run rspec
|
|
|
|
task :default => [:spec]
|
|
|
|
|
|
|
|
# Use default rspec rake task
|
|
|
|
RSpec::Core::RakeTask.new
|
|
|
|
|
|
|
|
# Configure `rake clobber` to delete all generated files
|
2013-11-26 15:53:45 -05:00
|
|
|
CLOBBER.include('pkg', 'doc', 'coverage')
|
2013-07-28 15:30:47 -04:00
|
|
|
|
2014-06-15 13:24:15 -04:00
|
|
|
# To limit needed compatibility with versions of dependencies, only configure
|
2016-12-27 15:18:44 -05:00
|
|
|
# yard doc generation when *not* on Travis, JRuby, or < 2.0
|
|
|
|
if !on_travis? && !on_jruby? && !on_less_than_2_0?
|
2014-06-15 13:24:15 -04:00
|
|
|
require 'github/markup'
|
|
|
|
require 'redcarpet'
|
|
|
|
require 'yard'
|
|
|
|
require 'yard/rake/yardoc_task'
|
2012-10-29 16:08:10 -04:00
|
|
|
|
|
|
|
YARD::Rake::YardocTask.new do |t|
|
|
|
|
OTHER_PATHS = %w()
|
|
|
|
t.files = ['lib/**/*.rb', OTHER_PATHS]
|
|
|
|
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md)
|
|
|
|
end
|
2011-12-06 14:31:22 -05:00
|
|
|
end
|