Commit 955876d0 authored by Siddharth Asthana's avatar Siddharth Asthana Committed by Peter Leitzen

Fix the offenses introduced by Style/OpenStructUse

parent 8f9b5225
......@@ -2632,5 +2632,4 @@ Style/OpenStructUse:
- 'spec/support/shared_examples/requests/api/pypi_packages_shared_examples.rb'
- 'spec/support_specs/helpers/stub_feature_flags_spec.rb'
- 'spec/tooling/rspec_flaky/flaky_example_spec.rb'
- 'spec/workers/packages/maven/metadata/sync_worker_spec.rb'
- 'tooling/rspec_flaky/flaky_example.rb'
......@@ -8,6 +8,7 @@ RSpec.describe Packages::Maven::Metadata::SyncWorker, type: :worker do
let(:versions) { %w[1.2 1.1 2.1 3.0-SNAPSHOT] }
let(:worker) { described_class.new }
let(:data_struct) { Struct.new(:release, :latest, :versions, keyword_init: true) }
describe '#perform' do
let(:user) { create(:user) }
......@@ -197,7 +198,7 @@ RSpec.describe Packages::Maven::Metadata::SyncWorker, type: :worker do
def versions_from(xml_content)
xml_doc = Nokogiri::XML(xml_content)
OpenStruct.new(
data_struct.new(
release: xml_doc.xpath('//metadata/versioning/release').first.content,
latest: xml_doc.xpath('//metadata/versioning/latest').first.content,
versions: xml_doc.xpath('//metadata/versioning/versions/version').map(&:content)
......
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