Skip to content

Commit c7ad0d6

Browse files
committed
Upgraded Rubocop to 1.62.1.
1 parent 5450cad commit c7ad0d6

File tree

13 files changed

+146
-38
lines changed

13 files changed

+146
-38
lines changed

.rubocop.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@ AllCops:
22
Exclude:
33
- vendor/**/*
44
- bin/**/*
5+
NewCops: enable
56

67
Style/Documentation:
78
Enabled: false
89

910
Style/FrozenStringLiteralComment:
1011
Enabled: false
1112

12-
Metrics/LineLength:
13+
Layout/LineLength:
1314
Enabled: false
1415

16+
require:
17+
- rubocop-capybara
18+
- rubocop-rails
19+
- rubocop-rake
20+
- rubocop-rspec
21+
1522
inherit_from: .rubocop_todo.yml

.rubocop_todo.yml

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,72 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2019-07-06 10:22:55 -0400 using RuboCop version 0.72.0.
3+
# on 2024-03-19 16:06:55 UTC using RuboCop version 1.62.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 2
10-
# Configuration parameters: CountComments, ExcludedMethods.
11-
# ExcludedMethods: refine
12-
Metrics/BlockLength:
13-
Max: 33
9+
# Offense count: 1
10+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
11+
Lint/EmptyBlock:
12+
Exclude:
13+
- 'spec/helpers/welcome_helper_spec.rb'
1414

1515
# Offense count: 1
16-
# Cop supports --auto-correct.
17-
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
18-
# SupportedStyles: slashes, percent_r, mixed
19-
Style/RegexpLiteral:
16+
# This cop supports unsafe autocorrection (--autocorrect-all).
17+
RSpec/EmptyExampleGroup:
18+
Exclude:
19+
- 'spec/helpers/welcome_helper_spec.rb'
20+
21+
# Offense count: 4
22+
# Configuration parameters: CountAsOne.
23+
RSpec/ExampleLength:
24+
Max: 13
25+
26+
# Offense count: 5
27+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
28+
# Include: **/*_spec*rb*, **/spec/**/*
29+
RSpec/FilePath:
30+
Exclude:
31+
- 'spec/api/headers_spec.rb'
32+
- 'spec/api/ping_spec.rb'
33+
- 'spec/api/post_spec.rb'
34+
- 'spec/api/protected_spec.rb'
35+
- 'spec/api/raise_spec.rb'
36+
37+
# Offense count: 4
38+
RSpec/MultipleExpectations:
39+
Max: 2
40+
41+
# Offense count: 4
42+
# This cop supports unsafe autocorrection (--autocorrect-all).
43+
# Configuration parameters: ResponseMethods.
44+
# ResponseMethods: response, last_response
45+
RSpec/Rails/HaveHttpStatus:
46+
Exclude:
47+
- 'spec/api/post_spec.rb'
48+
- 'spec/api/protected_spec.rb'
49+
50+
# Offense count: 2
51+
# This cop supports unsafe autocorrection (--autocorrect-all).
52+
# Configuration parameters: Inferences.
53+
RSpec/Rails/InferredSpecType:
54+
Exclude:
55+
- 'spec/features/homepage_spec.rb'
56+
- 'spec/features/swagger_spec.rb'
57+
58+
# Offense count: 2
59+
RSpec/RepeatedExample:
60+
Exclude:
61+
- 'spec/api/headers_spec.rb'
62+
63+
# Offense count: 5
64+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
65+
# Include: **/*_spec.rb
66+
RSpec/SpecFilePathFormat:
2067
Exclude:
21-
- 'spec/spec_helper.rb'
68+
- 'spec/api/headers_spec.rb'
69+
- 'spec/api/ping_spec.rb'
70+
- 'spec/api/post_spec.rb'
71+
- 'spec/api/protected_spec.rb'
72+
- 'spec/api/raise_spec.rb'

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ group :test do
7272
gem 'capybara'
7373
gem 'rspec'
7474
gem 'rspec-rails'
75-
gem 'rubocop'
75+
gem 'rubocop', '1.62.1'
76+
gem 'rubocop-capybara'
77+
gem 'rubocop-rails'
78+
gem 'rubocop-rake'
79+
gem 'rubocop-rspec'
7680
gem 'selenium-webdriver'
7781
gem 'webdrivers'
7882
end

Gemfile.lock

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ GEM
131131
jbuilder (2.11.5)
132132
actionview (>= 5.0.0)
133133
activesupport (>= 5.0.0)
134+
json (2.7.1)
135+
language_server-protocol (3.17.0.3)
134136
loofah (2.19.1)
135137
crass (~> 1.0.2)
136138
nokogiri (>= 1.5.9)
@@ -165,9 +167,10 @@ GEM
165167
racc (~> 1.4)
166168
nokogiri (1.14.3-x86_64-linux)
167169
racc (~> 1.4)
168-
parallel (1.22.1)
169-
parser (3.1.2.0)
170+
parallel (1.24.0)
171+
parser (3.3.0.5)
170172
ast (~> 2.4.1)
173+
racc
171174
pg (1.3.5)
172175
public_suffix (4.0.7)
173176
puma (5.6.7)
@@ -231,18 +234,35 @@ GEM
231234
rspec-mocks (~> 3.10)
232235
rspec-support (~> 3.10)
233236
rspec-support (3.11.0)
234-
rubocop (1.30.1)
237+
rubocop (1.62.1)
238+
json (~> 2.3)
239+
language_server-protocol (>= 3.17.0)
235240
parallel (~> 1.10)
236-
parser (>= 3.1.0.0)
241+
parser (>= 3.3.0.2)
237242
rainbow (>= 2.2.2, < 4.0)
238243
regexp_parser (>= 1.8, < 3.0)
239244
rexml (>= 3.2.5, < 4.0)
240-
rubocop-ast (>= 1.18.0, < 2.0)
245+
rubocop-ast (>= 1.31.1, < 2.0)
241246
ruby-progressbar (~> 1.7)
242-
unicode-display_width (>= 1.4.0, < 3.0)
243-
rubocop-ast (1.18.0)
244-
parser (>= 3.1.1.0)
245-
ruby-progressbar (1.11.0)
247+
unicode-display_width (>= 2.4.0, < 3.0)
248+
rubocop-ast (1.31.2)
249+
parser (>= 3.3.0.4)
250+
rubocop-capybara (2.20.0)
251+
rubocop (~> 1.41)
252+
rubocop-factory_bot (2.25.1)
253+
rubocop (~> 1.41)
254+
rubocop-rails (2.24.0)
255+
activesupport (>= 4.2.0)
256+
rack (>= 1.1)
257+
rubocop (>= 1.33.0, < 2.0)
258+
rubocop-ast (>= 1.31.1, < 2.0)
259+
rubocop-rake (0.6.0)
260+
rubocop (~> 1.0)
261+
rubocop-rspec (2.27.1)
262+
rubocop (~> 1.40)
263+
rubocop-capybara (~> 2.17)
264+
rubocop-factory_bot (~> 2.22)
265+
ruby-progressbar (1.13.0)
246266
ruby2_keywords (0.0.5)
247267
rubyzip (2.3.2)
248268
selenium-webdriver (4.2.1)
@@ -267,7 +287,7 @@ GEM
267287
railties (>= 6.0.0)
268288
tzinfo (2.0.6)
269289
concurrent-ruby (~> 1.0)
270-
unicode-display_width (2.1.0)
290+
unicode-display_width (2.5.0)
271291
web-console (4.2.0)
272292
actionview (>= 6.0.0)
273293
activemodel (>= 6.0.0)
@@ -287,6 +307,7 @@ GEM
287307

288308
PLATFORMS
289309
arm64-darwin-21
310+
x86_64-darwin-19
290311
x86_64-darwin-20
291312
x86_64-linux
292313

@@ -304,7 +325,11 @@ DEPENDENCIES
304325
rails (~> 7.0.4)
305326
rspec
306327
rspec-rails
307-
rubocop
328+
rubocop (= 1.62.1)
329+
rubocop-capybara
330+
rubocop-rails
331+
rubocop-rake
332+
rubocop-rspec
308333
selenium-webdriver
309334
sprockets-rails
310335
stimulus-rails
@@ -314,4 +339,4 @@ DEPENDENCIES
314339
webdrivers
315340

316341
BUNDLED WITH
317-
2.3.16
342+
2.3.26

config/environments/production.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
config.active_support.report_deprecations = false
7777

7878
# Use default logging formatter so that PID and timestamp are not suppressed.
79-
config.log_formatter = ::Logger::Formatter.new
79+
config.log_formatter = Logger::Formatter.new
8080

8181
# Use a different logger for distributed setups.
8282
# require "syslog/logger"

gemfiles/rails_6.gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'grape-swagger'
88
gem 'importmap-rails'
99
gem 'jbuilder'
1010
gem 'pg', '~> 1.1'
11-
gem 'puma', '~> 5.0'
11+
gem 'puma', '~> 5.6'
1212
gem 'rails', '~> 6.0'
1313
gem 'sprockets-rails'
1414
gem 'stimulus-rails'
@@ -28,7 +28,11 @@ group :test do
2828
gem 'capybara'
2929
gem 'rspec'
3030
gem 'rspec-rails'
31-
gem 'rubocop'
31+
gem 'rubocop', '1.62.1'
32+
gem 'rubocop-capybara'
33+
gem 'rubocop-rails'
34+
gem 'rubocop-rake'
35+
gem 'rubocop-rspec'
3236
gem 'selenium-webdriver'
3337
gem 'webdrivers'
3438
end

gemfiles/rails_6_1.gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'grape-swagger'
88
gem 'importmap-rails'
99
gem 'jbuilder'
1010
gem 'pg', '~> 1.1'
11-
gem 'puma', '~> 5.0'
11+
gem 'puma', '~> 5.6'
1212
gem 'rails', '~> 6.1'
1313
gem 'sprockets-rails'
1414
gem 'stimulus-rails'
@@ -28,7 +28,11 @@ group :test do
2828
gem 'capybara'
2929
gem 'rspec'
3030
gem 'rspec-rails'
31-
gem 'rubocop'
31+
gem 'rubocop', '1.62.1'
32+
gem 'rubocop-capybara'
33+
gem 'rubocop-rails'
34+
gem 'rubocop-rake'
35+
gem 'rubocop-rspec'
3236
gem 'selenium-webdriver'
3337
gem 'webdrivers'
3438
end

gemfiles/rails_7.gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'grape-swagger'
88
gem 'importmap-rails'
99
gem 'jbuilder'
1010
gem 'pg', '~> 1.1'
11-
gem 'puma', '~> 5.0'
11+
gem 'puma', '~> 5.6'
1212
gem 'rails', '~> 7.0'
1313
gem 'sprockets-rails'
1414
gem 'stimulus-rails'
@@ -28,7 +28,11 @@ group :test do
2828
gem 'capybara'
2929
gem 'rspec'
3030
gem 'rspec-rails'
31-
gem 'rubocop'
31+
gem 'rubocop', '1.62.1'
32+
gem 'rubocop-capybara'
33+
gem 'rubocop-rails'
34+
gem 'rubocop-rake'
35+
gem 'rubocop-rspec'
3236
gem 'selenium-webdriver'
3337
gem 'webdrivers'
3438
end

gemfiles/rails_edge.gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'grape-swagger'
88
gem 'importmap-rails'
99
gem 'jbuilder'
1010
gem 'pg', '~> 1.1'
11-
gem 'puma', '~> 5.0'
11+
gem 'puma', '~> 5.6'
1212
gem 'rails', git: 'https://github.com/rails/rails.git'
1313
gem 'sprockets-rails'
1414
gem 'stimulus-rails'
@@ -28,7 +28,11 @@ group :test do
2828
gem 'capybara'
2929
gem 'rspec'
3030
gem 'rspec-rails'
31-
gem 'rubocop'
31+
gem 'rubocop', '1.62.1'
32+
gem 'rubocop-capybara'
33+
gem 'rubocop-rails'
34+
gem 'rubocop-rake'
35+
gem 'rubocop-rspec'
3236
gem 'selenium-webdriver'
3337
gem 'webdrivers'
3438
end

spec/api/ping_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
get '/api/ping'
66
expect(response.body).to eq({ ping: 'pong' }.to_json)
77
end
8+
89
it 'ping with a parameter' do
910
get '/api/ping?pong=test'
1011
expect(response.body).to eq({ ping: 'test' }.to_json)

0 commit comments

Comments
 (0)