Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4b9efcaf
Commit
4b9efcaf
authored
Nov 02, 2021
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the offences introduced by Performance/OpenStruct
Changelog: other
parent
8e24a20c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-1
lib/gitlab/testing/request_inspector_middleware.rb
lib/gitlab/testing/request_inspector_middleware.rb
+3
-1
No files found.
.rubocop_manual_todo.yml
View file @
4b9efcaf
...
@@ -2211,7 +2211,6 @@ Performance/OpenStruct:
...
@@ -2211,7 +2211,6 @@ Performance/OpenStruct:
-
'
lib/gitlab/ci/ansi2html.rb'
-
'
lib/gitlab/ci/ansi2html.rb'
-
'
lib/gitlab/git/diff_collection.rb'
-
'
lib/gitlab/git/diff_collection.rb'
-
'
lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb'
-
'
lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb'
-
'
lib/gitlab/testing/request_inspector_middleware.rb'
-
'
lib/mattermost/session.rb'
-
'
lib/mattermost/session.rb'
# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/324629
# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/324629
...
...
lib/gitlab/testing/request_inspector_middleware.rb
View file @
4b9efcaf
...
@@ -9,6 +9,8 @@ module Gitlab
...
@@ -9,6 +9,8 @@ module Gitlab
@@logged_requests
=
Concurrent
::
Array
.
new
@@logged_requests
=
Concurrent
::
Array
.
new
@@inject_headers
=
Concurrent
::
Hash
.
new
@@inject_headers
=
Concurrent
::
Hash
.
new
Request
=
Struct
.
new
(
:url
,
:status_code
,
:request_headers
,
:response_headers
,
:body
,
keyword_init:
true
)
# Resets the current request log and starts logging requests
# Resets the current request log and starts logging requests
def
self
.
log_requests!
(
headers
=
{})
def
self
.
log_requests!
(
headers
=
{})
@@inject_headers
.
replace
(
headers
)
@@inject_headers
.
replace
(
headers
)
...
@@ -40,7 +42,7 @@ module Gitlab
...
@@ -40,7 +42,7 @@ module Gitlab
full_body
=
+
''
full_body
=
+
''
body
.
each
{
|
b
|
full_body
<<
b
}
body
.
each
{
|
b
|
full_body
<<
b
}
request
=
OpenStruc
t
.
new
(
request
=
Reques
t
.
new
(
url:
url
,
url:
url
,
status_code:
status
,
status_code:
status
,
request_headers:
request_headers
,
request_headers:
request_headers
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment