Merge branch 'master' into HEAD
[puppet_apt.git] / Rakefile
1 require 'puppetlabs_spec_helper/rake_tasks'
2 require 'puppet-lint/tasks/puppet-lint'
3 PuppetLint.configuration.send('disable_80chars')
4 PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
5
6 desc "Validate manifests, templates, and ruby files"
7 task :validate do
8   Dir['manifests/**/*.pp'].each do |manifest|
9     sh "puppet parser validate --noop #{manifest}"
10   end
11   Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
12     sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
13   end
14   Dir['templates/**/*.erb'].each do |template|
15     sh "erb -P -x -T '-' #{template} | ruby -c"
16   end
17 end
18
19 task :test => [:lint, :syntax , :validate, :spec]