fix up simplecov, add coveralls

This commit is contained in:
Thomas Reynolds 2013-05-30 13:38:52 -04:00
parent 31f238f881
commit 403d6abd05
5 changed files with 18 additions and 10 deletions

View file

@ -30,6 +30,7 @@ end
# Code Quality # Code Quality
gem "cane", :platforms => [:mri_19, :mri_20], :require => false gem "cane", :platforms => [:mri_19, :mri_20], :require => false
gem 'coveralls', :require => false
# Middleman itself # Middleman itself
gem "middleman-core", :path => "middleman-core" gem "middleman-core", :path => "middleman-core"

View file

@ -60,6 +60,7 @@ Additionally, up-to-date generated code documentation is available on [RubyDoc].
[![Gem Version](https://badge.fury.io/rb/middleman.png)][gem] [![Gem Version](https://badge.fury.io/rb/middleman.png)][gem]
[![Build Status](https://travis-ci.org/middleman/middleman.png)][travis] [![Build Status](https://travis-ci.org/middleman/middleman.png)][travis]
[![Code Coverage](https://coveralls.io/repos/middleman/middleman/badge.png)][coveralls]
[![Dependency Status](https://gemnasium.com/middleman/middleman.png?travis)][gemnasium] [![Dependency Status](https://gemnasium.com/middleman/middleman.png?travis)][gemnasium]
[![Code Quality](https://codeclimate.com/github/middleman/middleman.png)][codeclimate] [![Code Quality](https://codeclimate.com/github/middleman/middleman.png)][codeclimate]
@ -91,6 +92,7 @@ Copyright (c) 2010-2013 Thomas Reynolds. MIT Licensed, see [LICENSE] for details
[middleman]: http://middlemanapp.com [middleman]: http://middlemanapp.com
[gem]: https://rubygems.org/gems/middleman [gem]: https://rubygems.org/gems/middleman
[travis]: http://travis-ci.org/middleman/middleman [travis]: http://travis-ci.org/middleman/middleman
[coveralls]: https://coveralls.io/r/middleman/middleman
[gemnasium]: https://gemnasium.com/middleman/middleman [gemnasium]: https://gemnasium.com/middleman/middleman
[codeclimate]: https://codeclimate.com/github/middleman/middleman [codeclimate]: https://codeclimate.com/github/middleman/middleman
[rubyinstaller]: http://rubyinstaller.org/ [rubyinstaller]: http://rubyinstaller.org/

View file

@ -0,0 +1,6 @@
SimpleCov.start do
add_filter '/features/'
add_filter '/spec/'
add_filter '/vendor'
add_filter '/step_definitions/'
end

View file

@ -1,16 +1,11 @@
ENV["TEST"] = "true" ENV["TEST"] = "true"
ENV["AUTOLOAD_SPROCKETS"] = "false" ENV["AUTOLOAD_SPROCKETS"] = "false"
if ENV["COVERAGE"] && (RUBY_VERSION =~ /1\.9/ || RUBY_VERSION =~ /2\.0/) require 'simplecov'
require 'simplecov' SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/../..'))
SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/../..'))
SimpleCov.start do require 'coveralls'
add_filter '/features/' Coveralls.wear!
add_filter '/spec/'
add_filter '/vendor'
add_filter '/step_definitions/'
end
end
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-core') require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-core')

View file

@ -1 +1,5 @@
require 'simplecov' require 'simplecov'
SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/..'))
require 'coveralls'
Coveralls.wear!