Custom RuboCop cops for Nulogy's Ruby projects.
Add this line to your application's Gemfile:
gem "nucop-cops"And then execute:
bundle installAdd the following to your .rubocop.yml:
require:
- nucopThis gem provides the following custom cops:
Detects explicit usage of FactoryBot.create, FactoryGirl.build, etc. in spec files. The factory methods are globally available, so the explicit constant reference is unnecessary.
Detects method definitions that override Ruby/Rails core methods like blank?, present?, and empty?.
Detects specs tagged with :wip (work in progress) which should not be committed.
Ensures that release toggle names are specified as symbols rather than strings.
Detects method definitions in spec files that would shadow FactoryBot methods like create, build, build_list, etc.
After checking out the repo, run bundle install to install dependencies. Then, run bundle exec rake to run the tests and RuboCop.
To publish a new version:
- Update the version number in
lib/nucop/version.rb - Update
CHANGELOG.mdwith the changes - Commit the changes:
git add -A git commit -m "Bump version to X.X.X" - Release the gem (creates git tag, builds, and pushes to RubyGems):
bundle exec rake release
The gem is available as open source under the terms of the MIT License.