Commit 0e7d5ae0 authored by David Fernandez's avatar David Fernandez

Remove the nuget new file reader feature flag

Update the related specs
Remove the feature flag yaml definition file

Changelog: other
parent 2f97b0fd
......@@ -105,22 +105,6 @@ module Packages
end
def with_zip_file(&block)
if ::Feature.enabled?(:packages_nuget_archive_new_file_reader, project, default_enabled: :yaml)
with_new_file_reader(&block)
else
with_legacy_file_reader(&block)
end
end
def with_legacy_file_reader
package_file.file.use_file do |file_path|
Zip::File.open(file_path) do |zip_file|
yield(zip_file)
end
end
end
def with_new_file_reader
package_file.file.use_open_file do |open_file|
zip_file = Zip::File.new(open_file, false, true)
yield(zip_file)
......
---
name: packages_nuget_archive_new_file_reader
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62471
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/331799
milestone: '13.13'
type: development
group: group::package
default_enabled: false
......@@ -24,22 +24,7 @@ RSpec.describe Packages::Nuget::MetadataExtractionService do
package_tags: []
}
context 'with packages_nuget_archive_new_file_reader enabled' do
before do
expect(service).to receive(:with_new_file_reader).and_call_original
end
it { is_expected.to eq(expected_metadata) }
end
context 'with packages_nuget_archive_new_file_reader disabled' do
before do
stub_feature_flags(packages_nuget_archive_new_file_reader: false)
expect(service).to receive(:with_legacy_file_reader).and_call_original
end
it { is_expected.to eq(expected_metadata) }
end
it { is_expected.to eq(expected_metadata) }
end
context 'with nuspec file' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment