altmetric / house_style Goto Github PK
View Code? Open in Web Editor NEWA shared house style for Ruby projects
Home Page: https://rubygems.org/gems/house_style
License: MIT License
A shared house style for Ruby projects
Home Page: https://rubygems.org/gems/house_style
License: MIT License
It is possible for Rails apps to not have a db
folder (e.g., if the app consumes only JSON API requests for display and has no DB persistence of its own).
In such situations, the Rails generator should not include the database-specific YAML file template.
Currently, running rails generate house_style:install
creates new .rubocop.yml
files with the relevant inheritance commands to set up the use of house_style
.
However, when adding the gem to existing projects, we should really accommodate existing Rubocop settings. While we want all projects to be written to a consistent style, that's not always practical โ hence why the Rubocop documentation provides an example workflow of creating a .rubocop_todo.yml
file to accommodate existing style violations.
In the house_style:install
process, we should maybe perform the same process for each .rubocop.yml
file that we are creating:
.rubocop.yml
file exists in that location, insert a inherit_from:
block at the top of the file so that the house_style
defaults are handled first, and are then overridden by existing rules.This is consistent with the way in which house_style
is intended to be used โ a centralised "ideal" set of rules, and local overrides that explicitly set out where a project is currently diverging from those.
Implementing house_style
on an internal project, I noticed that the following line triggered a warning in our configured Style/BlockDelimiters
cop
specify { should_not render_template(:show) }
Changing to it
did not trigger the warning:
it { should_not render_template(:show) }
it
is in the cop's IgnoredMethods
collection, along with lambda
and proc
. specify
should be treated the same.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.