aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorNan Liu <nan@puppetlabs.com>2012-05-01 16:16:10 -0700
committerNan Liu <nan@puppetlabs.com>2012-05-01 16:16:10 -0700
commitc83ffff9493443845c1545240f75d8136c0ecdff (patch)
tree2a4f1450709f3559bf2b6cad95c7efe04011161b /Rakefile
parentdf6c470fd39e6e4e92968d414ae9021b4ec67205 (diff)
downloadpuppet-tftp-c83ffff9493443845c1545240f75d8136c0ecdff.tar.gz
puppet-tftp-c83ffff9493443845c1545240f75d8136c0ecdff.tar.bz2
Add support files for initial release.
* Update documentation. * Fix puppet-lint 80 char issues. * Add spec tests. * Add modulefile, changelog, rakefile, and license.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile35
1 files changed, 35 insertions, 0 deletions
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