From 0fb092ebf39c7e5b693e555b20abbad0712b206e Mon Sep 17 00:00:00 2001 From: Ilya Bylich Date: Fri, 20 Nov 2015 16:24:55 +0300 Subject: [PATCH] Added simplecov/coveralls. --- .coveralls.yml | 2 ++ Gemfile | 1 + README.md | 1 + spec/spec_helper.rb | 10 ++++++++++ 4 files changed, 14 insertions(+) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..b449d49 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,2 @@ +service_name: travis-ci +repo_token: 30YN0G0xYyS1DPQcbM3e41AfNDyr9O2Un diff --git a/Gemfile b/Gemfile index 0f41a38..069612f 100644 --- a/Gemfile +++ b/Gemfile @@ -9,3 +9,4 @@ gem 'pry' gem 'rspec-rails' gem 'exception_manager' gem 'binding_of_caller' +gem 'coveralls', require: false diff --git a/README.md b/README.md index 31bae60..811cdd3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://travis-ci.org/iliabylich/binding_dumper.svg?branch=master)](https://travis-ci.org/iliabylich/binding_dumper) [![Code Climate](https://codeclimate.com/github/iliabylich/binding_dumper/badges/gpa.svg)](https://codeclimate.com/github/iliabylich/binding_dumper) +[![Coverage Status](https://coveralls.io/repos/iliabylich/binding_dumper/badge.svg?branch=master&service=github)](https://coveralls.io/github/iliabylich/binding_dumper?branch=master) [![Inline docs](http://inch-ci.org/github/iliabylich/binding_dumper.svg?branch=master)](http://inch-ci.org/github/iliabylich/binding_dumper) A gem for dumping a whole binding and restoring it later. After restoring you can use `pry` to perform delayed debugging. diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 65df456..ce0dfcb 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,13 @@ +if ENV['TRAVIS'] + require 'coveralls' + Coveralls.wear! +else + require 'simplecov' + SimpleCov.start do + add_filter '/spec/support' + end +end + require 'pathname' GEM_ROOT = Pathname.new File.expand_path('../..', __FILE__) $: << GEM_ROOT.join('lib').to_s