forked from christiangda/puppet-powerdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
67 lines (55 loc) · 1.46 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
require 'rubygems'
require 'rspec/core/rake_task'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'
require 'metadata-json-lint/rake_task'
require 'rubocop/rake_task'
begin
require 'puppet_blacksmith/rake_tasks'
Blacksmith::RakeTask.new do |t|
t.tag_pattern = 'v%s' # Use a custom pattern with git tag. %s is replaced with the version number.
t.build = false # do not build the module nor push it to the Forge, just do the tagging [:clean, :tag, :bump_commit]
end
rescue LoadError
puts 'ignoring group :development'
end
begin
require 'beaker/tasks/quick_start'
rescue LoadError
puts 'ignoring group :acceptance'
end
exclude_paths = [
'pkg/**/*',
'vendor/**/*',
'.vendor/**/*',
'spec/**/*'
]
log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}'
PuppetLint::RakeTask.new(:lint) do |config|
config.disable_checks = ['disable_80chars']
config.fail_on_warnings = true
config.with_context = true
config.ignore_paths = exclude_paths
config.log_format = log_format
end
RSpec::Core::RakeTask.new(:spec_verbose) do |t|
t.pattern = 'spec/{classes,defines,lib,reports}/**/*_spec.rb'
t.rspec_opts = [
'--format documentation',
'--color'
]
end
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
end
RuboCop::RakeTask.new
task test: [
:rubocop,
:metadata_lint,
:syntax,
:lint,
:validate,
:spec
]
# task default: test: