forked from voxpupuli/puppet-snmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
25 lines (21 loc) · 883 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
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
desc "Run visual spec tests on an existing fixtures directory"
RSpec::Core::RakeTask.new(:spec_standalonev) do |t|
t.rspec_opts = ['--color', '--format documentation']
t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb'
end
# https://github.com/stahnma/puppet-modules/blob/master/common/Rakefile
desc "Check puppet and ERB for syntax errors."
task :validate do
Dir['manifests/**/*.pp'].each do |path|
sh "puppet parser validate --noop #{path}"
end
Dir['templates/**/*.erb'].each do |path|
sh "erb -P -x -T '-' #{path} | ruby -c"
end
end
# Enable puppet-lint for all manifests: rake lint
require 'puppet-lint/tasks/puppet-lint'
#PuppetLint.configuration.send("disable_80chars") # no warnings on lines over 80 chars.
PuppetLint.configuration.ignore_paths = ["spec/fixtures/**/*.pp", "pkg/**/*"]