mdsol / dice_bag

DiceBag is a library of rake tasks for configuring web apps in the style of The Twelve-Factor App.
MIT License
19 stars 4 forks source link

Refactoring styles: follow the standard Ruby style guide #87

Closed piao-mdsol closed 6 years ago

piao-mdsol commented 6 years ago

When working on this repo, I noticed there are places that are not following the Ruby style guide. This PR is focused to make the quick wins to fix the style problems around spacing, empty line, comments, etc.

Motivation

Having a clean codebase would encourage developers to contribute more, focus on the problems they want to solve and not distract by the low-level styles.

I feel I'm more motivated to walk around the codebase after these cleanup 🙂.

Approach

I used the default setting of Rubocop that mostly follows the Ruby style guide. Each commit is fixing one style problem with the auto-correction, plus manual change if needed. Plan to squash the commits all once review is completed, for now, expanding them for easier review and discussions.

Single quote vs double quote ❓

This is the one style I haven't addressed. The two styles are mingled in the project, seemingly single quote is taking more territory, but let me know which one we'd like to follow. I'll update them all in once.

@mdsol/team-10 Please 🙏

jfeltesse-mdsol commented 6 years ago

Single quote vs double quote

Vote for double quotes. The performance is the same, unless you care about nanoseconds.

piao-mdsol commented 6 years ago

Updated to double quotes in 0501c6f and addressed other reviews. Rebased and squashed ♻️

jfeltesse-mdsol commented 6 years ago

Merging with no version bump since these are coding style related changes only.