Yōshiki (様式)
Dev Fu! Style
Because ruby code should be:
- Readable.
- Elegant.
- Easily read by humans.
- Approachable by newbs.
- Clear to developers.
- Profound to rubyists.
Make it so.
Usage
In your Gemfile:
gem 'yoshiki'
Just ruby (the only config that needs no extra plugins):
inherit_gem:
yoshiki: .yoshiki-ruby.yml
RSpec — add the plugin, then inherit:
gem 'rubocop-rspec'
inherit_gem:
yoshiki:
- .yoshiki-ruby.yml
- .yoshiki-rspec.yml
Minitest — add the plugin, then inherit:
gem 'rubocop-minitest'
inherit_gem:
yoshiki:
- .yoshiki-ruby.yml
- .yoshiki-minitest.yml
Rails (minitest) — includes ruby style; add the Rails plugins (and optionally minitest):
gem 'rubocop-rails'
gem 'rubocop-capybara'
gem 'rubocop-minitest' # optional
inherit_gem:
yoshiki:
- .yoshiki-rails.yml # includes .yoshiki-ruby.yml
- .yoshiki-minitest.yml # optional
Rails + RSpec — add the Rails + RSpec plugins (includes factory_bot), then one-line inherit:
gem 'rubocop-rails'
gem 'rubocop-capybara'
gem 'rubocop-factory_bot'
gem 'rubocop-rspec'
gem 'rubocop-rspec_rails'
inherit_gem:
yoshiki: .yoshiki-rails-rspec.yml # ruby + rails + rspec + rspec_rails + factory_bot
(.yoshiki.yml is an alias for the same stack.)