From 36bcb9dc786c3e2d136cb058bda43ecf9cdf4d68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:15:40 +0000 Subject: [PATCH 01/46] Bump @sentry/browser from 7.104.0 to 7.105.0 (#2273) --- package.json | 2 +- yarn.lock | 140 +++++++++++++++++++++++++-------------------------- 2 files changed, 71 insertions(+), 71 deletions(-) diff --git a/package.json b/package.json index 30c9a0eda..41f39f024 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@rails/actioncable": "^7.1.3", "@rails/actiontext": "^7.1.3", "@rails/activestorage": "^7.1.3", - "@sentry/browser": "^7.104.0", + "@sentry/browser": "^7.105.0", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.10", "@webpack-cli/serve": "^2.0.5", diff --git a/yarn.lock b/yarn.lock index f292d935a..173bec5fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -413,76 +413,76 @@ dependencies: spark-md5 "^3.0.1" -"@sentry-internal/feedback@7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.104.0.tgz#a2abcfcba3ecd2e6798078bc54841c0146e72b85" - integrity sha512-+OWqm+X9ZfEQQmxVoZsc9lpzd85pabAT+bEj57StRMTnfdRbD9TippS20nCD9N2Ql5v2/41NfiPONMejGbnOwg== - dependencies: - "@sentry/core" "7.104.0" - "@sentry/types" "7.104.0" - "@sentry/utils" "7.104.0" - -"@sentry-internal/replay-canvas@7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.104.0.tgz#08fa83c150a1e512f138013fc293bf63955ac1a1" - integrity sha512-gfdnkFIpxAveKNghkvRCqv+hSiBkxYVoyFZLTvUPuM9Cmvmket1/PpnuWMC2jNtCEewG3gxkPDd4EaT9oa1HZQ== - dependencies: - "@sentry/core" "7.104.0" - "@sentry/replay" "7.104.0" - "@sentry/types" "7.104.0" - "@sentry/utils" "7.104.0" - -"@sentry-internal/tracing@7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.104.0.tgz#f5ec0194b7954a92c8e53247bb9b7183bec79abf" - integrity sha512-2z7OijM1J5ndJUiJJElC3iH9qb/Eb8eYm2v8oJhM8WVdc5uCKfrQuYHNgGOnmY2FOCfEUlTmMQGpDw7DJ67L5w== - dependencies: - "@sentry/core" "7.104.0" - "@sentry/types" "7.104.0" - "@sentry/utils" "7.104.0" - -"@sentry/browser@^7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.104.0.tgz#8d67bd90645099ad9ed4620df166cfbe6dd53e91" - integrity sha512-HsqO+mr1SowGoP0VbuWrQ2DZT0t5PLomy7LEYa6+4lbOemnY+5YV2NSwBTKbjYysvKipSwaRtPhXrsXsMaz8Bg== - dependencies: - "@sentry-internal/feedback" "7.104.0" - "@sentry-internal/replay-canvas" "7.104.0" - "@sentry-internal/tracing" "7.104.0" - "@sentry/core" "7.104.0" - "@sentry/replay" "7.104.0" - "@sentry/types" "7.104.0" - "@sentry/utils" "7.104.0" - -"@sentry/core@7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.104.0.tgz#2c6ce6eb6a84b8015bffb25e906407ec1d81a224" - integrity sha512-XPndD6IGQGd07/EntvYVzOWQUo/Gd7L3DwYFeEKeBv6ByWjbBNmVZFRhU0GPPsCHKyW9yMU9OO9diLSS4ijsRg== - dependencies: - "@sentry/types" "7.104.0" - "@sentry/utils" "7.104.0" - -"@sentry/replay@7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.104.0.tgz#de570a5a8cc59671b0e56944d6978809d896f07f" - integrity sha512-HmWBr/u+SNeULxCxM8lJb2iqhjizeLGJtuKSShPEguEXIUT4kzdoqLh6wn7BAjiKzhmyjrnBcosR5LUqJtGYZQ== - dependencies: - "@sentry-internal/tracing" "7.104.0" - "@sentry/core" "7.104.0" - "@sentry/types" "7.104.0" - "@sentry/utils" "7.104.0" - -"@sentry/types@7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.104.0.tgz#f4458ede188b422827de71e605e7c1faf940103e" - integrity sha512-5bs0xe0+GZR4QBm9Nrqw59o0sv3kBtCosrZDVxBru/dQbrfnB+/kVorvuM0rV3+coNITTKcKDegSZmK1d2uOGQ== - -"@sentry/utils@7.104.0": - version "7.104.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.104.0.tgz#2dec1a3cf2c0bc17e1c14cffab056d5bff15f197" - integrity sha512-ZVg+xZirI9DlOi0NegNVocswdh/8p6QkzlQzDQY2LP2CC6JQdmwi64o0S4rPH4YIHNKQJTpIjduoxeKgd1EO5g== - dependencies: - "@sentry/types" "7.104.0" +"@sentry-internal/feedback@7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.105.0.tgz#f2a25b55e5368509cfd540c21e74503568492057" + integrity sha512-17doUQFKYgLfG7EmZXjZQ7HR/aBzuLDd+GVaCNthUPyiz/tltV7EFECDWwHpXqzQgYRgroSbY8PruMVujFGUUw== + dependencies: + "@sentry/core" "7.105.0" + "@sentry/types" "7.105.0" + "@sentry/utils" "7.105.0" + +"@sentry-internal/replay-canvas@7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.105.0.tgz#fed7d67d976837ef7c1b72a6db461179703fa6f5" + integrity sha512-XMBdkjIDhap5Gwrub5wlUJhuUVJM4aL4lZV8KcxJZZSXgXsnyGYbEh9SPZOHO05jtbxTxVeL3Pik5qtYjdGnPA== + dependencies: + "@sentry/core" "7.105.0" + "@sentry/replay" "7.105.0" + "@sentry/types" "7.105.0" + "@sentry/utils" "7.105.0" + +"@sentry-internal/tracing@7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.105.0.tgz#9cb06f8281454343215cfe4b119c8198f032ec72" + integrity sha512-b+AFYB7Bc9vmyxl2jbmuT4esX5G0oPfpz35A0sxFzmJIhvMg1YMDNio2c81BtKN+VSPORCnKMLhfk3kyKKvWMQ== + dependencies: + "@sentry/core" "7.105.0" + "@sentry/types" "7.105.0" + "@sentry/utils" "7.105.0" + +"@sentry/browser@^7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.105.0.tgz#3eb56785cfc1cf58528b29ea954b73093e6f9481" + integrity sha512-OlYJzsZG109T1VpZ7O7KXf9IXCUUpp41lkkQM7ICBOBsfiHRUKmV5piTGCG5UgAvyb/gI/I1uQQtO4jthcHKEA== + dependencies: + "@sentry-internal/feedback" "7.105.0" + "@sentry-internal/replay-canvas" "7.105.0" + "@sentry-internal/tracing" "7.105.0" + "@sentry/core" "7.105.0" + "@sentry/replay" "7.105.0" + "@sentry/types" "7.105.0" + "@sentry/utils" "7.105.0" + +"@sentry/core@7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.105.0.tgz#89db519dd9aa7326de63a7eaccf861de3769ab1c" + integrity sha512-5xsaTG6jZincTeJUmZomlv20mVRZUEF1U/g89lmrSOybyk2+opEnB1JeBn4ODwnvmSik8r2QLr6/RiYlaxRJCg== + dependencies: + "@sentry/types" "7.105.0" + "@sentry/utils" "7.105.0" + +"@sentry/replay@7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.105.0.tgz#61784e3e88afa66a0d9b1b9d222153ab54ea4bd0" + integrity sha512-hZD2m6fNL9gorUOaaEpqxeH7zNP4y2Ej0TdieM1HMQ2q9Zrm9yOzk9/7ALfbRLIZFRMFTqo9vvVztLs3E+Hx+g== + dependencies: + "@sentry-internal/tracing" "7.105.0" + "@sentry/core" "7.105.0" + "@sentry/types" "7.105.0" + "@sentry/utils" "7.105.0" + +"@sentry/types@7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.105.0.tgz#51dadb7ad650e883459acf18df2ecbb5b4b6e5c2" + integrity sha512-80o0KMVM+X2Ym9hoQxvJetkJJwkpCg7o6tHHFXI+Rp7fawc2iCMTa0IRQMUiSkFvntQLYIdDoNNuKdzz2PbQGA== + +"@sentry/utils@7.105.0": + version "7.105.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.105.0.tgz#727187d252b97cb9e6c78bcdd0e9a1d14e60f313" + integrity sha512-YVAV0c2KLM8+VZCicQ/E/P2+J9Vs0hGhrXwV7w6ZEAtvxrg4oF270toL1WRhvcaf8JO4J1v4V+LuU6Txs4uEeQ== + dependencies: + "@sentry/types" "7.105.0" "@sindresorhus/merge-streams@^1.0.0": version "1.0.0" From ed7fdb83958f3f86040b25a5584552fb2cfc8c1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:23:19 +0000 Subject: [PATCH 02/46] Bump rubocop-rspec from 2.26.1 to 2.27.0 (#2260) --- Gemfile.lock | 12 ++++++------ app/models/neighborhood/time_zone_mixin.rb | 4 ++-- spec/furniture/journal/entry_spec.rb | 2 +- spec/support/turbo.rb | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3f9c58b0a..114826fd7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -409,7 +409,7 @@ GEM rswag-ui (2.13.0) actionpack (>= 3.1, < 7.2) railties (>= 3.1, < 7.2) - rubocop (1.60.2) + rubocop (1.61.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -420,12 +420,12 @@ GEM rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) + rubocop-ast (1.31.1) + parser (>= 3.3.0.4) rubocop-capybara (2.20.0) rubocop (~> 1.41) - rubocop-factory_bot (2.25.0) - rubocop (~> 1.33) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) rubocop-performance (1.20.2) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) @@ -434,7 +434,7 @@ GEM rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rspec (2.26.1) + rubocop-rspec (2.27.0) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) diff --git a/app/models/neighborhood/time_zone_mixin.rb b/app/models/neighborhood/time_zone_mixin.rb index 1a609a3f1..9d12fa5e3 100644 --- a/app/models/neighborhood/time_zone_mixin.rb +++ b/app/models/neighborhood/time_zone_mixin.rb @@ -3,8 +3,8 @@ module TimeZoneMixin # This is probably not the end-result we're going for; but it is a start # We will probably want to fall-back to the current_person, then browser, then current_space time zones once we # gain access to them. - def set_time_zone(&block) - Time.use_zone(ENV.fetch("NEIGHBORHOOD_TIME_ZONE"), &block) + def set_time_zone(&) + Time.use_zone(ENV.fetch("NEIGHBORHOOD_TIME_ZONE"), &) end def self.included(controller_or_job) diff --git a/spec/furniture/journal/entry_spec.rb b/spec/furniture/journal/entry_spec.rb index 840bbeb76..ddaead8e9 100644 --- a/spec/furniture/journal/entry_spec.rb +++ b/spec/furniture/journal/entry_spec.rb @@ -34,7 +34,7 @@ it "idempotently creates `Keywords` in the `Journal` and `Entry`" do bad_apple = entry.journal.keywords.create!(canonical_keyword: "BadApple", aliases: ["BadApples"]) good_times = entry.journal.keywords.find_by!(canonical_keyword: "GoodTimes") - expect do + expect do # rubocop:disable RSpec/RepeatedSubjectCall entry.update!(body: "#GoodTimes #HardCider #BadApple #BadApples") end.not_to change { "#{bad_apple.reload.updated_at} - #{good_times.reload.updated_at}" } diff --git a/spec/support/turbo.rb b/spec/support/turbo.rb index eb070266c..1dbca9b37 100644 --- a/spec/support/turbo.rb +++ b/spec/support/turbo.rb @@ -1,7 +1,7 @@ module Spec module Turbo - def have_rendered_turbo_stream(action, target, content = nil, **, &block) - HaveRenderedTurboStream.new(action, target, content, turbo_stream: controller.send(:turbo_stream), **, &block) + def have_rendered_turbo_stream(action, target, content = nil, **, &) + HaveRenderedTurboStream.new(action, target, content, turbo_stream: controller.send(:turbo_stream), **, &) end class HaveRenderedTurboStream From 08a3f5ab0aeb3e5fecb20519c03437c150074b0f Mon Sep 17 00:00:00 2001 From: Zee <50284+zspencer@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:30:36 -0800 Subject: [PATCH 03/46] =?UTF-8?q?=F0=9F=93=9D=20Add=20`redis`=20to=20our?= =?UTF-8?q?=20set=20of=20dependencies=20(#2274)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/zinc-collective/convene/issues/1520 Also fixes a broken link to PostgreSQL. --- CONTRIBUTING.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 23e38e15d..4ba7360b4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,8 +66,11 @@ First, ensure your development environment has: 1. Ruby (See [.ruby-version](./.ruby-version) for version) 2. Node (See [.nvmrc](./.nvmrc) for version) 3. [Yarn] -4. [PostgreSQL]. (Note: For people using [Docker], a [docker-compose.yml] - file has been included for convenience.) +4. [PostgreSQL] +5. [Redis] + +(Note: If you use [Docker], a [docker-compose.yml] file has been included with + [PostgreSQL] and [Redis] for convenience.) Then, run `bin/setup` to install Ruby and Node dependencies and set up the database. @@ -83,7 +86,8 @@ Log in with space-member@example.com. You can check the email using http://local Finally, with the server still running (perhaps in a different terminal), run `bin/test` to ensure that your development environment is configured correctly. -[PostgreSQL 12]: https://www.postgresql.org/download/ +[PostgreSQL]: https://www.postgresql.org/ +[Redis]: https://redis.io/ [Docker]: https://www.docker.com [docker-compose.yml]: ./docker-compose.yml [.env.development.example]: ./.env.development.example From 8ab67b0788921ded28f3dc9aa39de879d2903d4a Mon Sep 17 00:00:00 2001 From: Ross Chapman Date: Mon, 4 Mar 2024 15:34:41 -0800 Subject: [PATCH 04/46] Adds webpack bundle analyzer and cli scripts (#2248) --- .gitignore | 6 ++- package.json | 8 +++- yarn.lock | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 753b67f2e..7a316168d 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,8 @@ app/assets/builds/* .devcontainer/output -TAGS +# # Ignore Bust A Gem VSCode extension ctags generation. +/TAGS + +# Webpack Bundle Analyzer +webpack-stats.json diff --git a/package.json b/package.json index 41f39f024..e8d5b5614 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,10 @@ "scripts": { "build": "webpack --config webpack.config.js", "build:css": "postcss --config postcss.config.cjs ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css", - "autoformat": "prettier --write './**/*.{scss,css,js}'" + "autoformat": "prettier --write './**/*.{scss,css,js}'", + "webpack:analyze": "yarn webpack:build_json && yarn webpack:analyze_json", + "webpack:build_json": "webpack --profile --json > webpack-stats.json", + "webpack:analyze_json": "webpack-bundle-analyzer webpack-stats.json public/packs" }, "repository": { "type": "git", @@ -29,7 +32,8 @@ }, "homepage": "https://github.com/zinc-collective/convene#readme", "devDependencies": { - "prettier": "^3.2.5" + "prettier": "^3.2.5", + "webpack-bundle-analyzer": "^4.10.1" }, "dependencies": { "@hotwired/stimulus": "^3.2.2", diff --git a/yarn.lock b/yarn.lock index 173bec5fc..041a0fb9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -296,6 +296,11 @@ resolved "https://registry.yarnpkg.com/@csstools/utilities/-/utilities-1.0.0.tgz#42f3c213f2fb929324d465684ab9f46a0febd4bb" integrity sha512-tAgvZQe/t2mlvpNosA4+CkMiZ2azISW5WPAcdSalZlEjQvUfghHxfQcrCiK/7/CrfAWVxyM88kGFYO82heIGDg== +"@discoveryjs/json-ext@0.5.7": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + "@discoveryjs/json-ext@^0.5.0": version "0.5.5" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.5.tgz#9283c9ce5b289a3c4f61c12757469e59377f81f3" @@ -394,6 +399,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@polka/url@^1.0.0-next.24": + version "1.0.0-next.24" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3" + integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ== + "@rails/actioncable@^7.0", "@rails/actioncable@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-7.1.3.tgz#4db480347775aeecd4dde2405659eef74a458881" @@ -693,6 +703,16 @@ acorn-import-assertions@^1.7.6: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== +acorn-walk@^8.0.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + +acorn@^8.0.4: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + acorn@^8.5.0: version "8.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" @@ -880,6 +900,11 @@ commander@^4.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -925,6 +950,11 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== +debounce@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" + integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== + dependency-graph@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" @@ -940,6 +970,11 @@ dlv@^1.1.3: resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== +duplexer@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + electron-to-chromium@^1.4.668: version "1.4.675" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.675.tgz#9e612a5339e3c9f884982478a8aaf2da3ab6ec7d" @@ -973,6 +1008,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -1143,6 +1183,13 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +gzip-size@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" + integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== + dependencies: + duplexer "^0.1.2" + has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -1155,6 +1202,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +html-escaper@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + ignore@^5.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" @@ -1229,6 +1281,11 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -1386,6 +1443,11 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +mrmime@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" + integrity sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw== + mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -1437,6 +1499,11 @@ once@^1.3.0: dependencies: wrappy "1" +opener@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" + integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== + p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -2007,6 +2074,15 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +sirv@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" + integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== + dependencies: + "@polka/url" "^1.0.0-next.24" + mrmime "^2.0.0" + totalist "^3.0.0" + slash@^5.0.0, slash@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" @@ -2151,6 +2227,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +totalist@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== + trix@^2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/trix/-/trix-2.0.10.tgz#43f1ff7a94c42f708bd2bad3a2783147c0583698" @@ -2199,6 +2280,25 @@ watchpack@^2.4.0: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" +webpack-bundle-analyzer@^4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz#84b7473b630a7b8c21c741f81d8fe4593208b454" + integrity sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ== + dependencies: + "@discoveryjs/json-ext" "0.5.7" + acorn "^8.0.4" + acorn-walk "^8.0.0" + commander "^7.2.0" + debounce "^1.2.1" + escape-string-regexp "^4.0.0" + gzip-size "^6.0.0" + html-escaper "^2.0.2" + is-plain-object "^5.0.0" + opener "^1.5.2" + picocolors "^1.0.0" + sirv "^2.0.3" + ws "^7.3.1" + webpack-cli@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" @@ -2288,6 +2388,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +ws@^7.3.1: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" From c871752ea531ce1f6bba8d442477d381f6766c03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:51:43 +0000 Subject: [PATCH 05/46] Bump rubocop-rails from 2.23.1 to 2.24.0 (#2276) --- Gemfile.lock | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 114826fd7..74653d93f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -172,8 +172,7 @@ GEM dotenv-rails (2.8.1) dotenv (= 2.8.1) railties (>= 3.2) - drb (2.2.0) - ruby2_keywords + drb (2.2.1) erubi (1.12.0) factory_bot (6.4.5) activesupport (>= 5.0.0) @@ -429,11 +428,11 @@ GEM rubocop-performance (1.20.2) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rails (2.23.1) + rubocop-rails (2.24.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (2.27.0) rubocop (~> 1.40) rubocop-capybara (~> 2.17) @@ -443,7 +442,6 @@ GEM ruby-progressbar (1.13.0) ruby-vips (2.1.4) ffi (~> 1.12) - ruby2_keywords (0.0.5) rubyzip (2.3.2) selenium-webdriver (4.18.1) base64 (~> 0.2) From 05062ba53312f8db62c6a81a8cc11774b65ca6d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:56:57 +0000 Subject: [PATCH 06/46] Bump rubocop-rspec from 2.27.0 to 2.27.1 (#2275) --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 74653d93f..66acc8de3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -433,7 +433,7 @@ GEM rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (2.27.0) + rubocop-rspec (2.27.1) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) From cd02f04154e76c0a35a4269d6a07105b6e40be67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:57:55 +0000 Subject: [PATCH 07/46] Bump dotenv-rails from 2.8.1 to 3.1.0 (#2252) --- Gemfile.lock | 12 ++++++------ spec/components/neighborhood/link_component_spec.rb | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 66acc8de3..632f9bd9d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -168,10 +168,10 @@ GEM discard (1.3.0) activerecord (>= 4.2, < 8) docile (1.4.0) - dotenv (2.8.1) - dotenv-rails (2.8.1) - dotenv (= 2.8.1) - railties (>= 3.2) + dotenv (3.1.0) + dotenv-rails (3.1.0) + dotenv (= 3.1.0) + railties (>= 6.1) drb (2.2.1) erubi (1.12.0) factory_bot (6.4.5) @@ -371,7 +371,7 @@ GEM redis-client (0.20.0) connection_pool regexp_parser (2.9.0) - reline (0.4.2) + reline (0.4.3) io-console (~> 0.5) rexml (3.2.6) rotp (6.3.0) @@ -498,7 +498,7 @@ GEM stripe (10.11.0) strong_migrations (1.7.0) activerecord (>= 5.2) - thor (1.3.0) + thor (1.3.1) timeout (0.4.1) turbo-rails (2.0.4) actionpack (>= 6.0.0) diff --git a/spec/components/neighborhood/link_component_spec.rb b/spec/components/neighborhood/link_component_spec.rb index c1eb1495a..7451d00fb 100644 --- a/spec/components/neighborhood/link_component_spec.rb +++ b/spec/components/neighborhood/link_component_spec.rb @@ -12,7 +12,9 @@ context "when an Operator has set custom values" do before do - stub_const("ENV", "NEIGHBORHOOD_NAME" => "Parsley's Persimmons Cooperative", "NEIGHBORHOOD_TAGLINE" => "The Place for Persimmon People", "APP_ROOT_URL" => "https://parsleys-persimmons-coop.example.com") + ENV["NEIGHBORHOOD_NAME"] = "Parsley's Persimmons Cooperative" + ENV["NEIGHBORHOOD_TAGLINE"] = "The Place for Persimmon People" + ENV["APP_ROOT_URL"] = "https://parsleys-persimmons-coop.example.com" end it { is_expected.to have_link("Parsley's Persimmons Cooperative", href: "https://parsleys-persimmons-coop.example.com") } From 918c15175aa88d15ab7344a91ac08b2006b3b85e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:35:20 +0000 Subject: [PATCH 08/46] Bump pagy from 7.0.8 to 7.0.9 (#2277) --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 632f9bd9d..e6f2ec1a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -292,7 +292,7 @@ GEM nokogiri (1.16.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) - pagy (7.0.8) + pagy (7.0.9) parallel (1.24.0) parser (3.3.0.5) ast (~> 2.4.1) From 2ec9e898fa2550ca31694ef5f64a977e911021db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:10:06 +0000 Subject: [PATCH 09/46] Bump postcss-preset-env from 9.4.0 to 9.5.0 (#2279) --- package.json | 2 +- yarn.lock | 48 +++++++++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index e8d5b5614..08ea8d0ce 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "postcss-cli": "^11.0.0", "postcss-flexbugs-fixes": "^5.0.2", "postcss-import": "^16.0.1", - "postcss-preset-env": "^9.4.0", + "postcss-preset-env": "^9.5.0", "tailwindcss": "^3.4.1", "trix": "^2.0.10", "webpack": "^5.76.0", diff --git a/yarn.lock b/yarn.lock index 041a0fb9f..a85fd9561 100644 --- a/yarn.lock +++ b/yarn.lock @@ -101,10 +101,10 @@ "@csstools/css-parser-algorithms" "^2.6.0" "@csstools/css-tokenizer" "^2.2.3" -"@csstools/postcss-gradients-interpolation-method@^4.0.10": - version "4.0.10" - resolved "https://registry.yarnpkg.com/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-4.0.10.tgz#0228a9a2c652c1976358f9731bea0ea4de4bf979" - integrity sha512-PwKOxVuX8lo52bPtPeKjaIp6oH2EzhcBxCndRcvGZKsqZYQ35k9A5G4yihZ+wp7PoxPqDNiXuhQsvQG2lqMpOA== +"@csstools/postcss-gradients-interpolation-method@^4.0.11": + version "4.0.11" + resolved "https://registry.yarnpkg.com/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-4.0.11.tgz#4e6cf5d6917672058d532d963c709e3776b9ab36" + integrity sha512-LFom5jCVUfzF+iuiOZvhvX7RRN8vc+tKpcKo9s4keEBAU2mPwV5/Fgz5iylEfXP/DZbEdq2C0At20urMi/lupw== dependencies: "@csstools/css-color-parser" "^1.5.2" "@csstools/css-parser-algorithms" "^2.6.0" @@ -286,6 +286,11 @@ resolved "https://registry.yarnpkg.com/@csstools/postcss-unset-value/-/postcss-unset-value-3.0.1.tgz#598a25630fd9ab0edf066d235916f7441404942a" integrity sha512-dbDnZ2ja2U8mbPP0Hvmt2RMEGBiF1H7oY6HYSpjteXJGihYwgxgTr6KRbbJ/V6c+4wd51M+9980qG4gKVn5ttg== +"@csstools/selector-resolve-nested@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@csstools/selector-resolve-nested/-/selector-resolve-nested-1.1.0.tgz#d872f2da402d3ce8bd0cf16ea5f9fba76b18e430" + integrity sha512-uWvSaeRcHyeNenKg8tp17EVDRkpflmdyvbE0DHo6D/GdBb6PDnCYYU6gRpXhtICMGMcahQmj2zGxwFM/WC8hCg== + "@csstools/selector-specificity@^3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-3.0.2.tgz#ea61ba7bb24be3502c6aaa3190ed231f4633a81e" @@ -768,7 +773,7 @@ arg@^5.0.2: resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== -autoprefixer@^10.4.17, autoprefixer@^10.4.18: +autoprefixer@^10.4.18: version "10.4.18" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.18.tgz#fcb171a3b017be7cb5d8b7a825f5aacbf2045163" integrity sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g== @@ -940,10 +945,10 @@ css-prefers-color-scheme@^9.0.1: resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-9.0.1.tgz#30fcb94cc38b639b66fb99e1882ffd97f741feaa" integrity sha512-iFit06ochwCKPRiWagbTa1OAWCvWWVdEnIFd8BaRrgO8YrrNh4RAWUQTFcYX5tdFZgFl1DJ3iiULchZyEbnF4g== -cssdb@^7.11.0: - version "7.11.0" - resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-7.11.0.tgz#26570bbc92251b719cd74468df710d86c554117f" - integrity sha512-YUVAJhjDcTZzVD5XE49l3PQtGE29vvhzaL1bM3BtkvSmIRJeYENdfn1dn5jauBI7BBF+IyyiBS+oSVx3Hz/Gaw== +cssdb@^7.11.1: + version "7.11.1" + resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-7.11.1.tgz#491841b281d337d7e5332e43b282429dd241b377" + integrity sha512-F0nEoX/Rv8ENTHsjMPGHd9opdjGfXkgRBafSUGnQKPzGZFB7Lm0BbT10x21TMOCrKLbVsJ0NoCDMk6AfKqw8/A== cssesc@^3.0.0: version "3.0.0" @@ -1789,11 +1794,12 @@ postcss-nested@^6.0.1: dependencies: postcss-selector-parser "^6.0.11" -postcss-nesting@^12.0.3: - version "12.0.3" - resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-12.0.3.tgz#ee451e5d2dc3f9f09d68434ddc7ad9d42b7f44e9" - integrity sha512-yrtMRPFNkfZMv9ikBvZ/Eh3RxhpMBKQ3KzD7LCY8+jYVlgju/Mdcxi4JY8bW2Y7ISXw8GTLuF/o+kFtp+yaVfQ== +postcss-nesting@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-12.1.0.tgz#9ecca8da9d0bbfdaa47d3608ccf5ac48bfdfc0d2" + integrity sha512-QOYnosaZ+mlP6plQrAxFw09UUp2Sgtxj1BVHN+rSVbtV0Yx48zRt9/9F/ZOoxOKBBEsaJk2MYhhVRjeRRw5yuw== dependencies: + "@csstools/selector-resolve-nested" "^1.1.0" "@csstools/selector-specificity" "^3.0.2" postcss-selector-parser "^6.0.13" @@ -1821,10 +1827,10 @@ postcss-place@^9.0.1: dependencies: postcss-value-parser "^4.2.0" -postcss-preset-env@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-9.4.0.tgz#9896efc0e9896d68316adcf2d314d36f38f04bba" - integrity sha512-5X2UA4Dn4xo7sJFCxlzW/dAGo71Oxh/K5DVls33hd2e3j06OKnW5FJQTw2hB0wTnGv0f6WcMaVBGFqcEfAgwlw== +postcss-preset-env@^9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-9.5.0.tgz#716001c174e0e5283347114805281ca2b4dc7444" + integrity sha512-ZTrTWCSqKVYSABB1GerMBb6F8Uto5YWIq1nqi+TKOHPzrXMcyJNuJTc0v2lp5WjG4Sfvwdo7HF/7/3j7HskRog== dependencies: "@csstools/postcss-cascade-layers" "^4.0.3" "@csstools/postcss-color-function" "^3.0.10" @@ -1832,7 +1838,7 @@ postcss-preset-env@^9.4.0: "@csstools/postcss-exponential-functions" "^1.0.4" "@csstools/postcss-font-format-keywords" "^3.0.2" "@csstools/postcss-gamut-mapping" "^1.0.3" - "@csstools/postcss-gradients-interpolation-method" "^4.0.10" + "@csstools/postcss-gradients-interpolation-method" "^4.0.11" "@csstools/postcss-hwb-function" "^3.0.9" "@csstools/postcss-ic-unit" "^3.0.4" "@csstools/postcss-initial" "^1.0.1" @@ -1855,12 +1861,12 @@ postcss-preset-env@^9.4.0: "@csstools/postcss-text-decoration-shorthand" "^3.0.4" "@csstools/postcss-trigonometric-functions" "^3.0.5" "@csstools/postcss-unset-value" "^3.0.1" - autoprefixer "^10.4.17" + autoprefixer "^10.4.18" browserslist "^4.22.3" css-blank-pseudo "^6.0.1" css-has-pseudo "^6.0.2" css-prefers-color-scheme "^9.0.1" - cssdb "^7.11.0" + cssdb "^7.11.1" postcss-attribute-case-insensitive "^6.0.3" postcss-clamp "^4.1.0" postcss-color-functional-notation "^6.0.5" @@ -1878,7 +1884,7 @@ postcss-preset-env@^9.4.0: postcss-image-set-function "^6.0.3" postcss-lab-function "^6.0.10" postcss-logical "^7.0.1" - postcss-nesting "^12.0.3" + postcss-nesting "^12.1.0" postcss-opacity-percentage "^2.0.0" postcss-overflow-shorthand "^5.0.1" postcss-page-break "^3.0.4" From 491e920ae5d0d140faeda5d1563d4e021f219b92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:10:17 +0000 Subject: [PATCH 10/46] Bump lookbook from 2.2.1 to 2.2.2 (#2278) --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e6f2ec1a3..d92ef5b09 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -208,9 +208,9 @@ GEM actionview (>= 5.1, < 7.2) railties (>= 5.1, < 7.2) hashdiff (1.1.0) - htmlbeautifier (1.4.2) + htmlbeautifier (1.4.3) htmlentities (4.3.4) - i18n (1.14.1) + i18n (1.14.4) concurrent-ruby (~> 1.0) i18n-debug (1.2.0) i18n (< 2) @@ -239,7 +239,7 @@ GEM loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lookbook (2.2.1) + lookbook (2.2.2) activemodel css_parser htmlbeautifier (~> 1.3) @@ -249,14 +249,14 @@ GEM redcarpet (~> 3.5) rouge (>= 3.26, < 5.0) view_component (>= 2.0) - yard (~> 0.9.25) + yard (~> 0.9) zeitwerk (~> 2.5) mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) method_source (1.0.0) mini_magick (4.12.0) From a9689316e3f29276abc50526f89c2c48906197b4 Mon Sep 17 00:00:00 2001 From: Ana Ulin Date: Wed, 6 Mar 2024 18:28:48 -0800 Subject: [PATCH 11/46] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Update=20to=20lat?= =?UTF-8?q?est=20Ruby=20and=20Bundler=20version=20(#2280)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update to the latest Ruby version. * Update Bundler. --- .ruby-version | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ruby-version b/.ruby-version index b347b11ea..15a279981 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.3 +3.3.0 diff --git a/Gemfile.lock b/Gemfile.lock index d92ef5b09..485fa4806 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -600,7 +600,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.2.3p157 + ruby 3.3.0p0 BUNDLED WITH - 2.4.12 + 2.5.6 From 41f7ad55cebefc3192832f4dea7c1d211e0628c2 Mon Sep 17 00:00:00 2001 From: Zee Spencer <50284+zspencer@users.noreply.github.com> Date: Wed, 6 Mar 2024 18:39:53 -0800 Subject: [PATCH 12/46] =?UTF-8?q?=F0=9F=A7=B9=20Stop=20enforcing=20short?= =?UTF-8?q?=20system=20specs!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .rubocop.yml | 10 ++++++++++ spec/furniture/journal/writing_entries_system_spec.rb | 2 +- .../marketplace/buying_products_system_spec.rb | 2 +- .../marketplace/collecting_payments_system_spec.rb | 2 +- .../marketplace/selling_products_system_spec.rb | 2 +- .../marketplace/vendor_representatives_system_spec.rb | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index fedd29ec9..db04b00a7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -18,6 +18,12 @@ AllCops: - vendor/bundle/**/* NewCops: enable + +RSpec/Capybara/FeatureMethods: + Exclude: + - '**/*_system_spec.rb' + - spec/system/**/*_spec.rb + RSpec/MultipleExpectations: Enabled: false @@ -29,6 +35,10 @@ RSpec/NestedGroups: RSpec/ExampleLength: Max: 10 + Exclude: + - '**/*_system_spec.rb' + - spec/system/**/*_spec.rb + Style/TrailingCommaInArrayLiteral: Exclude: diff --git a/spec/furniture/journal/writing_entries_system_spec.rb b/spec/furniture/journal/writing_entries_system_spec.rb index bd4be88d4..8cef2b6a0 100644 --- a/spec/furniture/journal/writing_entries_system_spec.rb +++ b/spec/furniture/journal/writing_entries_system_spec.rb @@ -9,7 +9,7 @@ sign_in(space.members.first, space) end - it "saves the headline, summary and body" do # rubocop:disable RSpec/ExampleLength + it "saves the headline, summary and body" do visit(polymorphic_path(journal.location(:new, child: :entry))) body = 1000.times.map { Faker::Books::Dune.quote }.join("\n\n") diff --git a/spec/furniture/marketplace/buying_products_system_spec.rb b/spec/furniture/marketplace/buying_products_system_spec.rb index 7201f4d6a..9d316fc39 100644 --- a/spec/furniture/marketplace/buying_products_system_spec.rb +++ b/spec/furniture/marketplace/buying_products_system_spec.rb @@ -71,7 +71,7 @@ def url_options expect(page).to have_no_content(archived_product.name) end - it "Works for Guests" do # rubocop:disable RSpec/ExampleLength + it "Works for Guests" do visit(polymorphic_path(marketplace.room.location)) add_product_to_cart(marketplace.products.first) diff --git a/spec/furniture/marketplace/collecting_payments_system_spec.rb b/spec/furniture/marketplace/collecting_payments_system_spec.rb index 56e98f17f..801a30bfe 100644 --- a/spec/furniture/marketplace/collecting_payments_system_spec.rb +++ b/spec/furniture/marketplace/collecting_payments_system_spec.rb @@ -10,7 +10,7 @@ sign_in(space.members.first, space) end - it "sets the Distributor's Stripe API Key" do # rubocop:disable RSpec/ExampleLength + it "sets the Distributor's Stripe API Key" do marketplace = create(:marketplace, room: space.entrance) visit polymorphic_path(marketplace.room.location) diff --git a/spec/furniture/marketplace/selling_products_system_spec.rb b/spec/furniture/marketplace/selling_products_system_spec.rb index cf8b7eb6f..2d3cf194f 100644 --- a/spec/furniture/marketplace/selling_products_system_spec.rb +++ b/spec/furniture/marketplace/selling_products_system_spec.rb @@ -16,7 +16,7 @@ # @see https://github.com/zinc-collective/convene/issues/2168 describe "Listing Products for Sale" do - it "Adds the Product to the Menu" do # rubocop:disable RSpec/ExampleLength + it "Adds the Product to the Menu" do visit(polymorphic_path(marketplace.location(child: :products))) click_link("Add a Product") diff --git a/spec/furniture/marketplace/vendor_representatives_system_spec.rb b/spec/furniture/marketplace/vendor_representatives_system_spec.rb index 3eafa5de8..0f7904d50 100644 --- a/spec/furniture/marketplace/vendor_representatives_system_spec.rb +++ b/spec/furniture/marketplace/vendor_representatives_system_spec.rb @@ -10,7 +10,7 @@ end describe "Adding a Vendor Representative" do - it "Requires a Member confirm the Vendor" do # rubocop:disable RSpec/ExampleLength + it "Requires a Member confirm the Vendor" do visit(polymorphic_path(marketplace.location(child: :vendor_representatives))) click_link("Add a Representative") fill_in("Email address", with: "milton@swingline.example.com") From 86524fe274295865668041a51900f6a7f51d1ae1 Mon Sep 17 00:00:00 2001 From: Zee <50284+zspencer@users.noreply.github.com> Date: Wed, 6 Mar 2024 18:42:30 -0800 Subject: [PATCH 13/46] =?UTF-8?q?=E2=9C=A8=20`Marketplace`:=20Add=20`Produ?= =?UTF-8?q?ct#tags`=20(#2190)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/zinc-collective/convene/issues/2189 Lil' quick sketch through the workflow. Only interesting things of note here are I am using `scenario` syntax (which feels better to me, and was validated by @ExMember in antoher context yesterday.) I am also doing something "weird" where I overload the `visit` method to rely on our `Record#location` method to interject a `polymorphic_path` call; saving us the burden of including the `polymorphic_path` call on our own every time we use `visit`; but adding the burden of a layer of indirection. I also did this with `within`, because omg that awkward `"##{dom_id(model)"` drives me nuts every time I type it. It makes me want to scream. I can't stand it. * ✨ `Marketplace`: Adds `Product#tags` Products can now be tagged with things like `Gluten Free` or `Vegan`, and will show up as such under Product listings * ✨ `Tag` labels are case insensitive --- app/furniture/marketplace/bazaar.rb | 1 + app/furniture/marketplace/breadcrumbs.rb | 10 ++++ app/furniture/marketplace/locales/en.yml | 5 ++ .../marketplace/management_component.html.erb | 1 + app/furniture/marketplace/marketplace.rb | 2 + app/furniture/marketplace/policy.rb | 3 +- app/furniture/marketplace/product.rb | 3 ++ .../product/title_component.html.erb | 4 ++ app/furniture/marketplace/product_policy.rb | 2 +- app/furniture/marketplace/product_tag.rb | 8 +++ .../marketplace/products/_form.html.erb | 2 + app/furniture/marketplace/routes.rb | 1 + app/furniture/marketplace/tag.rb | 14 ++++++ app/furniture/marketplace/tag_policy.rb | 32 ++++++++++++ app/furniture/marketplace/tags/_form.html.erb | 6 +++ app/furniture/marketplace/tags/index.html.erb | 20 ++++++++ app/furniture/marketplace/tags/new.html.erb | 2 + app/furniture/marketplace/tags_controller.rb | 31 ++++++++++++ ...8025354_create_marketplace_product_tags.rb | 17 +++++++ db/schema.rb | 19 +++++++ .../marketplace/product_tags_system_spec.rb | 49 +++++++++++++++++++ spec/furniture/marketplace/tag_spec.rb | 5 ++ 22 files changed, 235 insertions(+), 2 deletions(-) create mode 100644 app/furniture/marketplace/product_tag.rb create mode 100644 app/furniture/marketplace/tag.rb create mode 100644 app/furniture/marketplace/tag_policy.rb create mode 100644 app/furniture/marketplace/tags/_form.html.erb create mode 100644 app/furniture/marketplace/tags/index.html.erb create mode 100644 app/furniture/marketplace/tags/new.html.erb create mode 100644 app/furniture/marketplace/tags_controller.rb create mode 100644 db/migrate/20240208025354_create_marketplace_product_tags.rb create mode 100644 spec/furniture/marketplace/product_tags_system_spec.rb create mode 100644 spec/furniture/marketplace/tag_spec.rb diff --git a/app/furniture/marketplace/bazaar.rb b/app/furniture/marketplace/bazaar.rb index 2f4362604..eee8c4763 100644 --- a/app/furniture/marketplace/bazaar.rb +++ b/app/furniture/marketplace/bazaar.rb @@ -4,6 +4,7 @@ class Marketplace class Bazaar < ::Space has_many :marketplaces, through: :rooms, source: :gizmos, inverse_of: :bazaar, class_name: "Marketplace" has_many :tax_rates, inverse_of: :bazaar, dependent: :destroy + has_many :tags, inverse_of: :bazaar, dependent: :destroy def space becomes(Space) diff --git a/app/furniture/marketplace/breadcrumbs.rb b/app/furniture/marketplace/breadcrumbs.rb index c26cb14ab..b09a1e3ff 100644 --- a/app/furniture/marketplace/breadcrumbs.rb +++ b/app/furniture/marketplace/breadcrumbs.rb @@ -104,6 +104,16 @@ link t("marketplace.stripe_accounts.show.link_to"), marketplace.location(child: :stripe_account) end +crumb :marketplace_tags do |marketplace| + parent :edit_marketplace, marketplace + link(t("marketplace.tags.index.link_to"), marketplace.location(child: :tags)) +end + +crumb :new_marketplace_tag do |tag| + parent :marketplace_tags, tag.marketplace + link t("marketplace.tags.new.link_to"), marketplace.location(:new, child: :tag) +end + crumb :marketplace_tax_rates do |marketplace| parent :edit_marketplace, marketplace link t("marketplace.tax_rates.index.link_to"), marketplace.location(child: :tax_rates) diff --git a/app/furniture/marketplace/locales/en.yml b/app/furniture/marketplace/locales/en.yml index a8c0aa18a..4da9047a0 100644 --- a/app/furniture/marketplace/locales/en.yml +++ b/app/furniture/marketplace/locales/en.yml @@ -136,3 +136,8 @@ en: payment_settings: index: link_to: "Payment Settings" + tags: + index: + link_to: "Tags" + new: + link_to: "Add Tag" diff --git a/app/furniture/marketplace/management_component.html.erb b/app/furniture/marketplace/management_component.html.erb index 5c7b32a85..76d802a9a 100644 --- a/app/furniture/marketplace/management_component.html.erb +++ b/app/furniture/marketplace/management_component.html.erb @@ -21,6 +21,7 @@ <%= link_to_child(:notification_methods, icon: :bell_alert) if policy(marketplace.notification_methods).index? %> <%= link_to_child(:flyer, icon: :qr_code) if policy(marketplace.flyer).show? %> <%= link_to_child(:vendor_representatives, icon: :building_storefront) if policy(marketplace.vendor_representatives).index? %> + <%= link_to_child(:tags, icon: :tag) if policy(marketplace.tags).index? %> <% end %> <% end %> diff --git a/app/furniture/marketplace/marketplace.rb b/app/furniture/marketplace/marketplace.rb index 0cd4a250a..1031296b2 100644 --- a/app/furniture/marketplace/marketplace.rb +++ b/app/furniture/marketplace/marketplace.rb @@ -9,6 +9,8 @@ class Marketplace < Furniture # @todo replace with through :bazaar has_many :tax_rates, inverse_of: :marketplace + has_many :tags, through: :bazaar + has_many :products, inverse_of: :marketplace, dependent: :destroy has_many :carts, inverse_of: :marketplace, dependent: :destroy has_many :orders, inverse_of: :marketplace diff --git a/app/furniture/marketplace/policy.rb b/app/furniture/marketplace/policy.rb index bbad7025c..f0912237f 100644 --- a/app/furniture/marketplace/policy.rb +++ b/app/furniture/marketplace/policy.rb @@ -2,7 +2,7 @@ class Marketplace class Policy < ApplicationPolicy def create? return true if current_person.operator? - return true if current_person.member_of?(marketplace.space) + return true if current_person.member_of?(space) return true if shopper&.person.blank? && !current_person.authenticated? @@ -23,6 +23,7 @@ def marketplace object.marketplace if object.respond_to?(:marketplace) end + delegate :space, to: :marketplace module SpecFactories def self.included(spec) diff --git a/app/furniture/marketplace/product.rb b/app/furniture/marketplace/product.rb index 93e2dd6d2..be06f3411 100644 --- a/app/furniture/marketplace/product.rb +++ b/app/furniture/marketplace/product.rb @@ -26,6 +26,9 @@ class Product < Record has_many :ordered_products, inverse_of: :product, dependent: :destroy has_many :orders, -> { checked_out }, through: :ordered_products, inverse_of: :products + has_many :product_tags, inverse_of: :product, dependent: :destroy + has_many :tags, through: :product_tags, inverse_of: :products + has_many :product_tax_rates, inverse_of: :product, dependent: :destroy has_many :tax_rates, through: :product_tax_rates, inverse_of: :products diff --git a/app/furniture/marketplace/product/title_component.html.erb b/app/furniture/marketplace/product/title_component.html.erb index 9f21e96af..b5626e5b9 100644 --- a/app/furniture/marketplace/product/title_component.html.erb +++ b/app/furniture/marketplace/product/title_component.html.erb @@ -2,3 +2,7 @@ <%- if servings.present? %>

Serves <%= servings %>

<%- end %> + +<%- if product.tags.present? %> +

(<%= product.tags.pluck(:label).join(", ") %>)

+<%- end %> diff --git a/app/furniture/marketplace/product_policy.rb b/app/furniture/marketplace/product_policy.rb index ef63c0979..3b8d09636 100644 --- a/app/furniture/marketplace/product_policy.rb +++ b/app/furniture/marketplace/product_policy.rb @@ -4,7 +4,7 @@ class Marketplace class ProductPolicy < Policy alias_method :product, :object def permitted_attributes(_params = nil) - %i[name description price_cents price_currency price photo restore servings] + [tax_rate_ids: []] + %i[name description price_cents price_currency price photo restore servings] + [tag_ids: [], tax_rate_ids: []] end def update? diff --git a/app/furniture/marketplace/product_tag.rb b/app/furniture/marketplace/product_tag.rb new file mode 100644 index 000000000..368ddacd3 --- /dev/null +++ b/app/furniture/marketplace/product_tag.rb @@ -0,0 +1,8 @@ +class Marketplace + class ProductTag < Record + self.table_name = :marketplace_product_tags + + belongs_to :product, inverse_of: :product_tags + belongs_to :tag, inverse_of: :product_tags + end +end diff --git a/app/furniture/marketplace/products/_form.html.erb b/app/furniture/marketplace/products/_form.html.erb index c4e3f705b..4a38ab9db 100644 --- a/app/furniture/marketplace/products/_form.html.erb +++ b/app/furniture/marketplace/products/_form.html.erb @@ -5,6 +5,8 @@ <%= render "number_field", { attribute: :servings, form: f, min: 0, step: 1} %> <%= render "money_field", { attribute: :price, form: f, min: 0, step: 0.01} %> + <%= render "collection_check_boxes", { attribute: :tag_ids, collection: bazaar.tags, value_method: :id, + text_method: :label, form: f} %> <%= render "collection_check_boxes", { attribute: :tax_rate_ids, collection: bazaar.tax_rates, value_method: :id, text_method: :label, form: f} %> <%- if product.photo.present? %>
diff --git a/app/furniture/marketplace/routes.rb b/app/furniture/marketplace/routes.rb index d8bb9061d..52ae8e6e0 100644 --- a/app/furniture/marketplace/routes.rb +++ b/app/furniture/marketplace/routes.rb @@ -16,6 +16,7 @@ def self.append_routes(router) router.resources :products router.resource :stripe_account, only: [:show, :new, :create] router.resources :stripe_events + router.resources :tags router.resources :tax_rates router.resources :vendor_representatives router.resources :payment_settings, only: [:index] diff --git a/app/furniture/marketplace/tag.rb b/app/furniture/marketplace/tag.rb new file mode 100644 index 000000000..9d8e98db2 --- /dev/null +++ b/app/furniture/marketplace/tag.rb @@ -0,0 +1,14 @@ +class Marketplace + class Tag < Record + self.table_name = "marketplace_tags" + + belongs_to :bazaar, inverse_of: :tags + has_many :product_tags, inverse_of: :tag, dependent: :destroy + has_many :products, through: :product_tags, inverse_of: :tags + + validates :label, uniqueness: {case_sensitive: false, scope: :bazaar_id} + + attr_accessor :marketplace + location(parent: :marketplace) + end +end diff --git a/app/furniture/marketplace/tag_policy.rb b/app/furniture/marketplace/tag_policy.rb new file mode 100644 index 000000000..cd43c1be4 --- /dev/null +++ b/app/furniture/marketplace/tag_policy.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +class Marketplace + class TagPolicy < Policy + alias_method :tag, :object + def space + tag.bazaar + end + + def permitted_attributes(_params = nil) + %i[label] + end + + def update? + return false unless current_person.authenticated? + + super + end + + alias_method :create?, :update? + + def show? + true + end + + class Scope < ApplicationScope + def resolve + scope.all + end + end + end +end diff --git a/app/furniture/marketplace/tags/_form.html.erb b/app/furniture/marketplace/tags/_form.html.erb new file mode 100644 index 000000000..acd3ab69e --- /dev/null +++ b/app/furniture/marketplace/tags/_form.html.erb @@ -0,0 +1,6 @@ +<%= form_with(model: tag.location) do |form| %> + +<%= render "text_field", attribute: :label, form: form %> + +<%= form.submit %> +<%- end %> diff --git a/app/furniture/marketplace/tags/index.html.erb b/app/furniture/marketplace/tags/index.html.erb new file mode 100644 index 000000000..61832ff4c --- /dev/null +++ b/app/furniture/marketplace/tags/index.html.erb @@ -0,0 +1,20 @@ +<%- breadcrumb :marketplace_tags, marketplace %> + +<%= render CardComponent.new do |card| %> + + <%- marketplace.tags.each do |tag| %> + <%- tag.marketplace = marketplace %> +
+ + <%= tag.label %> + +
+ <%- end %> + + <%- card.with_footer(variant: :action_bar) do %> + <%- new_tag = bazaar.tags.new %> + <%- if policy(new_tag).create? %> + <%= link_to t("marketplace.tags.new.link_to"), marketplace.location(:new, child: :tag), class: "button w-full" %> + <%- end %> + <%- end %> +<%- end %> diff --git a/app/furniture/marketplace/tags/new.html.erb b/app/furniture/marketplace/tags/new.html.erb new file mode 100644 index 000000000..d5e9383ef --- /dev/null +++ b/app/furniture/marketplace/tags/new.html.erb @@ -0,0 +1,2 @@ +<%- breadcrumb :new_marketplace_tag, mtag %> +<%= render "form", tag: mtag %> diff --git a/app/furniture/marketplace/tags_controller.rb b/app/furniture/marketplace/tags_controller.rb new file mode 100644 index 000000000..8e25ffb8a --- /dev/null +++ b/app/furniture/marketplace/tags_controller.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +class Marketplace + class TagsController < Controller + # Apparently, `tag` is used inside of `turbo_frame_tag`, so if we define a + # helper_method named `tag` our method gets called when it really shouldn't + # be... so `mtag` it is. For now. + expose :mtag, scope: -> { tags }, model: Tag + expose :tags, -> { policy_scope(bazaar.tags.create_with(marketplace: marketplace)) } + + def new + authorize(mtag) + end + + def create + if authorize(mtag).save + redirect_to marketplace.location(child: :tags) + else + render :new + end + end + + def index + skip_authorization + end + + def mtag_params + policy(Tag).permit(params.require(:tag)) + end + end +end diff --git a/db/migrate/20240208025354_create_marketplace_product_tags.rb b/db/migrate/20240208025354_create_marketplace_product_tags.rb new file mode 100644 index 000000000..4e1fcfaad --- /dev/null +++ b/db/migrate/20240208025354_create_marketplace_product_tags.rb @@ -0,0 +1,17 @@ +class CreateMarketplaceProductTags < ActiveRecord::Migration[7.1] + def change + create_table :marketplace_tags, id: :uuid do |t| + t.references :bazaar, type: :uuid + t.string :label + + t.timestamps + end + + create_table :marketplace_product_tags, id: :uuid do |t| + t.references :product, type: :uuid, foreign_key: {to_table: :marketplace_products} + t.references :tag, type: :uuid, foreign_key: {to_table: :marketplace_tags} + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 378aa23c1..c1fdcaeb2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -202,6 +202,15 @@ t.index ["shopper_id"], name: "index_marketplace_orders_on_shopper_id" end + create_table "marketplace_product_tags", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "product_id" + t.uuid "tag_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["product_id"], name: "index_marketplace_product_tags_on_product_id" + t.index ["tag_id"], name: "index_marketplace_product_tags_on_tag_id" + end + create_table "marketplace_product_tax_rates", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "tax_rate_id" t.uuid "product_id" @@ -231,6 +240,14 @@ t.index ["person_id"], name: "index_marketplace_shoppers_on_person_id", unique: true end + create_table "marketplace_tags", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "bazaar_id" + t.string "label" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["bazaar_id"], name: "index_marketplace_tags_on_bazaar_id" + end + create_table "marketplace_tax_rates", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.float "tax_rate" t.string "label" @@ -337,6 +354,8 @@ add_foreign_key "marketplace_notification_methods", "furnitures", column: "marketplace_id" add_foreign_key "marketplace_orders", "marketplace_delivery_areas", column: "delivery_area_id" add_foreign_key "marketplace_orders", "marketplace_shoppers", column: "shopper_id" + add_foreign_key "marketplace_product_tags", "marketplace_products", column: "product_id" + add_foreign_key "marketplace_product_tags", "marketplace_tags", column: "tag_id" add_foreign_key "marketplace_product_tax_rates", "marketplace_products", column: "product_id" add_foreign_key "marketplace_product_tax_rates", "marketplace_tax_rates", column: "tax_rate_id" add_foreign_key "marketplace_products", "furnitures", column: "marketplace_id" diff --git a/spec/furniture/marketplace/product_tags_system_spec.rb b/spec/furniture/marketplace/product_tags_system_spec.rb new file mode 100644 index 000000000..a4b642844 --- /dev/null +++ b/spec/furniture/marketplace/product_tags_system_spec.rb @@ -0,0 +1,49 @@ +require "rails_helper" + +describe "Product Tags", type: :system do + let(:space) { create(:space, :with_entrance, :with_members) } + let(:marketplace) { create(:marketplace, :ready_for_shopping, room: space.entrance) } + + before do + sign_in(space.members.first, space) + end + + scenario "Adding Tags to a Product" do # rubocop:disable RSpec/Capybara/FeatureMethods,RSpec/ExampleLength + muffins = create(:marketplace_product, marketplace:, name: "Mazin' Muffins", description: "Buttery corn muffins") + + visit(marketplace) + click_link("Tags") + + click_link("Add Tag") + + fill_in("Label", with: "🚫🌾 Gluten Free") + + click_button("Create") + + click_link("Products") + within(muffins) do + click_link("⚙️ Edit") + end + + check("🚫🌾 Gluten Free") + click_button("Save") + + visit(marketplace) + + within(muffins) do + expect(page).to have_content("🚫🌾 Gluten Free") + end + end + + def visit(object_or_path) + if object_or_path.respond_to?(:location) + super(polymorphic_path(object_or_path.location)) + else + super + end + end + + def within(model, *, **, &block) + page.within("##{dom_id(model)}", *, **, &block) + end +end diff --git a/spec/furniture/marketplace/tag_spec.rb b/spec/furniture/marketplace/tag_spec.rb new file mode 100644 index 000000000..82d0d9849 --- /dev/null +++ b/spec/furniture/marketplace/tag_spec.rb @@ -0,0 +1,5 @@ +require "rails_helper" + +RSpec.describe Marketplace::Tag, type: :model do + it { is_expected.to validate_uniqueness_of(:label).case_insensitive.scoped_to(:bazaar_id) } +end From 69a7a076660b63fecf0d5b52a2e4fe55f8e2d922 Mon Sep 17 00:00:00 2001 From: Zee <50284+zspencer@users.noreply.github.com> Date: Wed, 6 Mar 2024 19:41:36 -0800 Subject: [PATCH 14/46] =?UTF-8?q?=F0=9F=A7=B9=20Unfutz=20the=20broken=20li?= =?UTF-8?q?nter=20(#2282)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I accidentally pushed right to `main`. It was not great. Now our linter is sad. This makes it less sad. --- .rubocop_todo.yml | 18 ++---------------- spec/requests/rsvps_controller_request_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 915b0b212..3a30e0858 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 2000` -# on 2023-09-14 00:31:11 UTC using RuboCop version 1.56.3. +# on 2024-03-07 02:44:05 UTC using RuboCop version 1.61.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -32,12 +32,6 @@ RSpec/DescribeClass: Exclude: - 'spec/tasks/release_after_build_spec.rb' -# Offense count: 2 -# Configuration parameters: Max, CountAsOne. -RSpec/ExampleLength: - Exclude: - - 'spec/requests/rsvps_controller_request_spec.rb' - # Offense count: 1 RSpec/LeakyConstantDeclaration: Exclude: @@ -57,14 +51,7 @@ RSpec/NamedSubject: - 'spec/models/invitation_spec.rb' - 'spec/models/membership_spec.rb' -# Offense count: 1 -# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. -# Include: **/*_spec.rb -RSpec/SpecFilePathFormat: - Exclude: - - 'spec/furniture/journal/entries_request_spec.rb' - -# Offense count: 8 +# Offense count: 6 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments @@ -73,7 +60,6 @@ Rails/FilePath: - 'config/application.rb' - 'config/environments/development.rb' - 'config/initializers/gretel.rb' - - 'spec/rails_helper.rb' # Offense count: 1 # Configuration parameters: Include. diff --git a/spec/requests/rsvps_controller_request_spec.rb b/spec/requests/rsvps_controller_request_spec.rb index ef5e43438..a8da23bb8 100644 --- a/spec/requests/rsvps_controller_request_spec.rb +++ b/spec/requests/rsvps_controller_request_spec.rb @@ -29,7 +29,7 @@ context "without the one-time-code" do let(:rsvp_params) { {status: :accepted} } - it "doesnt complete the invitation" do + it "doesnt complete the invitation" do # rubocop:disable RSpec/ExampleLength expect { request }.to have_enqueued_mail( AuthenticatedSessionMailer, :one_time_password_email ) @@ -57,7 +57,7 @@ {status: :accepted, one_time_password: authentication_method.one_time_password} end - it "completes the invitation and confirms their authentication method" do + it "completes the invitation and confirms their authentication method" do # rubocop:disable RSpec/ExampleLength expect { request }.not_to have_enqueued_mail( AuthenticatedSessionMailer, :one_time_password_email ) From 7e2454200f60ea4ed55cd82a91abaff17d9979c7 Mon Sep 17 00:00:00 2001 From: Zee <50284+zspencer@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:36:27 -0800 Subject: [PATCH 15/46] =?UTF-8?q?=F0=9F=8C=B8=20`DesignLibrary`:=20Layout?= =?UTF-8?q?=20is=20responsible=20for....=20Layout...=20(#2281)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/zinc-collective/convene/issues/1187 - https://github.com/zinc-collective/convene/issues/2271 - https://github.com/zinc-collective/convene/issues/2253 One of the things we've kept bumping into is that each page has to decide how wide it wants to be. That doesn't really seem sustainable or particularly necessary; so now the Layout takes care of: - Providing a Max-Width on every page - Ensuring the Layout is centered horizontally - Ensuring there is appropriate margin from the top of the screen --- .../journal/journals/_journal.html.erb | 17 ++++----- app/furniture/layouts/marketplace.html.erb | 37 +++++++++---------- .../marketplace/orders/index.html.erb | 7 ++-- .../marketplace/orders/show.html.erb | 5 +-- app/views/authenticated_sessions/new.html.erb | 4 +- app/views/layouts/application.html.erb | 3 +- app/views/neighborhoods/show.html.erb | 22 +++++------ app/views/rooms/_room.html.erb | 11 +++--- .../space/agreements/_agreement.html.erb | 2 +- 9 files changed, 51 insertions(+), 57 deletions(-) diff --git a/app/furniture/journal/journals/_journal.html.erb b/app/furniture/journal/journals/_journal.html.erb index 2b37d4016..b9e325396 100644 --- a/app/furniture/journal/journals/_journal.html.erb +++ b/app/furniture/journal/journals/_journal.html.erb @@ -1,13 +1,12 @@ -
- <%= render Journal::NewEntryButtonComponent.new(journal: journal) %> -
- <%- @pagy, @entries = pagy(policy_scope(journal.entries.recent)) %> +<%= render Journal::NewEntryButtonComponent.new(journal: journal) %> - <%= render Journal::EntryComponent.with_collection(@entries) %> -
+
+ <%- @pagy, @entries = pagy(policy_scope(journal.entries.recent)) %> - <%== pagy_nav(@pagy) %> + <%= render Journal::EntryComponent.with_collection(@entries) %> +
- <%= render Journal::NewEntryButtonComponent.new(journal: journal) %> -
+<%== pagy_nav(@pagy) %> + +<%= render Journal::NewEntryButtonComponent.new(journal: journal) %> diff --git a/app/furniture/layouts/marketplace.html.erb b/app/furniture/layouts/marketplace.html.erb index 8dadf9bec..4e8595cc9 100644 --- a/app/furniture/layouts/marketplace.html.erb +++ b/app/furniture/layouts/marketplace.html.erb @@ -1,25 +1,24 @@ <%- content_for :content do %> -
-
- <%= turbo_frame_tag(marketplace, data: { turbo_action: :advance }) do %> - <%- if policy(marketplace).edit? %> - <%= render Marketplace::ManagementComponent.new(marketplace: marketplace) do %> - <%= yield %> - <%- end %> - <%- else %> -
-
-

- <%= t('.header', space: marketplace.space.name, room: marketplace.room.name) %> -

-
-
- <%= yield %> -
-
+
+ <%= turbo_frame_tag(marketplace, data: { turbo_action: :advance }) do %> + <%- if policy(marketplace).edit? %> + <%= render Marketplace::ManagementComponent.new(marketplace: marketplace) do %> + <%= yield %> <%- end %> + <%- else %> +
+
+

+ <%= t('.header', space: marketplace.space.name, room: marketplace.room.name) %> +

+
+
+ <%= yield %> +
+
<%- end %> <%- end %> -
+ <%- end %>
+ <%= render template: "layouts/application" %> diff --git a/app/furniture/marketplace/orders/index.html.erb b/app/furniture/marketplace/orders/index.html.erb index bfad34999..e43d72d3d 100644 --- a/app/furniture/marketplace/orders/index.html.erb +++ b/app/furniture/marketplace/orders/index.html.erb @@ -1,6 +1,5 @@ <%- breadcrumb :marketplace_orders, marketplace %> <%- @pagy, @records = pagy(orders.paid) %> -
- <%= render @records %> - <%== pagy_nav(@pagy) if @pagy.pages > 1 %> -
+ +<%= render @records %> +<%== pagy_nav(@pagy) if @pagy.pages > 1 %> diff --git a/app/furniture/marketplace/orders/show.html.erb b/app/furniture/marketplace/orders/show.html.erb index 9e0d331e1..da22fa28b 100644 --- a/app/furniture/marketplace/orders/show.html.erb +++ b/app/furniture/marketplace/orders/show.html.erb @@ -1,4 +1,3 @@ <%- breadcrumb :marketplace_order, order%> -
- <%= render order %> -
+ +<%= render order %> diff --git a/app/views/authenticated_sessions/new.html.erb b/app/views/authenticated_sessions/new.html.erb index a05607cea..9bb76d10a 100644 --- a/app/views/authenticated_sessions/new.html.erb +++ b/app/views/authenticated_sessions/new.html.erb @@ -1,3 +1 @@ -
- <%= render partial: 'form', locals: { authenticated_session: authenticated_session } %> -
+<%= render partial: 'form', locals: { authenticated_session: authenticated_session } %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ee4bfa50d..ecccf470a 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,7 +5,8 @@ <%= render 'layouts/header' %> -
+
<%= content_for?(:content) ? yield(:content) : yield %>
diff --git a/app/views/neighborhoods/show.html.erb b/app/views/neighborhoods/show.html.erb index 2afbedbd0..fc24c1ab5 100644 --- a/app/views/neighborhoods/show.html.erb +++ b/app/views/neighborhoods/show.html.erb @@ -1,18 +1,18 @@ <%- @pagy, @records = pagy(policy_scope(neighborhood.spaces)) %> -
-
- <%= render @records %> -
- <%== pagy_nav(@pagy) %> +
+ <%= render @records %> +
+ +<%== pagy_nav(@pagy) %> + +<%- if policy(Space).new? %> +
+ <%= link_to "Add a Space",[:new, :space] %> +
+<%- end %> - <%- if policy(Space).new? %> -
- <%= link_to "Add a Space",[:new, :space] %> -
- <%- end %> -
<%- if !neighborhood.email_configured? %>

It looks like you haven't configured Convene to send email. Check the .env.example file for variables named with SMTP and make sure each is set with your email providers configuration.

diff --git a/app/views/rooms/_room.html.erb b/app/views/rooms/_room.html.erb index 74e76616d..e1ace6dcf 100644 --- a/app/views/rooms/_room.html.erb +++ b/app/views/rooms/_room.html.erb @@ -1,10 +1,9 @@ <%- if room.hero_image&.upload.present? %> <%= image_tag room.hero_image&.upload&.variant(resize_to_fill: Media::FULL_WIDTH_SHORT), class: "w-full" %> <%- end %> -
-
-
- <%= render room.gizmos.rank(:slot) %> -
-
+ +
+
+ <%= render room.gizmos.rank(:slot) %> +
diff --git a/app/views/space/agreements/_agreement.html.erb b/app/views/space/agreements/_agreement.html.erb index da9ada150..faaf6ef14 100644 --- a/app/views/space/agreements/_agreement.html.erb +++ b/app/views/space/agreements/_agreement.html.erb @@ -1,4 +1,4 @@ -<%= render CardComponent.new(dom_id: dom_id(agreement), classes: "mx-auto mt-2 max-w-prose w-full") do %> +<%= render CardComponent.new(dom_id: dom_id(agreement)) do %>

<%= agreement.name %>

From deb6dee91260ebf76fa3be735353cb649c422ba6 Mon Sep 17 00:00:00 2001 From: Ana Ulin Date: Thu, 7 Mar 2024 17:34:58 -0800 Subject: [PATCH 16/46] =?UTF-8?q?=F0=9F=8C=B8=20Make=20cards=20in=20the=20?= =?UTF-8?q?section=20navigation=20all=20have=20the=20same=20height=20(#228?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Expand seeds.rb with hero images and room descriptions. * Make section navigation cards be all the same height. --- .../_section_navigation.html.erb | 2 +- db/seeds.rb | 13 +++++++++++-- spec/factories/media.rb | 4 ++++ spec/fixtures/files/cc-journal.jpg | Bin 0 -> 113097 bytes 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 spec/fixtures/files/cc-journal.jpg diff --git a/app/furniture/section_navigation/section_navigations/_section_navigation.html.erb b/app/furniture/section_navigation/section_navigations/_section_navigation.html.erb index e737fceec..3e1d04903 100644 --- a/app/furniture/section_navigation/section_navigations/_section_navigation.html.erb +++ b/app/furniture/section_navigation/section_navigations/_section_navigation.html.erb @@ -1,7 +1,7 @@
<% policy_scope(section_navigation.rooms).each do |room| %> <%= link_to polymorphic_path(room.location), id: dom_id(room, :link_to), class: "group no-underline" do %> - <%= render CardComponent.new(media: room.hero_image, classes: "flex flex-col justify-between") do |card| %> + <%= render CardComponent.new(media: room.hero_image, classes: "flex flex-col justify-between h-full") do |card| %>

<%= room.description %>