Skip to content

Commit 7ca8b31

Browse files
committed
Upgrade rubocop
1 parent 9f37ec4 commit 7ca8b31

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

.rubocop.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ AllCops:
77
- bin/**/*
88

99
require:
10-
- rubocop-performance
1110
- rubocop-rspec
1211

12+
plugins:
13+
- rubocop-performance
14+
1315
inherit_from: .rubocop_todo.yml
1416

1517
Layout/LineLength:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* [#2557](https://github.com/ruby-grape/grape/pull/2557): Add `lint!` - [@ericproulx](https://github.com/ericproulx).
1616
* [#2561](https://github.com/ruby-grape/grape/pull/2561): Optimize hash alloc for middleware's default options - [@ericproulx](https://github.com/ericproulx).
1717
* [#2563](https://github.com/ruby-grape/grape/pull/2563): Update `Grape::Middleware::Auth::Base` - [@ericproulx](https://github.com/ericproulx).
18+
* [#2571](https://github.com/ruby-grape/grape/pull/2571): Update RuboCop 1.75.8 - [@pieterocp](https://github.com/pieterocp).
1819
* Your contribution here.
1920

2021
#### Fixes

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ group :development, :test do
1010
gem 'builder', require: false
1111
gem 'bundler'
1212
gem 'rake'
13-
gem 'rubocop', '1.71.2', require: false
14-
gem 'rubocop-performance', '1.23.1', require: false
13+
gem 'rubocop', '1.75.8', require: false
14+
gem 'rubocop-performance', '1.25.0', require: false
1515
gem 'rubocop-rspec', '3.4.0', require: false
1616
end
1717

spec/grape/api_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ def to_txt
14221422
def initialize(app, *args)
14231423
@args = args
14241424
@app = app
1425-
@block = block_given? ? true : nil
1425+
@block = block_given? || nil
14261426
end
14271427

14281428
def call(env)
@@ -4536,8 +4536,8 @@ def inherited(api)
45364536

45374537
let(:shared_api_module) do
45384538
Module.new do
4539-
# rubocop:disable Style/ExplicitBlockArgument because this causes
4540-
# the underlying issue in this form
4539+
# rubocop:disable Style/ExplicitBlockArgument -- because
4540+
# this causes the underlying issue in this form
45414541
def uniqe_id_route
45424542
params do
45434543
use :unique_id

spec/support/integer_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Spec
44
module Support
55
module Helpers
6-
INTEGER_CLASS_NAME = 0.to_i.class.to_s.freeze
6+
INTEGER_CLASS_NAME = 0.class.to_s.freeze
77

88
def integer_class_name
99
INTEGER_CLASS_NAME

0 commit comments

Comments
 (0)