From 6c85efef57aeb4f04e90976c6b8914717c9de545 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:48:17 +0000 Subject: [PATCH 1/3] Bump rubocop-govuk from 4.12.0 to 4.13.0 Bumps [rubocop-govuk](https://github.com/alphagov/rubocop-govuk) from 4.12.0 to 4.13.0. - [Changelog](https://github.com/alphagov/rubocop-govuk/blob/main/CHANGELOG.md) - [Commits](https://github.com/alphagov/rubocop-govuk/compare/v4.12.0...v4.13.0) --- updated-dependencies: - dependency-name: rubocop-govuk dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2ad9f5f0..ad04090b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,7 +188,7 @@ GEM irb (1.11.0) rdoc reline (>= 0.3.8) - json (2.6.3) + json (2.7.1) jwt (2.7.1) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -465,8 +465,8 @@ GEM opentelemetry-semantic_conventions opentelemetry-semantic_conventions (1.10.0) opentelemetry-api (~> 1.0) - parallel (1.23.0) - parser (3.2.2.3) + parallel (1.24.0) + parser (3.2.2.4) ast (~> 2.4.1) racc pg (1.5.4) @@ -536,7 +536,7 @@ GEM redis (4.8.1) redis-namespace (1.11.0) redis (>= 4) - regexp_parser (2.8.1) + regexp_parser (2.8.3) reline (0.4.1) io-console (~> 0.5) request_store (1.5.1) @@ -570,37 +570,38 @@ GEM rspec-mocks (~> 3.12) rspec-support (~> 3.12) rspec-support (3.12.1) - rubocop (1.55.0) + rubocop (1.59.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) + rubocop-capybara (2.19.0) rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) + rubocop-factory_bot (2.24.0) rubocop (~> 1.33) - rubocop-govuk (4.12.0) - rubocop (= 1.55.0) - rubocop-ast (= 1.29.0) - rubocop-rails (= 2.20.2) + rubocop-govuk (4.13.0) + rubocop (= 1.59.0) + rubocop-ast (= 1.30.0) + rubocop-rails (= 2.23.0) rubocop-rake (= 0.6.0) - rubocop-rspec (= 2.22.0) - rubocop-rails (2.20.2) + rubocop-rspec (= 2.25.0) + rubocop-rails (2.23.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.22.0) - rubocop (~> 1.33) + rubocop-rspec (2.25.0) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) @@ -636,7 +637,7 @@ GEM timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) user_agent_parser (2.16.0) version_gem (1.1.3) warden (1.2.9) From 24ebbefcbb37cfedb09859c8bb89171fb3df95e0 Mon Sep 17 00:00:00 2001 From: Murilo Dal Ri Date: Fri, 22 Dec 2023 11:41:26 +0000 Subject: [PATCH 2/3] Fixes to appease rubocop --- app/workers/content_item_populate_doctype_worker.rb | 2 +- spec/workers/content_item_populate_doctype_worker_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/workers/content_item_populate_doctype_worker.rb b/app/workers/content_item_populate_doctype_worker.rb index 0c242300..b876f23c 100644 --- a/app/workers/content_item_populate_doctype_worker.rb +++ b/app/workers/content_item_populate_doctype_worker.rb @@ -5,7 +5,7 @@ def perform content_store = GdsApi::ContentStore.new(Plek.find("content-store")) document_type_errors = [] - ContentItem.all.each do |content_item| + ContentItem.find_each do |content_item| found_content_item = content_store.content_item(content_item.path) document_type = found_content_item["document_type"] diff --git a/spec/workers/content_item_populate_doctype_worker_spec.rb b/spec/workers/content_item_populate_doctype_worker_spec.rb index 1329b6d2..d515fdd5 100644 --- a/spec/workers/content_item_populate_doctype_worker_spec.rb +++ b/spec/workers/content_item_populate_doctype_worker_spec.rb @@ -6,7 +6,7 @@ it "updates every content item's `document_type`" do content_item = double("ContentItem", path: "foo") - allow(ContentItem).to receive(:all).and_return([content_item]) + allow(ContentItem).to receive(:find_each).and_yield(content_item) mock_content_store = double("ContentStore", content_item: { "document_type" => "foo_doctype" }) allow(GdsApi::ContentStore).to receive(:new).and_return(mock_content_store) From dafdfd0d0e6dde61934a3885e57c57f6d762fb9d Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Fri, 29 Dec 2023 10:42:39 +0000 Subject: [PATCH 3/3] Auto-update to db/schema.rb after fresh project initialisation --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index aa749dbb..f0e3e578 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2019_01_30_105818) do +ActiveRecord::Schema[7.1].define(version: 2019_01_30_105818) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql"