[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 51bcebe38cab6088c901f1006339bbe40a36d161
Rein Henrichs
reinh at reinh.com
Wed Aug 18 05:55:55 UTC 2010
The following commit has been merged in the upstream branch:
commit ce7bd9fb322d89b73aca3b8b652764c5ed3188c3
Author: Rein Henrichs <reinh at reinh.com>
Date: Tue Aug 3 10:42:49 2010 -0700
Refactor rakefile to use spec.ops, separate rcov task
diff --git a/Rakefile b/Rakefile
index 67d4c90..51b4d13 100644
--- a/Rakefile
+++ b/Rakefile
@@ -3,6 +3,13 @@
$: << File.expand_path('lib')
$LOAD_PATH << File.join(File.dirname(__FILE__), 'tasks')
+require 'spec'
+require 'spec/rake/spectask'
+begin
+ require 'rcov'
+rescue LoadError
+end
+
Dir['tasks/**/*.rake'].each { |t| load t }
require 'facter.rb'
@@ -51,21 +58,14 @@ task :default do
sh %{rake -T}
end
-desc "Run the specs under spec/"
-task :spec do
- require 'spec'
- require 'spec/rake/spectask'
- begin
- require 'rcov'
- rescue LoadError
- end
+Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_files = FileList['spec/**/*.rb']
+end
- Spec::Rake::SpecTask.new do |t|
- t.spec_opts = ['--format','s', '--loadby','mtime']
- t.spec_files = FileList['spec/**/*.rb']
- if defined?(Rcov)
- t.rcov = true
- t.rcov_opts = ['--exclude', 'spec/*,test/*,results/*,/usr/lib/*,/usr/local/lib/*']
- end
- end
+Spec::Rake::SpecTask.new('spec:rcov') do |t|
+ t.spec_files = FileList['spec/**/*.rb']
+ if defined?(Rcov)
+ t.rcov = true
+ t.rcov_opts = ['--exclude', 'spec/*,test/*,results/*,/usr/lib/*,/usr/local/lib/*,gems/*']
+ end
end
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list