From 331f9be82a226586a483d95fd418e92ca72babb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 10:05:13 +0000 Subject: [PATCH 1/3] chore(deps-dev): bump knapsack_pro from 6.0.4 to 7.1.0 Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 6.0.4 to 7.1.0. - [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v6.0.4...v7.1.0) --- updated-dependencies: - dependency-name: knapsack_pro dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8ed6b51c08..0ea5cbd11d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -384,7 +384,7 @@ GEM activesupport (>= 4.2) jwt (2.8.1) base64 - knapsack_pro (6.0.4) + knapsack_pro (7.1.0) rake language_server-protocol (3.17.0.3) launchy (3.0.0) From 104357d5b9f1d7817b17b572a906158f2a416fe3 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 8 May 2024 10:54:35 +1000 Subject: [PATCH 2/3] Load spec helper on RSpec boot Knapsack is replacing some of the RSpec logic, like running before-suite and before-all hooks. Loading the spec helper early means that Knapsack knows about the asset compilation hook when it loads the next batch of specs. --- .rspec | 1 + 1 file changed, 1 insertion(+) create mode 100644 .rspec diff --git a/.rspec b/.rspec new file mode 100644 index 0000000000..eb81da86cf --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--require base_spec_helper From 5f07a7f3900bbf4dc8cb9c0d9b46db221daebe54 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 8 May 2024 13:15:14 +1000 Subject: [PATCH 3/3] Check for asset compilation before each spec file The KnapsackPro queue mode can't predict which specs it will run. So we need to check on each file (top-level describe block) which type of spec it is and if we need to compile assets for it. Old versions of KnapsackPro would execute the `before(:suite)` hooks on every batch, but now it's only run once. With this change, we do the same as before. --- spec/support/precompile_assets.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/precompile_assets.rb b/spec/support/precompile_assets.rb index 762a1c27b7..edab33e902 100644 --- a/spec/support/precompile_assets.rb +++ b/spec/support/precompile_assets.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true RSpec.configure do |config| - config.before(:suite) do + config.before(:all) do # We can use webpack-dev-server for tests, too! # Useful if you working on a frontend code fixes and want to verify them via system tests. next if Webpacker.dev_server.running?