charity: water shared code style configs for RuboCop. Forked from https://github.com/percy/percy-style.
Add this line to your application's Gemfile:
group :test, :development do
gem 'cw-style'
end
Or, for a Ruby library, add this to your gemspec:
spec.add_development_dependency 'cw-style'
And then run:
$ bundle install
Create a .rubocop.yml
with the following directives:
inherit_gem:
cw-style:
- default.yml
Now, run:
$ bundle exec rubocop
You do not need to include rubocop directly in your application's dependencies. Cw-style will include a specific version of rubocop
and rubocop-rspec
that is shared across all projects.
- The gem version needs to be bumped along with any changes to the code.
- Manually bump the version number in version.rb
- The gemfury-hosted gem is automatically updated when changes to this repo are merged.
- Apps that include this gem as a dependency need to be updated to use the latest version of the gem.
- When making changes to this repo, be sure to update the gem version in all apps that use this gem by running
bundle update cw-style
and commiting the Gemfile.lock changes.
- When making changes to this repo, be sure to update the gem version in all apps that use this gem by running