Skip to content

Commit 233aa66

Browse files
committed
adds code coverage w/ Coveralls
- configure coveralls -adds changelog entry
1 parent 51d4ff6 commit 233aa66

File tree

7 files changed

+20
-0
lines changed

7 files changed

+20
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ ToDo.md
4141
spec/params_entity_spec.rb
4242
vendor/bundle/
4343
spec/swagger_v2/x-dummy.rb
44+
coverage/

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
language: ruby
22

33
sudo: false
4+
45
before_install:
56
- gem install bundler
67

8+
after_success:
9+
- coveralls
10+
711
matrix:
812
include:
913
- rvm: 2.4.0

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#### Features
44

55
* [#567](https://github.com/ruby-grape/grape-swagger/pull/567): Issue#566: removes markdown - [@LeFnord](https://github.com/LeFnord).
6+
* [#568](https://github.com/ruby-grape/grape-swagger/pull/568): Adds code coverage w/ coveralls - [@LeFnord](https://github.com/LeFnord).
67

78
* Your contribution here.
89

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ group :development, :test do
2626
gem 'rubocop', '~> 0.40'
2727
end
2828
group :test do
29+
gem 'coveralls', require: false
2930
gem 'grape-entity'
3031
gem 'grape-swagger-entity'
3132
gem 'ruby-grape-danger', '~> 0.1.1', require: false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![Gem Version](https://badge.fury.io/rb/grape-swagger.svg)](http://badge.fury.io/rb/grape-swagger)
22
[![Build Status](https://travis-ci.org/ruby-grape/grape-swagger.svg?branch=master)](https://travis-ci.org/ruby-grape/grape-swagger)
3+
[![Coverage Status](https://coveralls.io/repos/github/ruby-grape/grape-swagger/badge.svg)](https://coveralls.io/github/ruby-grape/grape-swagger)
34
[![Dependency Status](https://gemnasium.com/ruby-grape/grape-swagger.svg)](https://gemnasium.com/ruby-grape/grape-swagger)
45
[![Code Climate](https://codeclimate.com/github/ruby-grape/grape-swagger.svg)](https://codeclimate.com/github/ruby-grape/grape-swagger)
56

coveralls.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
service_name: travis-ci

spec/spec_helper.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
require 'simplecov'
2+
require 'coveralls'
3+
4+
SimpleCov.start do
5+
add_filter 'spec/'
6+
add_filter 'example/'
7+
end
8+
9+
Coveralls.wear!
10+
111
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
212

313
MODEL_PARSER = ENV.key?('MODEL_PARSER') ? ENV['MODEL_PARSER'].to_s.downcase.sub('grape-swagger-', '') : 'mock'
414

515
require 'grape'
616
require 'grape-swagger'
17+
718
Dir[File.join(Dir.getwd, 'spec/support/*.rb')].each { |f| require f }
819
require "grape-swagger/#{MODEL_PARSER}" if MODEL_PARSER != 'mock'
920
require File.join(Dir.getwd, "spec/support/model_parsers/#{MODEL_PARSER}_parser.rb")

0 commit comments

Comments
 (0)