Rakefile 665 B

12345678910111213141516171819
  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. desc "Validate manifests, templates, and ruby files"
  6. task :validate do
  7. Dir['manifests/**/*.pp'].each do |manifest|
  8. sh "puppet parser validate --noop #{manifest}"
  9. end
  10. Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
  11. sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
  12. end
  13. Dir['templates/**/*.erb'].each do |template|
  14. sh "erb -P -x -T '-' #{template} | ruby -c"
  15. end
  16. end
  17. task :test => [:lint, :syntax , :validate, :spec]