From 66606a7e82d7d12f57b176fa1f0141d9a5ddd2ab Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Thu, 12 Sep 2013 21:09:22 +0200 Subject: [PATCH] enable coveralls on Travis-CI --- .travis.yml | 1 + Rakefile | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7e970a6d..15a8b56f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: ruby before_install: - gem install bundler +env: COVERAGE=true rvm: - 2.0.0 - 1.9.3 diff --git a/Rakefile b/Rakefile index 2f973cda..dec33c44 100644 --- a/Rakefile +++ b/Rakefile @@ -84,7 +84,14 @@ end # ############################################################################# -task :default => [:test, :features] +if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true" && ENV["TRAVIS"] == "true" + require 'coveralls/rake/task' + Coveralls::RakeTask.new + + task :default => [:test, :features, 'coveralls:push'] +else + task :default => [:test, :features] +end require 'rake/testtask' Rake::TestTask.new(:test) do |test|