Add the prosody module
[mirror/dsa-puppet.git] / 3rdparty / modules / prosody / Rakefile
1 require 'puppetlabs_spec_helper/rake_tasks'
2 require 'puppet-lint/tasks/puppet-lint'
3
4 PuppetLint.configuration.ignore_paths = ['spec/**/*.pp', 'tests/**/*.pp', 'pkg/**/*.pp', 'vendor/**/*.pp']
5 PuppetLint.configuration.log_format = '%{path}:%{line}:%{KIND}: %{message}'
6
7 desc 'Validate manifests, templates, and ruby files'
8 task :validate do
9   Dir['manifests/**/*.pp'].each do |manifest|
10     sh "puppet parser validate --noop #{manifest}"
11   end
12   Dir['spec/**/*.rb', 'lib/**/*.rb'].each do |ruby_file|
13     sh "ruby -c #{ruby_file}" unless ruby_file =~ %r{/spec\/fixtures/}
14   end
15   Dir['templates/**/*.erb'].each do |template|
16     sh "erb -P -x -T '-' #{template} | ruby -c"
17   end
18 end
19
20 # blacksmith is broken with ruby 1.8.7
21 if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.8.7')
22   # blacksmith isn't always present, e.g. on Travis with --without development
23   begin
24     require 'puppet_blacksmith/rake_tasks'
25     Blacksmith::RakeTask.new do |t|
26       t.tag_pattern = '%s'
27     end
28   rescue LoadError => e
29     warn(e)
30   end
31 end