diff --git a/.rubocop_todo/style/percent_literal_delimiters.yml b/.rubocop_todo/style/percent_literal_delimiters.yml deleted file mode 100644 index 1db9e97b669e9b8ed71e99517cc5dfd64bf4c57d..0000000000000000000000000000000000000000 --- a/.rubocop_todo/style/percent_literal_delimiters.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -# Cop supports --autocorrect. -Style/PercentLiteralDelimiters: - Exclude: - - 'metrics_server/metrics_server.rb' - - 'spec/tasks/gitlab/db_rake_spec.rb' - - 'spec/tooling/danger/customer_success_spec.rb' - - 'spec/tooling/danger/datateam_spec.rb' - - 'spec/tooling/danger/sidekiq_queues_spec.rb' - - 'spec/tooling/lib/tooling/test_map_generator_spec.rb' - - 'spec/uploaders/attachment_uploader_spec.rb' - - 'spec/uploaders/avatar_uploader_spec.rb' - - 'spec/uploaders/ci/pipeline_artifact_uploader_spec.rb' - - 'spec/uploaders/dependency_proxy/file_uploader_spec.rb' - - 'spec/uploaders/design_management/design_v432x230_uploader_spec.rb' - - 'spec/uploaders/external_diff_uploader_spec.rb' - - 'spec/uploaders/import_export_uploader_spec.rb' - - 'spec/uploaders/job_artifact_uploader_spec.rb' - - 'spec/uploaders/lfs_object_uploader_spec.rb' - - 'spec/uploaders/namespace_file_uploader_spec.rb' - - 'spec/uploaders/object_storage_spec.rb' - - 'spec/uploaders/packages/composer/cache_uploader_spec.rb' - - 'spec/uploaders/packages/debian/component_file_uploader_spec.rb' - - 'spec/uploaders/packages/debian/distribution_release_file_uploader_spec.rb' - - 'spec/uploaders/packages/package_file_uploader_spec.rb' - - 'spec/uploaders/pages/deployment_uploader_spec.rb' - - 'spec/uploaders/personal_file_uploader_spec.rb' - - 'spec/validators/any_field_validator_spec.rb' - - 'spec/views/layouts/_head.html.haml_spec.rb' - - 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb' - - 'spec/views/projects/commit/branches.html.haml_spec.rb' - - 'spec/workers/concerns/worker_context_spec.rb' - - 'spec/workers/container_registry/migration/enqueuer_worker_spec.rb' - - 'spec/workers/groups/update_statistics_worker_spec.rb' - - 'spec/workers/jira_connect/sync_branch_worker_spec.rb' - - 'spec/workers/post_receive_spec.rb' - - 'spec/workers/project_cache_worker_spec.rb' - - 'spec/workers/projects/record_target_platforms_worker_spec.rb' - - 'spec/workers/stuck_merge_jobs_worker_spec.rb' - - 'spec/workers/update_project_statistics_worker_spec.rb' diff --git a/metrics_server/metrics_server.rb b/metrics_server/metrics_server.rb index 7d4968f930cebd5597bfc404b00d2ea02f39de28..873489b444ed342a26ecae64364e16797168bc23 100644 --- a/metrics_server/metrics_server.rb +++ b/metrics_server/metrics_server.rb @@ -88,7 +88,7 @@ def settings_value(target) end def ensure_valid_target!(target) - raise "Target must be one of [puma,sidekiq]" unless %w(puma sidekiq).include?(target) + raise "Target must be one of [puma,sidekiq]" unless %w[puma sidekiq].include?(target) end end diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb index ba266168627208f29591345fbd41015305b71cc6..a966f2118b02677f63b6ae1e3d80e06fa720ee32 100644 --- a/spec/tasks/gitlab/db_rake_spec.rb +++ b/spec/tasks/gitlab/db_rake_spec.rb @@ -601,8 +601,8 @@ end describe 'drop_tables' do - let(:tables) { %w(one two schema_migrations) } - let(:views) { %w(three four pg_stat_statements) } + let(:tables) { %w[one two schema_migrations] } + let(:views) { %w[three four pg_stat_statements] } let(:schemas) { Gitlab::Database::EXTRA_SCHEMAS } let(:ignored_views) { double(ActiveRecord::Relation, pluck: ['pg_stat_statements']) } diff --git a/spec/tooling/danger/customer_success_spec.rb b/spec/tooling/danger/customer_success_spec.rb index fd3ead7b2d6ad61e6d944d6812bf7f81f4680f06..40ab7c794186be9495f1b19f5e5be4eaaed6fd31 100644 --- a/spec/tooling/danger/customer_success_spec.rb +++ b/spec/tooling/danger/customer_success_spec.rb @@ -17,53 +17,53 @@ where do { 'with data category changes to Ops and no Customer Success::Impact Check label' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['-data_category: cat1', '+data_category: operational'], customer_labeled: false, impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with data category changes and Customer Success::Impact Check label' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml], changed_lines: ['-data_category: cat1', '+data_category: operational'], customer_labeled: true, impacted: false, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with metric file changes and no data category changes' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml], changed_lines: ['-product_stage: growth'], customer_labeled: false, impacted: false, impacted_files: [] }, 'with data category changes from Ops' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['-data_category: operational', '+data_category: cat2'], customer_labeled: false, impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with data category removed' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['-data_category: operational'], customer_labeled: false, impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with data category added' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+data_category: operational'], customer_labeled: false, impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with data category in uppercase' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+data_category: Operational'], customer_labeled: false, impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] } } end diff --git a/spec/tooling/danger/datateam_spec.rb b/spec/tooling/danger/datateam_spec.rb index 85fcc20fd7cafa97c2e032190c913219bba979b8..9d8aaf0852071971a62fdb56901b0eee949cbe99 100644 --- a/spec/tooling/danger/datateam_spec.rb +++ b/spec/tooling/danger/datateam_spec.rb @@ -17,95 +17,95 @@ where do { 'with structure.sql subtraction changes and no Data Warehouse::Impact Check label' => { - modified_files: %w(db/structure.sql app/models/user.rb), + modified_files: %w[db/structure.sql app/models/user.rb], changed_lines: ['-group_id bigint NOT NULL'], mr_labels: [], impacted: true, - impacted_files: %w(db/structure.sql) + impacted_files: %w[db/structure.sql] }, 'with structure.sql subtraction changes and Data Warehouse::Impact Check label' => { - modified_files: %w(db/structure.sql), + modified_files: %w[db/structure.sql], changed_lines: ['-group_id bigint NOT NULL)'], mr_labels: ['Data Warehouse::Impact Check'], impacted: false, - impacted_files: %w(db/structure.sql) + impacted_files: %w[db/structure.sql] }, 'with structure.sql addition changes and no Data Warehouse::Impact Check label' => { - modified_files: %w(db/structure.sql app/models/user.rb), + modified_files: %w[db/structure.sql app/models/user.rb], changed_lines: ['+group_id bigint NOT NULL'], mr_labels: [], impacted: false, - impacted_files: %w(db/structure.sql) + impacted_files: %w[db/structure.sql] }, 'with user model changes' => { - modified_files: %w(app/models/users.rb), + modified_files: %w[app/models/users.rb], changed_lines: ['+has_one :namespace'], mr_labels: [], impacted: false, impacted_files: [] }, 'with perfomance indicator changes and no Data Warehouse::Impact Check label' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+-gmau'], mr_labels: [], impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with perfomance indicator changes and Data Warehouse::Impact Check label' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml], changed_lines: ['+-gmau'], mr_labels: ['Data Warehouse::Impact Check'], impacted: false, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with metric file changes and no performance indicator changes' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml], changed_lines: ['-product_stage: growth'], mr_labels: [], impacted: false, impacted_files: [] }, 'with metric file changes and no performance indicator changes and other label' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml], changed_lines: ['-product_stage: growth'], mr_labels: ['type::maintenance'], impacted: false, impacted_files: [] }, 'with performance indicator changes and other label' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+-gmau'], mr_labels: ['type::maintenance'], impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with performance indicator changes, Data Warehouse::Impact Check and other label' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+-gmau'], mr_labels: ['type::maintenance', 'Data Warehouse::Impact Check'], impacted: false, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with performance indicator changes and other labels' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+-gmau'], mr_labels: ['type::maintenance', 'Data Warehouse::Impacted'], impacted: false, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with metric status removed' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+status: removed'], mr_labels: ['type::maintenance'], impacted: true, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] }, 'with metric status active' => { - modified_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb), + modified_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml app/models/user.rb], changed_lines: ['+status: active'], mr_labels: ['type::maintenance'], impacted: false, - impacted_files: %w(config/metrics/20210216182127_user_secret_detection_jobs.yml) + impacted_files: %w[config/metrics/20210216182127_user_secret_detection_jobs.yml] } } end diff --git a/spec/tooling/danger/sidekiq_queues_spec.rb b/spec/tooling/danger/sidekiq_queues_spec.rb index 5ebcb018cc3fb9a00e849885f7ba5ac84073b9d6..143ea9732cd3671a980330e0406c58984c95c180 100644 --- a/spec/tooling/danger/sidekiq_queues_spec.rb +++ b/spec/tooling/danger/sidekiq_queues_spec.rb @@ -17,12 +17,12 @@ using RSpec::Parameterized::TableSyntax where(:modified_files, :changed_queue_files) do - %w(app/workers/all_queues.yml ee/app/workers/all_queues.yml foo) | %w(app/workers/all_queues.yml ee/app/workers/all_queues.yml) - %w(app/workers/all_queues.yml ee/app/workers/all_queues.yml) | %w(app/workers/all_queues.yml ee/app/workers/all_queues.yml) - %w(app/workers/all_queues.yml foo) | %w(app/workers/all_queues.yml) - %w(ee/app/workers/all_queues.yml foo) | %w(ee/app/workers/all_queues.yml) - %w(foo) | %w() - %w() | %w() + %w[app/workers/all_queues.yml ee/app/workers/all_queues.yml foo] | %w[app/workers/all_queues.yml ee/app/workers/all_queues.yml] + %w[app/workers/all_queues.yml ee/app/workers/all_queues.yml] | %w[app/workers/all_queues.yml ee/app/workers/all_queues.yml] + %w[app/workers/all_queues.yml foo] | %w[app/workers/all_queues.yml] + %w[ee/app/workers/all_queues.yml foo] | %w[ee/app/workers/all_queues.yml] + %w[foo] | %w[] + %w[] | %w[] end with_them do diff --git a/spec/tooling/lib/tooling/test_map_generator_spec.rb b/spec/tooling/lib/tooling/test_map_generator_spec.rb index 1b369923d8d3af04e84203061fd968e6f57777ea..eaaf525fc49e1cdc639daaa3a279e06864e31bd0 100644 --- a/spec/tooling/lib/tooling/test_map_generator_spec.rb +++ b/spec/tooling/lib/tooling/test_map_generator_spec.rb @@ -88,7 +88,7 @@ end it 'displays a warning when report has no examples' do - expect { subject.parse('yaml3.yml') }.to output(%|No examples in yaml3.yml! Metadata: {:type=>"Crystalball::ExecutionMap", :commit=>"74056e8d9cf3773f43faa1cf5416f8779c8284c9", :timestamp=>1602671965, :version=>nil}\n|).to_stdout + expect { subject.parse('yaml3.yml') }.to output(%(No examples in yaml3.yml! Metadata: {:type=>"Crystalball::ExecutionMap", :commit=>"74056e8d9cf3773f43faa1cf5416f8779c8284c9", :timestamp=>1602671965, :version=>nil}\n)).to_stdout end end diff --git a/spec/uploaders/attachment_uploader_spec.rb b/spec/uploaders/attachment_uploader_spec.rb index a035402e20769144729df190417f6d85cfe7f12c..e4e96aa15b77779eb5c1c80e15d6099a513ea541 100644 --- a/spec/uploaders/attachment_uploader_spec.rb +++ b/spec/uploaders/attachment_uploader_spec.rb @@ -10,9 +10,9 @@ subject { uploader } it_behaves_like 'builds correct paths', - store_dir: %r[uploads/-/system/note/attachment/], - upload_path: %r[uploads/-/system/note/attachment/], - absolute_path: %r[#{CarrierWave.root}/uploads/-/system/note/attachment/] + store_dir: %r{uploads/-/system/note/attachment/}, + upload_path: %r{uploads/-/system/note/attachment/}, + absolute_path: %r{#{CarrierWave.root}/uploads/-/system/note/attachment/} context "object_store is REMOTE" do before do @@ -22,8 +22,8 @@ include_context 'with storage', described_class::Store::REMOTE it_behaves_like 'builds correct paths', - store_dir: %r[note/attachment/], - upload_path: %r[note/attachment/] + store_dir: %r{note/attachment/}, + upload_path: %r{note/attachment/} end describe "#migrate!" do diff --git a/spec/uploaders/avatar_uploader_spec.rb b/spec/uploaders/avatar_uploader_spec.rb index bba7eb78f9992db695b426c12a5e77f2a2c417ab..333f23d7947a912e620e35a840f84326ab1b3c97 100644 --- a/spec/uploaders/avatar_uploader_spec.rb +++ b/spec/uploaders/avatar_uploader_spec.rb @@ -10,9 +10,9 @@ subject { uploader } it_behaves_like 'builds correct paths', - store_dir: %r[uploads/-/system/user/avatar/], - upload_path: %r[uploads/-/system/user/avatar/], - absolute_path: %r[#{CarrierWave.root}/uploads/-/system/user/avatar/] + store_dir: %r{uploads/-/system/user/avatar/}, + upload_path: %r{uploads/-/system/user/avatar/}, + absolute_path: %r{#{CarrierWave.root}/uploads/-/system/user/avatar/} context "object_store is REMOTE" do before do @@ -22,8 +22,8 @@ include_context 'with storage', described_class::Store::REMOTE it_behaves_like 'builds correct paths', - store_dir: %r[user/avatar/], - upload_path: %r[user/avatar/] + store_dir: %r{user/avatar/}, + upload_path: %r{user/avatar/} end context "with a file" do diff --git a/spec/uploaders/ci/pipeline_artifact_uploader_spec.rb b/spec/uploaders/ci/pipeline_artifact_uploader_spec.rb index 3935f0813721cbe5c20b391605b481414cd4cf4c..ace7bcbce48b61a32ff7b7352d8ca8791119c259 100644 --- a/spec/uploaders/ci/pipeline_artifact_uploader_spec.rb +++ b/spec/uploaders/ci/pipeline_artifact_uploader_spec.rb @@ -10,8 +10,8 @@ it_behaves_like "builds correct paths", store_dir: %r[\h{2}/\h{2}/\h{64}/pipelines/\d+/artifacts/\d+], - cache_dir: %r[artifacts/tmp/cache], - work_dir: %r[artifacts/tmp/work] + cache_dir: %r{artifacts/tmp/cache}, + work_dir: %r{artifacts/tmp/work} context 'when object store is REMOTE' do before do diff --git a/spec/uploaders/dependency_proxy/file_uploader_spec.rb b/spec/uploaders/dependency_proxy/file_uploader_spec.rb index 3cb2d1ea0f0b41b7ca41b553b3770a21d841cfff..faaa5541f0be98c3eef2404b76b1cb03f22c4221 100644 --- a/spec/uploaders/dependency_proxy/file_uploader_spec.rb +++ b/spec/uploaders/dependency_proxy/file_uploader_spec.rb @@ -12,8 +12,8 @@ it_behaves_like "builds correct paths", store_dir: %r[\h{2}/\h{2}], - cache_dir: %r[/dependency_proxy/tmp/cache], - work_dir: %r[/dependency_proxy/tmp/work] + cache_dir: %r{/dependency_proxy/tmp/cache}, + work_dir: %r{/dependency_proxy/tmp/work} context 'object store is remote' do before do diff --git a/spec/uploaders/design_management/design_v432x230_uploader_spec.rb b/spec/uploaders/design_management/design_v432x230_uploader_spec.rb index 3991058b32d54926498e3076fdee361da18f7c62..edfab24331c4fe661a2dbdfabebc5e73f34cf65d 100644 --- a/spec/uploaders/design_management/design_v432x230_uploader_spec.rb +++ b/spec/uploaders/design_management/design_v432x230_uploader_spec.rb @@ -11,10 +11,10 @@ subject(:uploader) { described_class.new(model, :image_v432x230) } it_behaves_like 'builds correct paths', - store_dir: %r[uploads/-/system/design_management/action/image_v432x230/], - upload_path: %r[uploads/-/system/design_management/action/image_v432x230/], - relative_path: %r[uploads/-/system/design_management/action/image_v432x230/], - absolute_path: %r[#{CarrierWave.root}/uploads/-/system/design_management/action/image_v432x230/] + store_dir: %r{uploads/-/system/design_management/action/image_v432x230/}, + upload_path: %r{uploads/-/system/design_management/action/image_v432x230/}, + relative_path: %r{uploads/-/system/design_management/action/image_v432x230/}, + absolute_path: %r{#{CarrierWave.root}/uploads/-/system/design_management/action/image_v432x230/} context 'object_store is REMOTE' do before do @@ -24,9 +24,9 @@ include_context 'with storage', described_class::Store::REMOTE it_behaves_like 'builds correct paths', - store_dir: %r[design_management/action/image_v432x230/], - upload_path: %r[design_management/action/image_v432x230/], - relative_path: %r[design_management/action/image_v432x230/] + store_dir: %r{design_management/action/image_v432x230/}, + upload_path: %r{design_management/action/image_v432x230/}, + relative_path: %r{design_management/action/image_v432x230/} end describe "#migrate!" do diff --git a/spec/uploaders/external_diff_uploader_spec.rb b/spec/uploaders/external_diff_uploader_spec.rb index 2121e9cbc29afc3eed14333969b10532ae01f5e2..25e8bd0a4dc38d21126ae6e23ca313be705b9743 100644 --- a/spec/uploaders/external_diff_uploader_spec.rb +++ b/spec/uploaders/external_diff_uploader_spec.rb @@ -9,9 +9,9 @@ subject(:uploader) { described_class.new(diff, :external_diff) } it_behaves_like "builds correct paths", - store_dir: %r[merge_request_diffs/mr-\d+], - cache_dir: %r[/external-diffs/tmp/cache], - work_dir: %r[/external-diffs/tmp/work] + store_dir: %r{merge_request_diffs/mr-\d+}, + cache_dir: %r{/external-diffs/tmp/cache}, + work_dir: %r{/external-diffs/tmp/work} context "object store is REMOTE" do before do @@ -21,7 +21,7 @@ include_context 'with storage', described_class::Store::REMOTE it_behaves_like "builds correct paths", - store_dir: %r[merge_request_diffs/mr-\d+] + store_dir: %r{merge_request_diffs/mr-\d+} end describe 'remote file' do diff --git a/spec/uploaders/import_export_uploader_spec.rb b/spec/uploaders/import_export_uploader_spec.rb index 64e92f5d60edc6879a554f747a81bbf596751818..1a2041df3d0ea286ac981d0502610d059e214f2b 100644 --- a/spec/uploaders/import_export_uploader_spec.rb +++ b/spec/uploaders/import_export_uploader_spec.rb @@ -39,8 +39,8 @@ include_context 'with storage', described_class::Store::REMOTE patterns = { - store_dir: %r[import_export_upload/import_file/], - upload_path: %r[import_export_upload/import_file/] + store_dir: %r{import_export_upload/import_file/}, + upload_path: %r{import_export_upload/import_file/} } it_behaves_like 'builds correct paths', patterns do diff --git a/spec/uploaders/job_artifact_uploader_spec.rb b/spec/uploaders/job_artifact_uploader_spec.rb index dac9e97641d1b8d257ac0e59d6f2d348de241d3b..ea4f0036fa471cccdb597235dc767d9205aca983 100644 --- a/spec/uploaders/job_artifact_uploader_spec.rb +++ b/spec/uploaders/job_artifact_uploader_spec.rb @@ -11,8 +11,8 @@ it_behaves_like "builds correct paths", store_dir: %r[\h{2}/\h{2}/\h{64}/\d{4}_\d{1,2}_\d{1,2}/\d+/\d+\z], - cache_dir: %r[artifacts/tmp/cache], - work_dir: %r[artifacts/tmp/work] + cache_dir: %r{artifacts/tmp/cache}, + work_dir: %r{artifacts/tmp/work} context "object store is REMOTE" do before do diff --git a/spec/uploaders/lfs_object_uploader_spec.rb b/spec/uploaders/lfs_object_uploader_spec.rb index 9bbfd910ada9b0b4bd1a262709cf805b4137a48b..77bde5da7ea16259e6ccd63c987f8ed6aeb7817e 100644 --- a/spec/uploaders/lfs_object_uploader_spec.rb +++ b/spec/uploaders/lfs_object_uploader_spec.rb @@ -11,8 +11,8 @@ it_behaves_like "builds correct paths", store_dir: %r[\h{2}/\h{2}], - cache_dir: %r[/lfs-objects/tmp/cache], - work_dir: %r[/lfs-objects/tmp/work] + cache_dir: %r{/lfs-objects/tmp/cache}, + work_dir: %r{/lfs-objects/tmp/work} context "object store is REMOTE" do before do diff --git a/spec/uploaders/namespace_file_uploader_spec.rb b/spec/uploaders/namespace_file_uploader_spec.rb index 02381123ba5cf9b1ce5429fd170a8f17328a665d..0db7f82dcbdfb542660359026bbea4762d1a8bc0 100644 --- a/spec/uploaders/namespace_file_uploader_spec.rb +++ b/spec/uploaders/namespace_file_uploader_spec.rb @@ -13,9 +13,9 @@ it_behaves_like 'builds correct paths' do let(:patterns) do { - store_dir: %r[uploads/-/system/namespace/\d+], + store_dir: %r{uploads/-/system/namespace/\d+}, upload_path: identifier, - absolute_path: %r[#{CarrierWave.root}/uploads/-/system/namespace/\d+/#{identifier}] + absolute_path: %r{#{CarrierWave.root}/uploads/-/system/namespace/\d+/#{identifier}} } end end @@ -30,7 +30,7 @@ it_behaves_like 'builds correct paths' do let(:patterns) do { - store_dir: %r[namespace/\d+/\h+], + store_dir: %r{namespace/\d+/\h+}, upload_path: identifier } end diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb index 576f6deeec63c8ba7df8277c65ec42b554c05587..e4a9b92df649dd04473a8c1ec9c3a14ec469320d 100644 --- a/spec/uploaders/object_storage_spec.rb +++ b/spec/uploaders/object_storage_spec.rb @@ -255,7 +255,7 @@ def dynamic_segment describe '#use_file' do context 'when file is stored locally' do it "calls a regular path" do - expect { |b| uploader.use_file(&b) }.not_to yield_with_args(%r[tmp/cache]) + expect { |b| uploader.use_file(&b) }.not_to yield_with_args(%r{tmp/cache}) end end @@ -267,7 +267,7 @@ def dynamic_segment end it "calls a cache path" do - expect { |b| uploader.use_file(&b) }.to yield_with_args(%r[tmp/cache]) + expect { |b| uploader.use_file(&b) }.to yield_with_args(%r{tmp/cache}) end it "cleans up the cached file" do diff --git a/spec/uploaders/packages/composer/cache_uploader_spec.rb b/spec/uploaders/packages/composer/cache_uploader_spec.rb index 7eea4a839abd1e0b5222fe013a3fedc1a68804f8..56e8b28ef36d41b9b088424d1d9482f83057f1dc 100644 --- a/spec/uploaders/packages/composer/cache_uploader_spec.rb +++ b/spec/uploaders/packages/composer/cache_uploader_spec.rb @@ -10,8 +10,8 @@ it_behaves_like "builds correct paths", store_dir: %r[^\h{2}/\h{2}/\h{64}/packages/composer_cache/\d+$], - cache_dir: %r[/packages/tmp/cache], - work_dir: %r[/packages/tmp/work] + cache_dir: %r{/packages/tmp/cache}, + work_dir: %r{/packages/tmp/work} context 'object store is remote' do before do diff --git a/spec/uploaders/packages/debian/component_file_uploader_spec.rb b/spec/uploaders/packages/debian/component_file_uploader_spec.rb index 84ba751c73795037bcf437648635f3bae4846b02..ffc5d8085fa602c65b03059837e451d4f70233a6 100644 --- a/spec/uploaders/packages/debian/component_file_uploader_spec.rb +++ b/spec/uploaders/packages/debian/component_file_uploader_spec.rb @@ -13,8 +13,8 @@ it_behaves_like "builds correct paths", store_dir: %r[^\h{2}/\h{2}/\h{64}/debian_#{container_type}_component_file/\d+$], - cache_dir: %r[/packages/tmp/cache$], - work_dir: %r[/packages/tmp/work$] + cache_dir: %r{/packages/tmp/cache$}, + work_dir: %r{/packages/tmp/work$} context 'object store is remote' do before do @@ -25,8 +25,8 @@ it_behaves_like "builds correct paths", store_dir: %r[^\h{2}/\h{2}/\h{64}/debian_#{container_type}_component_file/\d+$], - cache_dir: %r[/packages/tmp/cache$], - work_dir: %r[/packages/tmp/work$] + cache_dir: %r{/packages/tmp/cache$}, + work_dir: %r{/packages/tmp/work$} end describe 'remote file' do diff --git a/spec/uploaders/packages/debian/distribution_release_file_uploader_spec.rb b/spec/uploaders/packages/debian/distribution_release_file_uploader_spec.rb index df63056985648ae0b6d0c1b3f0c8240f3d3df1f7..2086ab5966ce24139afa646009771c926e21c787 100644 --- a/spec/uploaders/packages/debian/distribution_release_file_uploader_spec.rb +++ b/spec/uploaders/packages/debian/distribution_release_file_uploader_spec.rb @@ -13,8 +13,8 @@ it_behaves_like "builds correct paths", store_dir: %r[^\h{2}/\h{2}/\h{64}/debian_#{container_type}_distribution/\d+$], - cache_dir: %r[/packages/tmp/cache$], - work_dir: %r[/packages/tmp/work$] + cache_dir: %r{/packages/tmp/cache$}, + work_dir: %r{/packages/tmp/work$} context 'object store is remote' do before do @@ -25,8 +25,8 @@ it_behaves_like "builds correct paths", store_dir: %r[^\h{2}/\h{2}/\h{64}/debian_#{container_type}_distribution/\d+$], - cache_dir: %r[/packages/tmp/cache$], - work_dir: %r[/packages/tmp/work$] + cache_dir: %r{/packages/tmp/cache$}, + work_dir: %r{/packages/tmp/work$} end describe 'remote file' do diff --git a/spec/uploaders/packages/package_file_uploader_spec.rb b/spec/uploaders/packages/package_file_uploader_spec.rb index ddd9823d55cbd4ff8025e41f206792d4458e0824..36acb681669c29cf32579b08aa5b20a3370e1402 100644 --- a/spec/uploaders/packages/package_file_uploader_spec.rb +++ b/spec/uploaders/packages/package_file_uploader_spec.rb @@ -10,8 +10,8 @@ it_behaves_like "builds correct paths", store_dir: %r[^\h{2}/\h{2}/\h{64}/packages/\d+/files/\d+$], - cache_dir: %r[/packages/tmp/cache], - work_dir: %r[/packages/tmp/work] + cache_dir: %r{/packages/tmp/cache}, + work_dir: %r{/packages/tmp/work} context 'object store is remote' do before do diff --git a/spec/uploaders/pages/deployment_uploader_spec.rb b/spec/uploaders/pages/deployment_uploader_spec.rb index 7686efd4fe4a1017362bdcfbd7f8ccc670a9382d..a5fe2dfe9ba7493200f4ac51cf1ef3d480dbc007 100644 --- a/spec/uploaders/pages/deployment_uploader_spec.rb +++ b/spec/uploaders/pages/deployment_uploader_spec.rb @@ -14,8 +14,8 @@ it_behaves_like "builds correct paths", store_dir: %r[/\h{2}/\h{2}/\h{64}/pages_deployments/\d+], - cache_dir: %r[pages/@hashed/tmp/cache], - work_dir: %r[pages/@hashed/tmp/work] + cache_dir: %r{pages/@hashed/tmp/cache}, + work_dir: %r{pages/@hashed/tmp/work} context 'when object store is REMOTE' do before do diff --git a/spec/uploaders/personal_file_uploader_spec.rb b/spec/uploaders/personal_file_uploader_spec.rb index 58edf3f093de96d2290a67bf73177c6687ae9331..de5ed8318e4fc9675ed5505d97458390fbd2f257 100644 --- a/spec/uploaders/personal_file_uploader_spec.rb +++ b/spec/uploaders/personal_file_uploader_spec.rb @@ -43,16 +43,16 @@ it 'builds correct paths for both local and remote storage' do paths = uploader.upload_paths('test.jpg') - expect(paths.first).to match(%r[\h+/test.jpg]) - expect(paths.second).to match(%r[^personal_snippet/\d+/\h+/test.jpg]) + expect(paths.first).to match(%r{\h+/test.jpg}) + expect(paths.second).to match(%r{^personal_snippet/\d+/\h+/test.jpg}) end end context 'object_store is LOCAL' do it_behaves_like 'builds correct paths', - store_dir: %r[uploads/-/system/personal_snippet/\d+/\h+], - upload_path: %r[\h+/\S+], - absolute_path: %r[#{CarrierWave.root}/uploads/-/system/personal_snippet/\d+/\h+/\S+$] + store_dir: %r{uploads/-/system/personal_snippet/\d+/\h+}, + upload_path: %r{\h+/\S+}, + absolute_path: %r{#{CarrierWave.root}/uploads/-/system/personal_snippet/\d+/\h+/\S+$} it_behaves_like '#base_dir' it_behaves_like '#to_h' @@ -66,8 +66,8 @@ include_context 'with storage', described_class::Store::REMOTE it_behaves_like 'builds correct paths', - store_dir: %r[\d+/\h+], - upload_path: %r[^personal_snippet/\d+/\h+/<filename>] + store_dir: %r{\d+/\h+}, + upload_path: %r{^personal_snippet/\d+/\h+/<filename>} it_behaves_like '#base_dir' it_behaves_like '#to_h' diff --git a/spec/validators/any_field_validator_spec.rb b/spec/validators/any_field_validator_spec.rb index bede006abf6e7454a04290074487a7db0e5ae66b..2d3d398282862ecae4f5a29911694adc79f2bca3 100644 --- a/spec/validators/any_field_validator_spec.rb +++ b/spec/validators/any_field_validator_spec.rb @@ -8,7 +8,7 @@ Class.new(ApplicationRecord) do self.table_name = 'vulnerabilities' - validates_with AnyFieldValidator, fields: %w(title description) + validates_with AnyFieldValidator, fields: %w[title description] end end @@ -18,7 +18,7 @@ expect(validated_object.valid?).to be_falsey expect(validated_object.errors.messages) .to eq(base: ["At least one field of %{one_of_required_fields} must be present" % - { one_of_required_fields: %w(title description) }]) + { one_of_required_fields: %w[title description] }]) end it 'validates if only one field is present' do diff --git a/spec/views/layouts/_head.html.haml_spec.rb b/spec/views/layouts/_head.html.haml_spec.rb index 504a9492d7a4e25b8056001f88c270fcab38b1c7..56936dbafcf23116a320898232e5441c56ba5799 100644 --- a/spec/views/layouts/_head.html.haml_spec.rb +++ b/spec/views/layouts/_head.html.haml_spec.rb @@ -15,7 +15,7 @@ render - expect(rendered).to match(%{content="foo" http-equiv="refresh"}) + expect(rendered).to match(%(content="foo" http-equiv="refresh")) end it 'escapes HTML-safe strings in page_description' do @@ -23,7 +23,7 @@ render - expect(rendered).to match(%{content="foo" http-equiv="refresh"}) + expect(rendered).to match(%(content="foo" http-equiv="refresh")) end it 'escapes HTML-safe strings in page_image' do @@ -31,7 +31,7 @@ render - expect(rendered).to match(%{content="foo" http-equiv="refresh"}) + expect(rendered).to match(%(content="foo" http-equiv="refresh")) end context 'when an asset_host is set' do @@ -101,7 +101,7 @@ render expect(rendered).to match(%r{<script.*>.*var u="//#{matomo_host}/".*</script>}m) - expect(rendered).to match(%r(<noscript>.*<img src="//#{matomo_host}/matomo.php.*</noscript>)) + expect(rendered).to match(%r{<noscript>.*<img src="//#{matomo_host}/matomo.php.*</noscript>}) expect(rendered).not_to include('_paq.push(["disableCookies"])') end @@ -120,6 +120,6 @@ def stub_helper_with_safe_string(method) allow_any_instance_of(PageLayoutHelper).to receive(method) - .and_return(%q{foo" http-equiv="refresh}.html_safe) + .and_return(%q(foo" http-equiv="refresh).html_safe) end end diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index 005283f66da3338f2db001d2e837f76d80da4688..34debcab5f7be37bb91859f759580bde28862084 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -32,7 +32,7 @@ it 'has a link to the project activity path' do render - expect(rendered).to have_link('Project information', href: activity_project_path(project), class: %w(shortcuts-project-information)) + expect(rendered).to have_link('Project information', href: activity_project_path(project), class: %w[shortcuts-project-information]) expect(rendered).to have_selector('[aria-label="Project information"]') end diff --git a/spec/views/projects/commit/branches.html.haml_spec.rb b/spec/views/projects/commit/branches.html.haml_spec.rb index f1064be3047f30968313f45bca34231ff4b05116..d6fbf6453c01401fca62c998834c43816f520871 100644 --- a/spec/views/projects/commit/branches.html.haml_spec.rb +++ b/spec/views/projects/commit/branches.html.haml_spec.rb @@ -61,7 +61,7 @@ before do assign(:branches, ['master']) assign(:branches_limit_exceeded, true) - assign(:tags, %w(tag1 tag2)) + assign(:tags, %w[tag1 tag2]) assign(:tags_limit_exceeded, false) render diff --git a/spec/workers/concerns/worker_context_spec.rb b/spec/workers/concerns/worker_context_spec.rb index 700d9e37a559d028c055c7dbcc1f2761c6542e27..7a046517fd1f9d93a51d49d38a1a26282748e191 100644 --- a/spec/workers/concerns/worker_context_spec.rb +++ b/spec/workers/concerns/worker_context_spec.rb @@ -74,7 +74,7 @@ def self.name describe '.bulk_perform_async_with_contexts' do subject do worker.bulk_perform_async_with_contexts( - %w(hello world), + %w[hello world], context_proc: -> (_) { { user: build_stubbed(:user) } }, arguments_proc: -> (word) { word } ) @@ -93,7 +93,7 @@ def self.name subject do worker.bulk_perform_in_with_contexts( 10.minutes, - %w(hello world), + %w[hello world], context_proc: -> (_) { { user: build_stubbed(:user) } }, arguments_proc: -> (word) { word } ) diff --git a/spec/workers/container_registry/migration/enqueuer_worker_spec.rb b/spec/workers/container_registry/migration/enqueuer_worker_spec.rb index 4a603e538ef6c76393eeaf735636b086512856cb..ff388b1a29d872449362c4d7514e9f2933139182 100644 --- a/spec/workers/container_registry/migration/enqueuer_worker_spec.rb +++ b/spec/workers/container_registry/migration/enqueuer_worker_spec.rb @@ -16,7 +16,7 @@ before do stub_container_registry_config(enabled: true) stub_application_setting(container_registry_import_created_before: 1.day.ago) - stub_container_registry_tags(repository: container_repository.path, tags: %w(tag1 tag2 tag3), with_manifest: true) + stub_container_registry_tags(repository: container_repository.path, tags: %w[tag1 tag2 tag3], with_manifest: true) end describe '#perform' do @@ -133,7 +133,7 @@ stub_container_registry_tags( repository: container_repository2.path, - tags: %w(tag4 tag5 tag6), + tags: %w[tag4 tag5 tag6], with_manifest: true ) end @@ -204,7 +204,7 @@ stub_application_setting(container_registry_import_max_tags_count: 0) # Add 8 tags to the next repository stub_container_registry_tags( - repository: container_repository.path, tags: %w(a b c d e f g h), with_manifest: true + repository: container_repository.path, tags: %w[a b c d e f g h], with_manifest: true ) end diff --git a/spec/workers/groups/update_statistics_worker_spec.rb b/spec/workers/groups/update_statistics_worker_spec.rb index f47606f0580be2eaef4cbfa0d72978381b97416e..5fc4ccdab0dbf6356c7e2677eadf6be0bdc6daae 100644 --- a/spec/workers/groups/update_statistics_worker_spec.rb +++ b/spec/workers/groups/update_statistics_worker_spec.rb @@ -5,7 +5,7 @@ RSpec.describe Groups::UpdateStatisticsWorker, feature_category: :source_code_management do let_it_be(:group) { create(:group) } - let(:statistics) { %w(wiki_size) } + let(:statistics) { %w[wiki_size] } subject(:worker) { described_class.new } diff --git a/spec/workers/jira_connect/sync_branch_worker_spec.rb b/spec/workers/jira_connect/sync_branch_worker_spec.rb index 1c2661ad0e5ca9dc3466269ec7f562a296722b7f..18eb22b8a47943fd1c6aad275da9258a789bf649 100644 --- a/spec/workers/jira_connect/sync_branch_worker_spec.rb +++ b/spec/workers/jira_connect/sync_branch_worker_spec.rb @@ -14,7 +14,7 @@ let(:project_id) { project.id } let(:branch_name) { 'master' } - let(:commit_shas) { %w(b83d6e3 5a62481) } + let(:commit_shas) { %w[b83d6e3 5a62481] } let(:update_sequence_id) { 1 } def perform diff --git a/spec/workers/post_receive_spec.rb b/spec/workers/post_receive_spec.rb index 2e0a25354538fc4325e99521f9333eb6d30d6566..dcece830a85f2c572bb3f5690b90d8b1a9f512f3 100644 --- a/spec/workers/post_receive_spec.rb +++ b/spec/workers/post_receive_spec.rb @@ -391,7 +391,7 @@ def perform(changes: base64_changes) it 'enqueues a UpdateMergeRequestsWorker job' do allow(Project).to receive(:find_by).and_return(project) - expect_next(MergeRequests::PushedBranchesService).to receive(:execute).and_return(%w(tést)) + expect_next(MergeRequests::PushedBranchesService).to receive(:execute).and_return(%w[tést]) expect(UpdateMergeRequestsWorker).to receive(:perform_async).with(project.id, project.first_owner.id, any_args) diff --git a/spec/workers/project_cache_worker_spec.rb b/spec/workers/project_cache_worker_spec.rb index 4d46889759919cc3e2ee4c4e34470f5bdf6fce9e..7ef2494b5cf444adf2f688aa039891ca94f0df66 100644 --- a/spec/workers/project_cache_worker_spec.rb +++ b/spec/workers/project_cache_worker_spec.rb @@ -35,10 +35,10 @@ context 'with an existing project' do it 'refreshes the method caches' do expect_any_instance_of(Repository).to receive(:refresh_method_caches) - .with(%i(readme)) + .with(%i[readme]) .and_call_original - worker.perform(project.id, %w(readme)) + worker.perform(project.id, %w[readme]) end context 'with statistics disabled' do @@ -52,7 +52,7 @@ end context 'with statistics' do - let(:statistics) { %w(repository_size) } + let(:statistics) { %w[repository_size] } it 'updates the project statistics' do expect(worker).to receive(:update_statistics) @@ -69,16 +69,16 @@ allow(Gitlab::MarkupHelper).to receive(:plain?).and_return(true) expect_any_instance_of(Repository).to receive(:refresh_method_caches) - .with(%i(readme)) + .with(%i[readme]) .and_call_original - worker.perform(project.id, %w(readme)) + worker.perform(project.id, %w[readme]) end end end end describe '#update_statistics' do - let(:statistics) { %w(repository_size) } + let(:statistics) { %w[repository_size] } context 'when a lease could not be obtained' do it 'does not update the project statistics' do @@ -120,7 +120,7 @@ end it_behaves_like 'an idempotent worker' do - let(:job_args) { [project.id, %w(readme), %w(repository_size)] } + let(:job_args) { [project.id, %w[readme], %w[repository_size]] } it 'calls Projects::UpdateStatisticsService service twice', :clean_gitlab_redis_shared_state do expect(Projects::UpdateStatisticsService).to receive(:new).once.and_return(double(execute: true)) diff --git a/spec/workers/projects/record_target_platforms_worker_spec.rb b/spec/workers/projects/record_target_platforms_worker_spec.rb index d4515f7727a167a5a4cb8ba66435dc88f020b6ba..23705d0c86ea85fdb16e2bde051e9508f39f7444 100644 --- a/spec/workers/projects/record_target_platforms_worker_spec.rb +++ b/spec/workers/projects/record_target_platforms_worker_spec.rb @@ -10,7 +10,7 @@ let_it_be(:project) { create(:project, :repository, detected_repository_languages: true) } let(:worker) { described_class.new } - let(:service_result) { %w(ios osx watchos) } + let(:service_result) { %w[ios osx watchos] } let(:service_double) { instance_double(Projects::RecordTargetPlatformsService, execute: service_result) } let(:lease_key) { "#{described_class.name.underscore}:#{project.id}" } let(:lease_timeout) { described_class::LEASE_TIMEOUT } diff --git a/spec/workers/stuck_merge_jobs_worker_spec.rb b/spec/workers/stuck_merge_jobs_worker_spec.rb index 44dc6550cdbbacfcf2ede138145d4d374b76834d..03f371ab7400befb56bebc29cc18f178ab40db9b 100644 --- a/spec/workers/stuck_merge_jobs_worker_spec.rb +++ b/spec/workers/stuck_merge_jobs_worker_spec.rb @@ -8,7 +8,7 @@ context 'merge job identified as completed' do it 'updates merge request to merged when locked but has merge_commit_sha' do - allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return(%w(123 456)) + allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return(%w[123 456]) mr_with_sha = create(:merge_request, :locked, merge_jid: '123', state: :locked, merge_commit_sha: 'foo-bar-baz') mr_without_sha = create(:merge_request, :locked, merge_jid: '123', state: :locked, merge_commit_sha: nil) @@ -23,7 +23,7 @@ end it 'updates merge request to opened when locked but has not been merged', :sidekiq_might_not_need_inline do - allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return(%w(123)) + allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return(%w[123]) merge_request = create(:merge_request, :locked, merge_jid: '123', state: :locked) pipeline = create(:ci_empty_pipeline, project: merge_request.project, ref: merge_request.source_branch, sha: merge_request.source_branch_sha) @@ -35,7 +35,7 @@ end it 'logs updated stuck merge job ids' do - allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return(%w(123 456)) + allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return(%w[123 456]) create(:merge_request, :locked, merge_jid: '123') create(:merge_request, :locked, merge_jid: '456') diff --git a/spec/workers/update_project_statistics_worker_spec.rb b/spec/workers/update_project_statistics_worker_spec.rb index c5e6f45a20188953ed317315a7c89bc73168f178..ba0834e64dc5e8a09304ae9e6fe4c8d49bde992c 100644 --- a/spec/workers/update_project_statistics_worker_spec.rb +++ b/spec/workers/update_project_statistics_worker_spec.rb @@ -7,7 +7,7 @@ let(:worker) { described_class.new } let(:project) { create(:project, :repository) } - let(:statistics) { %w(repository_size) } + let(:statistics) { %w[repository_size] } let(:lease_key) { "namespace:namespaces_root_statistics:#{project.namespace_id}" } describe '#perform' do