Sha256: 583e5ba9f41fb4354a6d569f5307524096acf32dd8c0899e3592f0f859770784

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

# ruby-codacy-coverage

Ruby coverage reporter for Codacy https://www.codacy.com

[![Codacy Badge](https://api.codacy.com/project/badge/grade/72a7aaa0e3fd4a8db27607da159d3daa)](https://www.codacy.com/app/Codacy/ruby-codacy-coverage)
[![Codacy Badge](https://api.codacy.com/project/badge/coverage/72a7aaa0e3fd4a8db27607da159d3daa)](https://www.codacy.com/app/Codacy/ruby-codacy-coverage)
[![Build Status](https://circleci.com/gh/codacy/ruby-codacy-coverage.png?style=shield&circle-token=:circle-token)](https://circleci.com/gh/codacy/ruby-codacy-coverage)
[![Gem Version](https://badge.fury.io/rb/codacy-coverage.svg)](https://badge.fury.io/rb/codacy-coverage)

Parses SimpleCov output and submits the result to Codacy

## Setup

Include the gem in your project

```
gem 'codacy-coverage', :require => false
```

In the first line of your spec_helper initialize the reporter:

```
require 'codacy-coverage'

Codacy::Reporter.start
```


#### Configuration

To update Codacy, you will need your project API token. You can find the token in Project -> Settings -> Integrations -> Project API.

Then set it in your terminal, replacing %Project_Token% with your own token:

```
export CODACY_PROJECT_TOKEN=%Project_Token%
```

By default this plugin will not submit results if you run your tests in localhost. If you want to force the submission you can setup the following environment variable:

```
export CODACY_RUN_LOCAL=true
```

#### Running Tests

When you run your tests, the plugin will send the coverage info to Codacy.

For example, run the following commands:

```
gem install bundler
bundle install
```

This will install the required dependencies. Then just run the tests:

```
bundle exec rspec
```

You can now check your coverage results in the Codacy dashboard of your project.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
codacy-coverage-0.2.4 README.md