From 704a992f117325e7963c0ba2a396468b6860ade8 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sun, 13 Sep 2015 01:45:45 -0700 Subject: [PATCH] use coveralls for travis --- Gemfile | 1 + Gemfile.lock | 11 +++++++++++ tests/environment.rb | 18 ++++++++++++------ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 2cf72485..c13e60c6 100644 --- a/Gemfile +++ b/Gemfile @@ -31,6 +31,7 @@ gem 'io-extra', require: 'io/extra' gem 'rye' gem 'dnsruby' gem 'base32' +gem 'coveralls', require: false platform :mri, :rbx do gem 'magic' # sudo apt-get install file, For OSX: brew install libmagic diff --git a/Gemfile.lock b/Gemfile.lock index 7f7dfeb9..1fec66d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,6 +42,12 @@ GEM coderay (1.1.0) columnize (0.8.9) connection_pool (2.0.0) + coveralls (0.7.1) + multi_json (~> 1.3) + rest-client + simplecov (>= 0.7) + term-ansicolor + thor crack (0.4.2) safe_yaml (~> 1.0.0) dante (0.2.0) @@ -229,11 +235,15 @@ GEM sysinfo (0.8.1) drydock storable + term-ansicolor (1.3.2) + tins (~> 1.0) + thor (0.19.1) thread (0.1.4) thread_safe (0.3.4) tilt (1.4.1) timecop (0.7.4) timers (1.1.0) + tins (1.6.0) treetop (1.4.15) polyglot polyglot (>= 0.3.1) @@ -266,6 +276,7 @@ DEPENDENCIES bcrypt capybara_minitest_spec cocaine + coveralls dav4rack dnsruby erubis diff --git a/tests/environment.rb b/tests/environment.rb index 3247bc9f..89624462 100644 --- a/tests/environment.rb +++ b/tests/environment.rb @@ -1,13 +1,19 @@ ENV['RACK_ENV'] = 'test' raise 'Forget it.' if ENV['RACK_ENV'] == 'production' -require 'simplecov' -SimpleCov.coverage_dir File.join('tests', 'coverage') -SimpleCov.start do - add_filter "/migrations/" -end +if ENV['TRAVIS'] + require 'coveralls' + Coveralls.wear! +else -SimpleCov.command_name 'minitest' + require 'simplecov' + SimpleCov.coverage_dir File.join('tests', 'coverage') + SimpleCov.start do + add_filter "/migrations/" + end + + SimpleCov.command_name 'minitest' +end require 'rack_session_access' require './environment'