0.0
Low commit activity in last 3 years
No release in over a year
Style guide configurations for Ruby projects, Rails applications, and Gems
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

zfletch-style

Shared style configurations. Forked from the (now deprecated) gnar-style.

Installation

Add this line to your application's Gemfile:

group :development, :test do
  gem 'zfletch-style'
end

And then execute:

bundle

Or install it yourself as:

gem install zfletch-style

(See project at rubygems.org)

Usage

This Gem includes Rubocop, and it's not necessary to separately include Rubocop directly in your application's dependencies.

Inheriting from the Gem

Create a .rubocop.yml with the following configuration:

inherit_gem:
  zfletch-style:
    # Choose from one of these three
    - rubocop/rubocop.yml # if the pure Ruby style is all that's needed
    - rubocop/rubocop_gem.yml # if the application is a Gem
    - rubocop/rubocop_rails.yml # if the application is a Rails project

To check your application against these style configurations:

$ bundle exec rubocop

Overriding Styles

Example:

# In your app's .rubocop.yml
inherit_gem:
  zfletch-style:
    - "rubocop/rubocop.yml"

Metrics/BlockLength:
  Exclude:
    - specific_file.rb

Note that if you add in a local style exception in your own application after inheriting from zfletch-style, that will completely override zfletch-style's defaults.