mfind-rubocop-rspec
RuboCop rules for mfind projects that use RSpec. Includes:
If you create Ruby on Rails project, use gem mfind-rubocop-rspec-rails
instead.
Installation
Add this line to your application's Gemfile:
group :test, :development do
gem 'mfind-rubocop-rspec'
end
Do notice, that you do not need to include other rubocop-*
gems in your
Gemfile, this single one will suffice.
For a Ruby library, add this to your gemspec:
spec.add_development_dependency 'mfind-rubocop-rspec'
And then run:
$ bundle install
Usage
Create a .rubocop.yml
with the following directives:
inherit_gem:
mfind-rubocop-rspec:
- default.yml
Now, run:
$ bundle exec rubocop
Configuration
All configuration goes to default.yml file.
-
rubocop
defaults & Ruby styleguide -
rubocop-rspec
defaults & RSpec styleguide rubocop-performance
defaults
Publish to Rubygems
In order to publish new version of the gem follow the steps:
git hf release start X.Y.Z
- bump up version in
MfindRuboCopRSpec::VERSION
git commit -am 'UPD version to X.Y.Z'
git hf release finish X.Y.Z
-
bundle update mfind-rubocop-rspec
in projects that use it - update
mfind-rubocop-rails
gem inmfind-rubocop-rspec-rails
gem
The gem push
script is set up on CircleCI upon git hf release finish
, as per
Publishing RubyGems using Circle CI 2.0 article.