Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Heroku button #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.5
2.2.4
8 changes: 7 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GEM
daemons (1.2.2)
dalli (2.7.4)
docile (1.1.5)
eventmachine (1.0.7)
eventmachine (1.2.0.1)
json (1.8.2)
multi_json (1.11.0)
rack (1.6.0)
Expand Down Expand Up @@ -43,3 +43,9 @@ DEPENDENCIES
rollbar
sinatra
thin

RUBY VERSION
ruby 2.2.5p319

BUNDLED WITH
1.13.6
11 changes: 11 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Use [codeclimate batch](https://github.com/grosser/codeclimate_batch)

## Manual usage

Alternatively to using the hosted version from codeclimate_batch, you can host it yourself [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

```Ruby
# only do when running on master branch ... see codeclimate_batch for details
ENV["TO_FILE"] = "1"
Expand All @@ -32,6 +34,15 @@ curl -X POST --data-binary @report.json https://cc-amend.herokuapp.com/amend/som
# => sent 4 reports
```

You can send reports from [Travis](https://travis-ci.org/) manually. This relies on the repository you're reporting from using `gem 'codeclimate-test-reporter', '~> 1.0.2'` — add this to your `.travis.yml` file:

```
after_script:
# Change the `count` parameter to match the number of test suites you're sending

- curl -X POST --data-binary @coverage/.resultset.json https://<<YOUR APP>>.herokuapp.com/amend/<<REPOSITORY NAME>>-$TRAVIS_BUILD_NUMBER?count=4
```

Author
======
[Michael Grosser](http://grosser.it)<br/>
Expand Down
13 changes: 13 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "cc-amend",
"description": "Compile batch results for codeclimate test coverage",
"repository": "https://github.com/grosser/cc-amend",
"keywords": ["codeclimate", "codeclimate_batch", "travis"],
"addons": [
"memcachier:dev"
],
"env": {
"CODECLIMATE_REPO_TOKEN": "XXXXXX",
"ROLLBAR": "Rollbar key"
}
}