From 699627e708d8f68ce0cdecd99a8157c0f56a75ec Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Thu, 12 Sep 2013 21:19:30 +0200 Subject: [PATCH 1/6] add coveralls to gemfile --- Gemfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 851fabc2..8675f1e7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,6 @@ source 'https://rubygems.org' gemspec + +if RUBY_VERSION > '1.9' + gem 'coveralls', :require => false +end \ No newline at end of file From 5ee41cd3bb646443a444b728660bd736ae3789af Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Thu, 12 Sep 2013 21:04:04 +0200 Subject: [PATCH 2/6] setup coveralls for cucumber --- features/support/env.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/features/support/env.rb b/features/support/env.rb index efe6b1b6..7a77cd0e 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,3 +1,8 @@ +if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true" + require 'coveralls' + Coveralls.wear_merged! +end + require 'fileutils' require 'rr' require 'test/unit' From a12227c07a01ad7200dcbced8610cbbf38627870 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Thu, 12 Sep 2013 21:05:56 +0200 Subject: [PATCH 3/6] setup coveralls for unit tests --- test/helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/helper.rb b/test/helper.rb index 3ee3f2b6..b54bf01f 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,6 +2,9 @@ if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true" require 'simplecov' require 'simplecov-gem-adapter' SimpleCov.start('gem') + + require 'coveralls' + Coveralls.wear_merged! end require 'rubygems' From 66606a7e82d7d12f57b176fa1f0141d9a5ddd2ab Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Thu, 12 Sep 2013 21:09:22 +0200 Subject: [PATCH 4/6] 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| From aa10f8c89e927da0144cdb3fef8dccb209d8cadd Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Thu, 12 Sep 2013 21:10:29 +0200 Subject: [PATCH 5/6] add status badge to README --- README.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/README.markdown b/README.markdown index 9bfe0e80..94080ed1 100644 --- a/README.markdown +++ b/README.markdown @@ -5,6 +5,7 @@ [![Build Status](https://secure.travis-ci.org/mojombo/jekyll.png)](https://travis-ci.org/mojombo/jekyll) [![Code Climate](https://codeclimate.com/github/mojombo/jekyll.png)](https://codeclimate.com/github/mojombo/jekyll) [![Dependency Status](https://gemnasium.com/mojombo/jekyll.png)](https://gemnasium.com/mojombo/jekyll) +[![Coverage Status](https://coveralls.io/repos/mojombo/jekyll/badge.png)](https://coveralls.io/r/mojombo/jekyll) By Tom Preston-Werner, Nick Quaranto, and many awesome contributors! From b26327f20a46e8a4d0dcba6e1c99c0a36d679cb3 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 14 Sep 2013 15:28:41 +0200 Subject: [PATCH 6/6] simplify conditions for coverage reports --- .travis.yml | 1 - Gemfile | 6 +----- Rakefile | 2 +- features/support/env.rb | 2 +- jekyll.gemspec | 1 + test/helper.rb | 2 +- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 15a8b56f..7e970a6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: ruby before_install: - gem install bundler -env: COVERAGE=true rvm: - 2.0.0 - 1.9.3 diff --git a/Gemfile b/Gemfile index 8675f1e7..d9266971 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,2 @@ source 'https://rubygems.org' -gemspec - -if RUBY_VERSION > '1.9' - gem 'coveralls', :require => false -end \ No newline at end of file +gemspec \ No newline at end of file diff --git a/Rakefile b/Rakefile index dec33c44..e649989c 100644 --- a/Rakefile +++ b/Rakefile @@ -84,7 +84,7 @@ end # ############################################################################# -if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true" && ENV["TRAVIS"] == "true" +if RUBY_VERSION > '1.9' && ENV["TRAVIS"] == "true" require 'coveralls/rake/task' Coveralls::RakeTask.new diff --git a/features/support/env.rb b/features/support/env.rb index 7a77cd0e..5c7db508 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,4 +1,4 @@ -if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true" +if RUBY_VERSION > '1.9' require 'coveralls' Coveralls.wear_merged! end diff --git a/jekyll.gemspec b/jekyll.gemspec index 25a83d53..d05cbf15 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -45,6 +45,7 @@ Gem::Specification.new do |s| s.add_development_dependency('launchy', "~> 2.1.2") s.add_development_dependency('simplecov', "~> 0.7") s.add_development_dependency('simplecov-gem-adapter', "~> 1.0.1") + s.add_development_dependency('coveralls', "~> 0.6.9") s.add_development_dependency('activesupport', '~> 3.2.13') # = MANIFEST = diff --git a/test/helper.rb b/test/helper.rb index b54bf01f..5eb41938 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,4 +1,4 @@ -if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true" +if RUBY_VERSION > '1.9' require 'simplecov' require 'simplecov-gem-adapter' SimpleCov.start('gem')