Skip to content

Commit

Permalink
README updates, implement simplecov, update contributing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
splittingred committed Nov 26, 2018
1 parent 72d4f97 commit c1bd40a
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 5 deletions.
21 changes: 21 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
engines:
duplication:
enabled: true
config:
languages:
- ruby
fixme:
enabled: true
rubocop:
enabled: true
ratings:
paths:
- "**.rb"
- "bin/*"
exclude_paths:
- "*.md"
- doc/**/*
- gruf.gemspec
- Rakefile
- spec/**/*
1 change: 1 addition & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yardoc 'lib/gruf/**/*.rb' -m markdown --no-private
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ Changelog for the gruf-rspec gem.

### Pending release



### 0.1.0

* Initial release
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
First ensure that your feature isn't already being developed or considered (see open PRs and issues).
If it is, please consider contributing to those initiatives.

For new features, consider whether a new plugin or hook is a more beneficial solution. We'd like to keep
gruf light and minimal, and delegate adaptive functionality out into separate plugins.
For new features, consider whether an extending gem is a more beneficial solution. We'd like to keep
gruf-rspec light and minimal, and delegate adaptive functionality out into separate plugins.

All PRs require test coverage to be accepted when applicable.

Expand All @@ -22,9 +22,9 @@ instead.**

## Other Ways to Contribute

* Consider contributing to gruf documentation on the wiki, reporting bugs, contributing to test coverage,
* Consider contributing to gruf-rspec documentation on the wiki, reporting bugs, contributing to test coverage,
or helping spread the word about gruf.

* Contribute directly to gRPC! This helps gruf and all other initiatives.

Thank you again for your interest in contributing to gruf!
Thank you again for your interest in contributing to gruf-rspec!
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gruf-rspec

[![Build Status](https://travis-ci.com/bigcommerce/gruf-rspec.svg?token=D3Cc4LCF9BgpUx4dpPpv&branch=master)](https://travis-ci.com/bigcommerce/gruf-rspec)
[![Build Status](https://travis-ci.com/bigcommerce/gruf-rspec.svg?token=D3Cc4LCF9BgpUx4dpPpv&branch=master)](https://travis-ci.com/bigcommerce/gruf-rspec) [![Gem Version](https://badge.fury.io/rb/gruf-rspec.svg)](https://badge.fury.io/rb/gruf-rspec) [![Documentation](https://inch-ci.org/github/bigcommerce/gruf-rspec.svg?branch=master)](https://inch-ci.org/github/bigcommerce/gruf-rspec?branch=master)

Assistance helpers and custom type for easy testing [Gruf](https://github.com/bigcommerce/gruf) controllers with
[RSpec](https://github.com/rspec/rspec).
Expand Down
32 changes: 32 additions & 0 deletions spec/simplecov_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding: utf-8
# Copyright (c) 2017-present, BigCommerce Pty. Ltd. All rights reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
require 'simplecov'
require 'fileutils'

if File.directory?('./coverage/')
coverage_path = File.realpath('./coverage/')
FileUtils.rm_rf(coverage_path)
end

SimpleCov.command_name 'Unit Tests'
SimpleCov.minimum_coverage 70
SimpleCov.start do
add_filter '/bin/'
add_filter '/coverage/'
add_filter '/spec/'
add_filter '/vendor/'
end
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'bundler/setup'
require_relative 'simplecov_helper'
require 'grpc'
require 'gruf'
require 'gruf/rspec'
Expand Down

0 comments on commit c1bd40a

Please sign in to comment.