From 689858746c89917b6b877ecf97788f2bf68838be Mon Sep 17 00:00:00 2001 From: tbpgr Date: Mon, 9 Jun 2014 22:09:05 +0900 Subject: [PATCH] add coveralls settings --- .coveralls.yml | 1 + Gemfile | 3 +++ README.md | 1 + Rakefile | 4 ++-- spec/spec_helper.rb | 11 ++++++++++- 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..9160059 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +service_name: travis-ci diff --git a/Gemfile b/Gemfile index 49531ab..2b0cded 100644 --- a/Gemfile +++ b/Gemfile @@ -7,3 +7,6 @@ gem "simplecov", "~> 0.8.2" gem "activesupport", "~> 4.0.1" gem "activemodel", "~> 4.0.2" gem "tudu", "~> 0.0.4" +group :test do + gem 'coveralls', require: false +end diff --git a/README.md b/README.md index 5c566ba..d803043 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Kosi [![Build Status](https://travis-ci.org/tbpgr/kosi.png?branch=master)](https://travis-ci.org/tbpgr/kosi) +[![Coverage Status](https://coveralls.io/repos/tbpgr/kosi/badge.png)](https://coveralls.io/r/tbpgr/kosi) [![Code Climate](https://codeclimate.com/github/tbpgr/kosi.png)](https://codeclimate.com/github/tbpgr/kosi) ターミナルアプリケーション用表フォーマットサポートツール。格子。 diff --git a/Rakefile b/Rakefile index 4f7db0c..2493399 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ -require "bundler/gem_tasks" +require 'bundler/gem_tasks' require 'rspec/core' require 'rspec/core/rake_task' -task :default => [:spec] +task default: [:spec] RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = 'spec/**/*_spec.rb' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8630ebd..1cbad6f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,14 @@ +# encoding: utf-8 require 'simplecov' -SimpleCov.start +require 'coveralls' +Coveralls.wear! +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter +] +SimpleCov.start do + add_filter '/spec/' +end RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true