Skip to content

Commit

Permalink
Rakefile clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
sr committed Apr 6, 2009
1 parent 5c63df1 commit 5c17229
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions Rakefile
@@ -1,5 +1,4 @@
require "rake/testtask"
require "rake/clean"

def spec
@spec ||= begin
Expand All @@ -19,30 +18,27 @@ 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"
MG.new("integrity.gemspec")
rescue LoadError
end

begin
require "metric_fu"

MG.new("integrity.gemspec")
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)
Expand All @@ -52,10 +48,10 @@ task :ci do
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

0 comments on commit 5c17229

Please sign in to comment.