Rantfile in rant-0.3.6 vs Rantfile in rant-0.3.8
- old
+ new
@@ -1,9 +1,9 @@
# Rantfile for Rant :)
-import %w(rubytest rubydoc rubypackage autoclean)
+import %w(rubytest rubydoc rubypackage autoclean win32/rubycmdwrapper)
task :default => :test
lib_files = sys["lib/**/*.rb"]
dist_files = sys["{bin,lib,test,doc}/**/*"].shun("html", "coverage") +
@@ -68,11 +68,11 @@
desc "Run all tests and generate coverage with rcov."
task :cov do
lp = File.expand_path "lib"
sys.cd "test" do
- sys %W(rcov -xts_*,tc_*,test_* -I#{lp} ts_all.rb)
+ sys %W(rcov -xtutil.rb,*.t,ts_*,tc_*,test_* -I#{lp} ts_all.rb)
end
end
desc "Test project with subdirs."
gen RubyTest, :tsubdirs do |t|
@@ -90,10 +90,16 @@
gen RubyTest, :timport do |t|
t.libs << "test"
t.test_files = sys["test/import/**/test_*.rb"]
end
+desc "Test C support."
+gen RubyTest, :tc do |t|
+ t.libs << "test"
+ t.test_files = sys["test/c/test_*.rb", "test/import/c/**/test_*.rb"]
+end
+
desc "Run all tests."
gen RubyTest, :tall do |g|
g.libs << "test"
g.test_files = sys["test/**/test_*.rb"]
end
@@ -126,24 +132,14 @@
end).invoke
}
end
desc "Install Rant."
-install = task :install do
+task :install do
sys.ruby "setup.rb"
end
if Env.on_windows?
- cmd_files = bin_files.find_all { |f| f !~ /\.cmd$/}
- cmd_files.map! { |f| "#{f}.cmd" }
- cmd_files.zip(bin_files).each { |cmd, bin|
- file cmd do |t|
- File.open(t.name, "w") { |f|
- i_bin = File.join(Env::RUBY_BINDIR, File.basename(bin))
- f.puts "@#{sys.sp Env::RUBY} #{sys.sp i_bin} %*"
- }
- end
- install << cmd
- }
+ enhance :install => (gen Win32::RubyCmdWrapper, sys["bin/*"])
end
# vim:ft=ruby: