Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (46 sloc) 1.247 kb
require "rake/testtask"
def spec
@spec ||= begin
require "rubygems/specification"
eval(File.read("integrity.gemspec"))
end
end
desc "Default: run all tests"
task :default => :test
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
end
begin
require "mg"
require "metric_fu"
MG.new("integrity.gemspec")
rescue LoadError
end
desc "Special task for running tests on <http://builder.integrityapp.com>"
task :ci do
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.puts "<ul>"
metrics.map { |m| m.split(":").first }.each { |m|
f.puts %Q(<li><a href="/#{m}">#{m}</a></li>)
}
f.puts "</ul>"
}
end
Jump to Line
Something went wrong with that request. Please try again.