README.md in danger-shroud-0.0.2 vs README.md in danger-shroud-0.0.3

- old
+ new

@@ -1,23 +1,52 @@ # danger-shroud -Danger plugin for reporting jacoco coverage reports to Danger. +A danger plugin for enforcing code coverage coverage via a Jacoco coverage reports. +![Shroud Banner Image](images/bannerImage.png) + +## Installation + +Add this line to your application's Gemfile: + +```ruby +gem 'danger-shroud' +``` + ## Usage - Methods and attributes from this plugin are available in - your `Dangerfile` under the `shroud` namespace. +Shroud depends on having a Jacoco coverage report generated for your project. For Android projects, [jacoco-android-gradle-plugin](https://github.com/arturdm/jacoco-android-gradle-plugin) works well. +Running shroud with default values: + +```ruby +# Report coverage of modified files, fail if either total +# project coverage or any modified file's coverage is under 90% +shroud.report 'path/to/jacoco/report.xml' +``` + +Running shroud with custom coverage thresholds: + +```ruby +# Report coverage of modified files, fail if total project coverage is under 80%, +# or if any modified file's coverage is under 95% +shroud.report 'path/to/jacoco/report.xml', 80, 95 +``` + +Warn on builds instead of fail: + +```ruby +# Report coverage of modified files the same as the above example, except the +# builds will only warn instead of fail if below thresholds +shroud.report 'path/to/jacoco/report.xml', 80, 95, false +``` + + + + ## Development 1. Clone this repo 2. Run `bundle install` to setup dependencies. 3. Run `bundle exec rake spec` to run the tests. - -## TODO - -- [ ] Write real README -- [ ] Add paramater for failing project threshold -- [ ] Add paramater for failing modified file threshold -- [ ] Add shroud to bridge -- [ ] Write tests -- [ ] Make public, released as a regular ol' gem +4. Use `bundle exec guard` to automatically have tests run as you make changes. +5. Make your changes. \ No newline at end of file