No commit activity in last 3 years
No release in over 3 years
Inspire's shared style guides for Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 0.58
 Project Readme

Inspire's Ruby Style

CircleCI branch

This gem packages Inspire's Rubocop configuration so that it can easily be used in multiple projects. Projects can inherit the global configuration, and easily add or overwrite rules as necessary.

The gem additionally declares Rubocop as a dependency. Since different versions of Rubocop have different default rules, it is important to run the same version in all projects to achieve the same Ruby style. Nonetheless, projects can opt-in to newer Rubocop versions by adding Rubocop as a dependency in their Gemfile with the newer version.

Installation

Add this line to your application's Gemfile:

gem "inspire-ruby-style", github: "inspirenl/inspire-ruby-style", tag: "v4"

And then execute:

$ bundle

Or install it yourself as:

$ gem install inspire-ruby-style

Usage

After installing the gem, create a .rubocop.yml file in the project root with the following contents:

inherit_gem:
  inspire-ruby-style:
    - default.yml

Individual rules can be overwritten for each project as needed. For example, it might make sense to disable the Rails rules for gems:

Rails:
  Enabled: false

Releases

This gem does not follow SemVer, since any change to the style guide must be considered a breaking change. When making any changes to the style guide, increase the version number in the gemspec.

Document all changes in the CHANGELOG, so that it is easy to check if specific rules need to be overwritten in a projec.t When changes to the guide are merged into master, create a new release on GitHub and tag it with the new version number.

License

The gem is available as open source under the terms of the MIT License.