forked from wikimedia/mediawiki-vagrant
/
Rakefile
40 lines (34 loc) · 1.04 KB
/
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
# Rakefile
# --------
#
# You must use 'bundler install' first
#
# pre-flight
require 'bundler/setup'
# tasks dependencies
require 'cucumber'
require 'cucumber/rake/task'
require 'puppet-lint/tasks/puppet-lint'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'yard'
# Work around bug in puppet-lint configuration
# https://github.com/rodjek/puppet-lint/issues/331
Rake::Task[:lint].clear
PuppetLint::RakeTask.new(:lint) do |config|
gitmodules = File.expand_path('../.gitmodules', __FILE__)
config.ignore_paths = IO.readlines(gitmodules).grep(/\s*path\s*=\s*(\S+)/) {
"#{Regexp.last_match(1)}/**/*.pp"
}
config.ignore_paths += ['tmp/**/*.pp']
config.log_format = '%{path}:%{linenumber} %{KIND}: %{message}'
end
Cucumber::Rake::Task.new(:cucumber)
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new(:rubocop)
YARD::Rake::YardocTask.new(:yard)
task default: [:test]
desc 'Run all build/tests commands (CI entry point)'
task test: [:spec, :rubocop, :cucumber, :lint, :doc]
desc 'Generate all documentations'
task doc: [:yard]