diff --git a/Gemfile b/Gemfile index 28f9df7..695715d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,12 @@ -source :rubygems - -group :development, :test do - gem 'puppetlabs_spec_helper', :require => false -end +source 'https://rubygems.org' if puppetversion = ENV['PUPPET_GEM_VERSION'] gem 'puppet', puppetversion, :require => false else gem 'puppet', :require => false end + +gem 'rake', :require => false +gem 'puppetlabs_spec_helper', :require => false +gem 'puppet-lint', :require => false +gem 'puppet-syntax', :require => false diff --git a/Rakefile b/Rakefile index 1ef5284..05dace7 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,19 @@ -require 'rubygems' require 'puppetlabs_spec_helper/rake_tasks' -require 'rake/clean' +require 'puppet-syntax/tasks/puppet-syntax' +require 'puppet-lint/tasks/puppet-lint' -CLEAN.include('spec/fixtures/', 'spec/reports') +PuppetSyntax.exclude_paths = ['spec/fixtures/**/*'] +#PuppetLint.configuration.send('disable_class_inherits_from_params_class') +#PuppetLint.configuration.send('disable_variable_scope') +PuppetLint.configuration.ignore_paths = [ + 'pkg/**/*.pp', + 'spec/**/*.pp', + 'tests/**/*.pp', +] -task :spec => [:spec_prep] +task :default => [ + :syntax, + :lint, + :spec, +] -desc "Run all tasks (spec)" -task :all => [ :spec ] diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index dc7e9f4..2c6f566 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,2 +1 @@ -require 'rubygems' require 'puppetlabs_spec_helper/module_spec_helper'