-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
32 lines (25 loc) · 854 Bytes
/
Rakefile
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
31
32
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'yard'
require 'tax_generator'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.rspec_opts = ['--backtrace '] if ENV['DEBUG']
end
YARD::Config.options[:load_plugins] = true
YARD::Config.load_plugins
# dirty hack for YardocTask
::Rake.application.class.class_eval do
alias_method :last_comment, :last_description
end
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'spec/**/*_spec.rb'] # optional
t.options = ['--any', '--extra', '--opts', '--markup-provider=redcarpet', '--markup=markdown', '--debug'] # optional
t.stats_options = ['--list-undoc'] # optional
end
desc 'Default: run the unit tests.'
task default: [:all]
desc 'Test the plugin under all supported Rails versions.'
task :all do |_t|
exec('bundle exec rake spec')
end