diff --git a/Gemfile b/Gemfile index e38bd1f1..764c8d16 100644 --- a/Gemfile +++ b/Gemfile @@ -9,6 +9,7 @@ group :development, :test do gem 'rspec' gem 'json' gem 'webmock' + gem 'r10k' end if puppetversion = ENV['PUPPET_GEM_VERSION'] diff --git a/Rakefile b/Rakefile index dbbddfec..4afd997d 100644 --- a/Rakefile +++ b/Rakefile @@ -28,14 +28,20 @@ task(:default).clear task :default => :test desc 'Run syntax, lint and spec tests' -task :test => [:syntax,:lint,:spec] +task :test => [:syntax,:lint,:validate_puppetfile,:spec] desc 'Run syntax, lint and spec tests (without fixture purge = train/airplane)' -task :test_keep => [:syntax,:lint,:spec_prep,:spec_standalone] +task :test_keep => [:syntax,:lint,:validate_puppetfile,:spec_prep,:spec_standalone] if ENV['COV'] desc 'Run syntax, lint, spec tests and coverage' - task :cov => [:syntax,:lint,:spec_prep,:spec_standalone] + task :cov => [:syntax,:lint,:validate_puppetfile,:spec_prep,:spec_standalone] +end + +desc "Validate the Puppetfile syntax" +task :validate_puppetfile do + $stderr.puts "---> syntax:puppetfile" + sh "r10k puppetfile check" end namespace :module do