-
Notifications
You must be signed in to change notification settings - Fork 11
/
Rakefile
29 lines (25 loc) · 803 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
require 'rspec/core/rake_task'
require 'puppet-lint'
load 'tasks/whitespace.rake'
task :default => ['whitespace:check', :simplelint, :validate, :spec]
task :simplelint do
linter = PuppetLint.new
PuppetLint.configuration.with_filename = true
PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.send("disable_documentation")
Dir['mirebalais-modules/**/*.pp'].each do |pp|
linter.file = pp
linter.run
end
fail if linter.errors?
end
desc 'Validates the syntax of the puppet manifest files'
task :validate do
puts `puppet parser validate #{Dir['**/*.pp'].join(' ')}`
fail unless $?.to_i == 0
end
RSpec::Core::RakeTask.new(:spec) do |spec|
file_list = FileList['spec/**/*_spec.rb']
# file_list.exclude 'spec/whatever/...'
spec.pattern = file_list
end