Rakefile in integrity-0.1.9.2 vs Rakefile in integrity-0.1.9.3
- old
+ new
@@ -1,7 +1,6 @@
require "rake/testtask"
-require "rake/clean"
def spec
@spec ||= begin
require "rubygems/specification"
eval(File.read("integrity.gemspec"))
@@ -9,71 +8,50 @@
end
desc "Default: run all tests"
task :default => :test
-desc "Install Integrity dependencies"
-task :setup do
- puts "NOTE: assuming you have gems.github.com in your gem sources"
-
- system "gem install " +
- spec.dependencies.select { |dep| dep.type == :runtime }.
- collect(&:name).join(" ")
-end
-
desc "Launch Integrity real quick"
task :launch do
ruby "bin/integrity launch"
end
desc "Run tests"
task :test => %w(test:units test:acceptance)
namespace :test do
+ desc "Run unit tests"
Rake::TestTask.new(:units) do |t|
t.test_files = FileList["test/unit/*_test.rb"]
end
+ desc "Run acceptance tests"
Rake::TestTask.new(:acceptance) do |t|
t.test_files = FileList["test/acceptance/*_test.rb"]
end
-
- desc "Install tests dependencies"
- task :setup do
- puts "NOTE: assuming you have gems.github.com in your gem sources"
-
- system "gem install " +
- spec.dependencies.select { |dep| dep.type == :development }.
- collect(&:name).join(" ")
- end
end
begin
require "mg"
+ require "metric_fu"
+
MG.new("integrity.gemspec")
rescue LoadError
end
-begin
- require "metric_fu"
-rescue LoadError
-end
-
desc "Special task for running tests on <http://builder.integrityapp.com>"
task :ci do
- sh "git submodule update --init"
-
Rake::Task["test"].invoke
metrics = %w(flay flog:all reek roodi saikuro)
metrics.each { |m| Rake::Task["metrics:#{m}"].invoke }
rm_rf "/var/www/integrity-metrics"
mv "tmp/metric_fu", "/var/www/integrity-metrics"
File.open("/var/www/integrity-metrics/index.html", "w") { |f|
- f << "<ul>"
+ f.puts "<ul>"
metrics.map { |m| m.split(":").first }.each { |m|
- f << %Q(<li><a href="/#{m}">#{m}</a></li>)
+ f.puts %Q(<li><a href="/#{m}">#{m}</a></li>)
}
- f << "</ul>"
+ f.puts "</ul>"
}
end