Posted 14 days ago. Visible to the public. Auto-destruct in 52 days

makandra-rubocop 10.0 released

We released a new version of makandra-rubocop Archive

  • rubocop has been updated from 1.25 to 1.39
  • rubocop-rails has been updated from 2.11.3 to 2.17.2
  • rubocop-rspec have been updated from 2.4.0 to 2.13.2.
  • rubocop >= 1.29 requires a Ruby version > 2.6, so with this release support for Ruby < 2.6 is dropped.

Some cool new cops

Copy
# bad File.open(Rails.root.join('db', 'schema.rb')) # good Rails.root.join('db', 'schema.rb').open
Copy
# bad Post.left_joins(:author).where(authors: { id: nil }) # good Post.where.missing(:author)
Copy
# bad User.where.not(trashed: true, role: ['moderator', 'admin']) # good User.where.not(trashed: true).where.not(role: ['moderator', 'admin'])
Copy
# bad expect(page).to have_css('input', exact_text: 'foo') # good expect(page).to have_field('foo')

See also Use capybara and not rspec matchers

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).

Owner of this card:

Avatar
Bruno Sedler
Last edit:
8 days ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Bruno Sedler to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more