1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
require 'bundler/gem_tasks'
require 'rake'
require 'rake/clean'
require 'yard'
require 'yard/rake/yardoc_task'
CLEAN << Rake::FileList['doc/**', '.yardoc']
# Yard
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb'] # optional
t.options = ['--title', 'CookieJar, a HTTP Client Cookie Parsing Library',
'--main', 'README.markdown', '--files', 'LICENSE']
end
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new do |t|
t.ruby_opts = %w(-w)
t.pattern = 'spec/**/*_spec.rb'
end
task test: :spec
rescue LoadError
puts 'Warning: unable to load rspec tasks'
end
# Default Rake task is to run all tests
task default: :test
|