diff --git a/.travis.yml b/.travis.yml index ae5be57..29cc6fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: ruby sudo: false cache: bundler script: - - ruby test/test_all.rb + - CODECLIMATE_REPO_TOKEN=40ed7f464af09c892b27adc2cd171c36b24992d8d527428285bc55c46fe2f0e0 ruby test/test_all.rb rvm: - 1.9.3 - 2.0.0 diff --git a/Gemfile b/Gemfile index c7cc8cc..a58c457 100644 --- a/Gemfile +++ b/Gemfile @@ -8,3 +8,7 @@ group :development do gem "minitest" gem "rubygems-tasks" end + +group :test do + gem "codeclimate-test-reporter", require: nil +end diff --git a/Gemfile.lock b/Gemfile.lock index ca29b4d..89f5214 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,14 +6,24 @@ PATH GEM remote: http://rubygems.org/ specs: + codeclimate-test-reporter (0.4.6) + simplecov (>= 0.7.1, < 1.0.0) + docile (1.1.5) minitest (5.6.1) + multi_json (1.11.2) rake (10.4.2) rubygems-tasks (0.2.4) + simplecov (0.9.2) + docile (~> 1.1.0) + multi_json (~> 1.0) + simplecov-html (~> 0.9.0) + simplecov-html (0.9.0) PLATFORMS ruby DEPENDENCIES + codeclimate-test-reporter minitest rake rubygems-tasks diff --git a/README.md b/README.md index 22a7896..c3fb6ad 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +[![Build Status](https://travis-ci.org/salama/salama-object-file.svg?branch=master)](https://travis-ci.org/salama/salama-object-file) +[![Gem Version](https://badge.fury.io/rb/salama-object-file.svg)](http://badge.fury.io/rb/salama-object-file) +[![Code Climate](https://codeclimate.com/github/salama/salama-object-file/badges/gpa.svg)](https://codeclimate.com/github/salama/salama-object-file) +[![Test Coverage](https://codeclimate.com/github/salama/salama-object-file/badges/coverage.svg)](https://codeclimate.com/github/salama/salama-object-file) + ### Reading the code Knowing what's going on while coding salama is not so easy: Hence the need to look at code dumps diff --git a/test/helper.rb b/test/helper.rb index c61cfb8..80aafcc 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,18 +1,9 @@ - -require 'rubygems' -require 'bundler' -begin - Bundler.setup(:default, :development) -rescue Bundler::BundlerError => e - $stderr.puts e.message - $stderr.puts "Run `bundle install` to install missing gems" - exit e.status_code +if ENV['CODECLIMATE_REPO_TOKEN'] + require "codeclimate-test-reporter" + CodeClimate::TestReporter.start end + require "minitest/autorun" - -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'test')) - require 'salama-object-file' module Checker