Skip to content

mFind IT rubocop configuration with mfind-rubocop-rspec and rubocop-rails gems

Notifications You must be signed in to change notification settings

mfind-project/rubocop-rspec-rails

Repository files navigation

mfind-rubocop-rspec-rails

Gem Version Build Status

RuboCop rules for mfind projects that use Ruby on Rails. Includes:

If you do not create Ruby on Rails project, use gem mfind-rubocop-rspec instead.

Installation

Add this line to your application's Gemfile:

group :test, :development do
  gem 'mfind-rubocop-rspec-rails'
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-rails'

And then run:

$ bundle install

Usage

Create a .rubocop.yml with the following directives:

inherit_gem:
  mfind-rubocop-rspec-rails:
    - default.yml

Now, run:

$ bundle exec rubocop

Configuration

All configuration goes to default.yml file.

Publish to RubyGems

In order to publish new version of the gem follow the steps:

  1. git hf release start X.Y.Z
  2. bump up version in MfindRuboCopRSpec::VERSION
  3. git commit -am 'UPD version to X.Y.Z'
  4. git hf release finish X.Y.Z
  5. bundle update mfind-rubocop-rspec-rails in projects that use it

The gem push script is set up on CircleCI upon git hf release finish, as per Publishing RubyGems using Circle CI 2.0 article.

About

mFind IT rubocop configuration with mfind-rubocop-rspec and rubocop-rails gems

Resources

Stars

Watchers

Forks

Packages

No packages published