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
a8057eb8
Commit
a8057eb8
authored
Dec 02, 2021
by
mehulsharma
Committed by
Peter Leitzen
Jan 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OpenStruct use in metadata_extraction_service
Fixes OpenStruct use as Ruby 3 discourages it Changelog: other
parent
a97ebdb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
.rubocop_todo/style/open_struct_use.yml
.rubocop_todo/style/open_struct_use.yml
+0
-1
spec/services/packages/nuget/metadata_extraction_service_spec.rb
...rvices/packages/nuget/metadata_extraction_service_spec.rb
+2
-2
No files found.
.rubocop_todo/style/open_struct_use.yml
View file @
a8057eb8
...
...
@@ -32,7 +32,6 @@ Style/OpenStructUse:
-
spec/lib/gitlab/quick_actions/command_definition_spec.rb
-
spec/models/design_management/design_action_spec.rb
-
spec/models/design_management/design_at_version_spec.rb
-
spec/services/packages/nuget/metadata_extraction_service_spec.rb
-
spec/services/projects/import_service_spec.rb
-
spec/services/system_note_service_spec.rb
-
spec/support/helpers/import_spec_helper.rb
...
...
spec/services/packages/nuget/metadata_extraction_service_spec.rb
View file @
a8057eb8
...
...
@@ -78,7 +78,7 @@ RSpec.describe Packages::Nuget::MetadataExtractionService do
end
context
'with invalid package file id'
do
let
(
:package_file
)
{
OpenStruct
.
new
(
id:
555
)
}
let
(
:package_file
)
{
double
(
'file'
,
id:
555
)
}
it
{
expect
{
subject
}.
to
raise_error
(
::
Packages
::
Nuget
::
MetadataExtractionService
::
ExtractionError
,
'invalid package file'
)
}
end
...
...
@@ -109,7 +109,7 @@ RSpec.describe Packages::Nuget::MetadataExtractionService do
context
'with a too big nuspec file'
do
before
do
allow_any_instance_of
(
Zip
::
File
).
to
receive
(
:glob
).
and_return
([
OpenStruct
.
new
(
size:
6
.
megabytes
)])
allow_any_instance_of
(
Zip
::
File
).
to
receive
(
:glob
).
and_return
([
double
(
'file'
,
size:
6
.
megabytes
)])
end
it
{
expect
{
subject
}.
to
raise_error
(
::
Packages
::
Nuget
::
MetadataExtractionService
::
ExtractionError
,
'nuspec file too big'
)
}
...
...
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