From c83ffff9493443845c1545240f75d8136c0ecdff Mon Sep 17 00:00:00 2001 From: Nan Liu Date: Tue, 1 May 2012 16:16:10 -0700 Subject: Add support files for initial release. * Update documentation. * Fix puppet-lint 80 char issues. * Add spec tests. * Add modulefile, changelog, rakefile, and license. --- Rakefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Rakefile (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..6f28836 --- /dev/null +++ b/Rakefile @@ -0,0 +1,35 @@ +require 'rubygems' +require 'rake' +require 'rspec/core/rake_task' + +task :default do + system("rake -T") +end + +task :specs => [:spec] + +desc "Run all rspec-puppet tests" +RSpec::Core::RakeTask.new(:spec) do |t| + t.rspec_opts = ['--color'] + # ignores fixtures directory. + t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb' +end + +desc "Build puppet module package" +task :build do + # This will be deprecated once puppet-module is a face. + begin + Gem::Specification.find_by_name('puppet-module') + rescue Gem::LoadError, NoMethodError + require 'puppet/face' + pmod = Puppet::Face['module', :current] + pmod.build('./') + end +end + +desc "Check puppet manifests with puppet-lint" +task :lint do + # This requires pull request: https://github.com/rodjek/puppet-lint/pull/81 + system("puppet-lint manifests") + system("puppet-lint tests") +end -- cgit v1.2.3