-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
43 lines (34 loc) · 973 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
39
40
41
42
43
# coding: utf-8
require 'bundler/gem_tasks'
require 'cucumber'
require 'cucumber/rake/task'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = 'features --format pretty'
end
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.ruby_opts = %w(-w)
end
RuboCop::RakeTask.new
begin
require 'yard'
namespace :doc do
desc 'List all undocumented methods and classes'
task :undocumented do
command = 'yard --list --query '
command << '"object.docstring.blank? && '
command << '!(object.type == :method && object.is_alias?)"'
sh command
end
end
desc 'Generate documentation'
task(:doc) { sh 'yard' }
desc 'Generate documentation incrementally'
task(:redoc) { sh 'yard -c' }
rescue LoadError
$stderr.puts 'YARD cannot be loaded. Documentation generation is disabled.'
end
desc 'Runs all tests'
task test: [:features, :spec, :rubocop]
task default: :test