-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathRakefile
38 lines (32 loc) · 818 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
33
34
35
36
37
38
#!/usr/bin/env ruby
require 'bundler/gem_tasks'
require 'rake/clean'
require 'rake/testtask'
require 'yard'
begin
Bundler.setup :default, :development
rescue Bundler::BundlerError => error
$stderr.puts error.message
$stderr.puts 'Run `bundle install` to install missing gems.'
exit error.status_code
end
Bundler::GemHelper.install_tasks
desc 'Run all of the tests'
Rake::TestTask.new do |config|
config.libs << 'test'
config.pattern = 'test/**/*_test*'
end
desc 'Generate all of the docs'
YARD::Rake::YardocTask.new do |config|
config.files = Dir['lib/**/*.rb']
end
begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new
rescue LoadError
task :rubocop do
$stderr.puts 'RuboCop is disabled'
end
end
desc 'Default: run tests, and generate docs'
task :default => [:test, :yard, :rubocop]