forked from nesi/puppet-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
24 lines (23 loc) · 850 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'
require 'rspec-system/rake_task'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
desc "Check for puppet and ruby syntax errors."
task :validate do
if ENV['PUPPET_GEM_VERSION'] == '~> 2.6.0'
puppet_parse_command = 'puppet --parseonly --ignoreimport'
else
puppet_parse_command = 'puppet parser validate --noop'
end
Dir['manifests/**/*.pp'].each do |path|
sh "#{puppet_parse_command} #{path}"
end
ruby_parse_command = 'ruby -c'
Dir['spec/**/*.rb'].each do |path|
sh "#{ruby_parse_command} #{path}"
end
end