Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
dbc6d7b2
Unverified
Commit
dbc6d7b2
authored
2 years ago
by
Nick Schonning
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Autofix Rubocop Lint/UnusedBlockArgument (#23712)
parent
65ba0d92
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.rubocop_todo.yml
+0
-8
0 additions, 8 deletions
.rubocop_todo.yml
spec/lib/activitypub/activity/add_spec.rb
+2
-2
2 additions, 2 deletions
spec/lib/activitypub/activity/add_spec.rb
spec/lib/request_pool_spec.rb
+1
-1
1 addition, 1 deletion
spec/lib/request_pool_spec.rb
with
3 additions
and
11 deletions
.rubocop_todo.yml
+
0
−
8
View file @
dbc6d7b2
...
...
@@ -278,14 +278,6 @@ Lint/OrAssignmentToConstant:
Exclude
:
-
'
lib/sanitize_ext/sanitize_config.rb'
# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument
:
Exclude
:
-
'
spec/lib/activitypub/activity/add_spec.rb'
-
'
spec/lib/request_pool_spec.rb'
# Offense count: 33
Lint/UselessAssignment
:
Exclude
:
...
...
This diff is collapsed.
Click to expand it.
spec/lib/activitypub/activity/add_spec.rb
+
2
−
2
View file @
dbc6d7b2
...
...
@@ -48,7 +48,7 @@ RSpec.describe ActivityPub::Activity::Add do
end
it
'fetches the status and pins it'
do
allow
(
service_stub
).
to
receive
(
:call
)
do
|
uri
,
id:
true
,
on_behalf_of:
nil
,
request_id:
nil
|
allow
(
service_stub
).
to
receive
(
:call
)
do
|
uri
,
id:
true
,
on_behalf_of:
nil
,
request_id:
nil
|
# rubocop:disable Lint/UnusedBlockArgument
expect
(
uri
).
to
eq
'https://example.com/unknown'
expect
(
id
).
to
eq
true
expect
(
on_behalf_of
&
.
following?
(
sender
)).
to
eq
true
...
...
@@ -62,7 +62,7 @@ RSpec.describe ActivityPub::Activity::Add do
context
'when there is no local follower'
do
it
'tries to fetch the status'
do
allow
(
service_stub
).
to
receive
(
:call
)
do
|
uri
,
id:
true
,
on_behalf_of:
nil
,
request_id:
nil
|
allow
(
service_stub
).
to
receive
(
:call
)
do
|
uri
,
id:
true
,
on_behalf_of:
nil
,
request_id:
nil
|
# rubocop:disable Lint/UnusedBlockArgument
expect
(
uri
).
to
eq
'https://example.com/unknown'
expect
(
id
).
to
eq
true
expect
(
on_behalf_of
).
to
eq
nil
...
...
This diff is collapsed.
Click to expand it.
spec/lib/request_pool_spec.rb
+
1
−
1
View file @
dbc6d7b2
...
...
@@ -33,7 +33,7 @@ describe RequestPool do
subject
threads
=
20
.
times
.
map
do
|
i
|
threads
=
20
.
times
.
map
do
|
_
i
|
Thread
.
new
do
20
.
times
do
subject
.
with
(
'http://example.com'
)
do
|
http_client
|
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment