diff options
author | varac <varacanero@zeromail.org> | 2015-12-07 14:31:42 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2015-12-07 14:31:42 +0100 |
commit | e12c5bfd6c9ff5d1dc5e14c227e8c15388ecb042 (patch) | |
tree | cbc48ac53a991425eb2cdd14f725516a00324de5 /Rakefile | |
parent | b6cb0285053a0ffd23082d7e63a87108ca0e3fbd (diff) | |
parent | a70c52c1d4f399c22fa6c71289031350a1da44b5 (diff) |
Merge remote-tracking branch 'shared/master' into leap_master
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..85326bb --- /dev/null +++ b/Rakefile @@ -0,0 +1,19 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] + +desc "Validate manifests, templates, and ruby files" +task :validate do + Dir['manifests/**/*.pp'].each do |manifest| + sh "puppet parser validate --noop #{manifest}" + end + Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| + sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ + end + Dir['templates/**/*.erb'].each do |template| + sh "erb -P -x -T '-' #{template} | ruby -c" + end +end + +task :test => [:lint, :syntax , :validate, :spec] |