From 929488bab5d4ca152ffd9d5ae7d3c89141ffd548 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:03:36 +0200 Subject: [PATCH 01/23] feat(job): Add BlockUsersJob --- .../decidim/spam_detection/block_users_job.rb | 28 +++++++++++++++++++ spec/factories.rb | 9 ++++++ .../spam_detection/block_users_job_spec.rb | 18 ++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 app/jobs/decidim/spam_detection/block_users_job.rb create mode 100644 spec/jobs/decidim/spam_detection/block_users_job_spec.rb diff --git a/app/jobs/decidim/spam_detection/block_users_job.rb b/app/jobs/decidim/spam_detection/block_users_job.rb new file mode 100644 index 0000000..0bdaac9 --- /dev/null +++ b/app/jobs/decidim/spam_detection/block_users_job.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Decidim + module SpamDetection + class BlockUsersJob < ApplicationJob + queue_as :default + + def perform + Rails.logger.info "Blocking users marked as spam" + users = reported_spams_users + Rails.logger.info "Blocking users marked as spam: #{users.count} users found" + users.find_each do |user| + Decidim::SpamDetection::BlockSpamUserCommand.call(user, Decidim::SpamDetection::SpamUserCommandAdapter::SPAM_LEVEL[:very_sure]).call + end + Rails.logger.info "Terminated..." + end + + private + + def reported_spams_users + @reported_spams_users ||= Decidim::User.where(admin: false, blocked: false, deleted_at: nil) + .where("(extended_data #> '{spam_detection, unreported_at}') is null") + .where("(extended_data #> '{spam_detection, unblocked_at}') is null") + .where("(extended_data -> 'spam_detection' ->> 'probability')::float >= ?", Decidim::SpamDetection::SpamUserCommandAdapter::SPAM_LEVEL[:very_sure]) + end + end + end +end diff --git a/spec/factories.rb b/spec/factories.rb index 150544d..a99d143 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -80,6 +80,15 @@ end end + trait :marked_as_spam_very_sure do + after(:build) do |user| + user.extended_data = user.extended_data + .dup + .deep_merge({ spam_detection: { reported_at: 1.day.ago, probability: 0.99 } }) + + end + end + trait :unmarked_as_spam do after(:build) do |user| user.extended_data = user.extended_data diff --git a/spec/jobs/decidim/spam_detection/block_users_job_spec.rb b/spec/jobs/decidim/spam_detection/block_users_job_spec.rb new file mode 100644 index 0000000..f027cba --- /dev/null +++ b/spec/jobs/decidim/spam_detection/block_users_job_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe Decidim::SpamDetection::BlockUsersJob do + subject { described_class } + + let!(:users) { create_list(:user, 5, :marked_as_spam_very_sure) } + let!(:users_not_sure) { create_list(:user, 5, :marked_as_spam) } + + describe "#perform" do + it "blocks reported users" do + expect do + subject.perform_now + end.to change { Decidim::User.blocked.count }.by(5) + end + end +end From b3d51e756ee89631f87885147131c6a25db36ca6 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:03:51 +0200 Subject: [PATCH 02/23] feat(rake): Create new rake task --- lib/tasks/decidim_block_user.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/tasks/decidim_block_user.rake diff --git a/lib/tasks/decidim_block_user.rake b/lib/tasks/decidim_block_user.rake new file mode 100644 index 0000000..ae98757 --- /dev/null +++ b/lib/tasks/decidim_block_user.rake @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +namespace :decidim do + namespace :spam_detection do + desc "Call the external Spam Detection service" + task block_users: :environment do + Decidim::SpamDetection::BlockUsersJob.perform_later + end + end +end From 63ab89c4acd2c35bc785d4ec661f52de1f9ec275 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:05:00 +0200 Subject: [PATCH 03/23] lint: Fix rubocop offenses --- app/jobs/decidim/spam_detection/block_users_job.rb | 6 +++++- spec/factories.rb | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/jobs/decidim/spam_detection/block_users_job.rb b/app/jobs/decidim/spam_detection/block_users_job.rb index 0bdaac9..74bd1d1 100644 --- a/app/jobs/decidim/spam_detection/block_users_job.rb +++ b/app/jobs/decidim/spam_detection/block_users_job.rb @@ -21,7 +21,11 @@ def reported_spams_users @reported_spams_users ||= Decidim::User.where(admin: false, blocked: false, deleted_at: nil) .where("(extended_data #> '{spam_detection, unreported_at}') is null") .where("(extended_data #> '{spam_detection, unblocked_at}') is null") - .where("(extended_data -> 'spam_detection' ->> 'probability')::float >= ?", Decidim::SpamDetection::SpamUserCommandAdapter::SPAM_LEVEL[:very_sure]) + .where("(extended_data -> 'spam_detection' ->> 'probability')::float >= ?", spam_level) + end + + def spam_level + Decidim::SpamDetection::SpamUserCommandAdapter::SPAM_LEVEL[:very_sure] end end end diff --git a/spec/factories.rb b/spec/factories.rb index a99d143..bacec01 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -85,7 +85,6 @@ user.extended_data = user.extended_data .dup .deep_merge({ spam_detection: { reported_at: 1.day.ago, probability: 0.99 } }) - end end From f9749506beb4dcc51c90915755752665c48e3d46 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:05:13 +0200 Subject: [PATCH 04/23] chore: Bump to 3.0.6 --- .ruby-version | 2 +- Gemfile.lock | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index b502146..818bd47 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.2 +3.0.6 diff --git a/Gemfile.lock b/Gemfile.lock index 1548f12..f78f487 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -793,6 +793,7 @@ GEM PLATFORMS arm64-darwin-21 + arm64-darwin-22 x86_64-linux DEPENDENCIES @@ -813,7 +814,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.0.2p107 + ruby 3.0.6p216 BUNDLED WITH 2.3.14 From ae321c8253eb8a05425595c78e95f6a3a0cf234f Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:08:55 +0200 Subject: [PATCH 05/23] fix: Add README entry for new task --- README.md | 7 +++++++ ...ock_user.rake => decidim_block_users.rake} | 0 spec/lib/tasks/decidim_block_user_spec.rb | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+) rename lib/tasks/{decidim_block_user.rake => decidim_block_users.rake} (100%) create mode 100644 spec/lib/tasks/decidim_block_user_spec.rb diff --git a/README.md b/README.md index 75662f3..134e9c8 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,13 @@ if you are using sidekiq scheduler you can use the following configuration: queue: scheduled ``` +### Block already marked users + +If you want to block already marked users, you can use the following command: +```bash +bundle exec rake decidim:spam_detection:block_users +``` + ### Further configuration list of env var, default value and their usage: ``` diff --git a/lib/tasks/decidim_block_user.rake b/lib/tasks/decidim_block_users.rake similarity index 100% rename from lib/tasks/decidim_block_user.rake rename to lib/tasks/decidim_block_users.rake diff --git a/spec/lib/tasks/decidim_block_user_spec.rb b/spec/lib/tasks/decidim_block_user_spec.rb new file mode 100644 index 0000000..d4b7975 --- /dev/null +++ b/spec/lib/tasks/decidim_block_user_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe "decidim:spam_detection:block_users", type: :task do + it "preloads the Rails environment" do + expect(task.prerequisites).to include "environment" + end + + it "runs gracefully" do + expect { task.execute }.not_to raise_error + end + + it "performs the job" do + expect(Decidim::SpamDetection::BlockUsersJob).to receive(:perform_later) + + task.execute + end +end From a69e450eb7d581eaf5f2aa5aa901d7f90e5c6b18 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:18:27 +0200 Subject: [PATCH 06/23] refactor: Call method --- app/jobs/decidim/spam_detection/block_users_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/decidim/spam_detection/block_users_job.rb b/app/jobs/decidim/spam_detection/block_users_job.rb index 74bd1d1..ee8191f 100644 --- a/app/jobs/decidim/spam_detection/block_users_job.rb +++ b/app/jobs/decidim/spam_detection/block_users_job.rb @@ -10,7 +10,7 @@ def perform users = reported_spams_users Rails.logger.info "Blocking users marked as spam: #{users.count} users found" users.find_each do |user| - Decidim::SpamDetection::BlockSpamUserCommand.call(user, Decidim::SpamDetection::SpamUserCommandAdapter::SPAM_LEVEL[:very_sure]).call + Decidim::SpamDetection::BlockSpamUserCommand.call(user, spam_level).call end Rails.logger.info "Terminated..." end From 7d2da3ad566a959aff70367ea8cd1a009820fcfb Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:20:00 +0200 Subject: [PATCH 07/23] ci: Bump actions/upload-artifact to v3 --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 5695f34..3eead62 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -69,7 +69,7 @@ jobs: - run: bundle exec rspec name: RSpec - uses: codecov/codecov-action@v1 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: always() with: name: screenshots From db9b0c3830b9b1094a835461fcf8a216ff013e81 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:24:49 +0200 Subject: [PATCH 08/23] ci: Bump chromedriver --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 3eead62..261bf48 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -57,7 +57,7 @@ jobs: name: Create test app - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 + - uses: nanasess/setup-chromedriver@v2 - name: Run precompile if needed run: | if [[ -d "app/views" ]] || [[ -d "spec/mailers" ]] || [[ -d "spec/system" ]]; then From 66c4a857e9004bb882d90ffc4c1fcb5f7d3e3172 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:30:50 +0200 Subject: [PATCH 09/23] ci: Remove unnecessary assets compilation --- .github/workflows/ci_cd.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 261bf48..0f03504 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -58,14 +58,6 @@ jobs: - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots name: Create the screenshots folder - uses: nanasess/setup-chromedriver@v2 - - name: Run precompile if needed - run: | - if [[ -d "app/views" ]] || [[ -d "spec/mailers" ]] || [[ -d "spec/system" ]]; then - cd "spec/decidim_dummy_app" - bundle exec rails assets:precompile - else - echo "No need to precompile assets since system folder is empty" - fi - run: bundle exec rspec name: RSpec - uses: codecov/codecov-action@v1 From 0873896d50f0aa85181ece34b862a373b4df22a9 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:35:34 +0200 Subject: [PATCH 10/23] revert: 'ci: Remove unnecessary assets compilation' This reverts commit 66c4a857e9004bb882d90ffc4c1fcb5f7d3e3172. --- .github/workflows/ci_cd.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 0f03504..261bf48 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -58,6 +58,14 @@ jobs: - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots name: Create the screenshots folder - uses: nanasess/setup-chromedriver@v2 + - name: Run precompile if needed + run: | + if [[ -d "app/views" ]] || [[ -d "spec/mailers" ]] || [[ -d "spec/system" ]]; then + cd "spec/decidim_dummy_app" + bundle exec rails assets:precompile + else + echo "No need to precompile assets since system folder is empty" + fi - run: bundle exec rspec name: RSpec - uses: codecov/codecov-action@v1 From 0a0ca23afbf03303f73aaced1f1544ebfa263ea8 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:03:00 +0200 Subject: [PATCH 11/23] fix: Add missing js dependencies --- Rakefile | 19 +++++++++++++++++-- babel.config.json | 28 ++++++++++++++++++++++++++++ yarn.lock | 4 ++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 babel.config.json create mode 100644 yarn.lock diff --git a/Rakefile b/Rakefile index efde3b4..5e291e2 100644 --- a/Rakefile +++ b/Rakefile @@ -2,8 +2,23 @@ require "decidim/dev/common_rake" +def js_configuration(path) + babel_file_path = File.join(Dir.pwd, "babel.config.json") + + Dir.chdir(path) do + FileUtils.cp(babel_file_path, "babel.config.json") + system("yarn add @babel/plugin-proposal-private-methods") + system("yarn add @babel/plugin-proposal-private-property-in-object") + end +end + desc "Generates a dummy app for testing" -task test_app: "decidim:generate_external_test_app" +task test_app: "decidim:generate_external_test_app" do + ENV["RAILS_ENV"] = "test" + js_configuration("spec/decidim_dummy_app") +end desc "Generates a development app." -task development_app: "decidim:generate_external_development_app" +task development_app: "decidim:generate_external_development_app" do + js_configuration("development_app") +end diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000..551d4be --- /dev/null +++ b/babel.config.json @@ -0,0 +1,28 @@ +{ + "presets": [ + [ + "@babel/preset-env", { + "forceAllTransforms": true, + "useBuiltIns": "entry", + "corejs": 3, + "modules": false + } + ], + ["@babel/preset-react"] + ], + "plugins": [ + "@babel/plugin-transform-classes", + [ + "@babel/plugin-transform-runtime", + { + "helpers": false, + "regenerator": true, + "corejs": false + } + ], + [ "@babel/plugin-transform-regenerator", { "async": false }], + [ "@babel/plugin-proposal-private-property-in-object", { "loose": true }], + ["@babel/plugin-proposal-private-methods", { "loose": true }], + ["@babel/plugin-proposal-class-properties", { "loose": true }] + ] +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + From 34a74e8d7474484383e654aa6e6c11e497e71259 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:09:31 +0200 Subject: [PATCH 12/23] fix: Add graphql-ws dep --- Rakefile | 1 + package.json | 5 +++++ yarn.lock | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 package.json diff --git a/Rakefile b/Rakefile index 5e291e2..13a08c2 100644 --- a/Rakefile +++ b/Rakefile @@ -7,6 +7,7 @@ def js_configuration(path) Dir.chdir(path) do FileUtils.cp(babel_file_path, "babel.config.json") + system("yarn add graphql-ws") system("yarn add @babel/plugin-proposal-private-methods") system("yarn add @babel/plugin-proposal-private-property-in-object") end diff --git a/package.json b/package.json new file mode 100644 index 0000000..98a1a26 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "graphql-ws": "^5.16.0" + } +} diff --git a/yarn.lock b/yarn.lock index fb57ccd..5ded913 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,3 +2,7 @@ # yarn lockfile v1 +graphql-ws@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.16.0.tgz#849efe02f384b4332109329be01d74c345842729" + integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== From 1bb44f93b03cdaf09620af3717d2ef84680d85cb Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:16:47 +0200 Subject: [PATCH 13/23] fix: Missing yarn deps --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 13a08c2..4b15ce5 100644 --- a/Rakefile +++ b/Rakefile @@ -10,6 +10,7 @@ def js_configuration(path) system("yarn add graphql-ws") system("yarn add @babel/plugin-proposal-private-methods") system("yarn add @babel/plugin-proposal-private-property-in-object") + system("yarn install") end end From aa6f4196956a7a2189fdae0dfcbcf927a56cfd94 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:44:30 +0200 Subject: [PATCH 14/23] fix: Set new decidim version --- Gemfile | 4 ++-- Gemfile.lock | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 8970a49..8ca0f8c 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" ruby RUBY_VERSION -gem "decidim" +gem "decidim", "~> 0.27.0" gem "decidim-spam_detection", path: "." gem "bootsnap", "~> 1.4" @@ -13,7 +13,7 @@ gem "puma", ">= 5.5.1" group :development, :test do gem "byebug", "~> 11.0", platform: :mri - gem "decidim-dev" + gem "decidim-dev", "~> 0.27.0" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index f78f487..87a48ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -800,8 +800,8 @@ DEPENDENCIES bootsnap (~> 1.4) byebug (~> 11.0) codecov - decidim - decidim-dev + decidim (~> 0.27.0) + decidim-dev (~> 0.27.0) decidim-spam_detection! faker (~> 2.14) letter_opener_web (~> 1.3) @@ -817,4 +817,4 @@ RUBY VERSION ruby 3.0.6p216 BUNDLED WITH - 2.3.14 + 2.4.6 From b5500455cac385c62b4629fe6a75dbfa77c6c8b6 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:44:54 +0200 Subject: [PATCH 15/23] fix: Npm i --- package-lock.json | 33 +++++++++++++++++++++++++++++++++ yarn.lock | 7 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..df8c721 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,33 @@ +{ + "name": "decidim-spam_detection", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "graphql-ws": "^5.16.0" + } + }, + "node_modules/graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/graphql-ws": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.16.0.tgz", + "integrity": "sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": ">=0.11 <=16" + } + } + } +} diff --git a/yarn.lock b/yarn.lock index 5ded913..586da5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,5 +4,10 @@ graphql-ws@^5.16.0: version "5.16.0" - resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.16.0.tgz#849efe02f384b4332109329be01d74c345842729" + resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.16.0.tgz" integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== + +"graphql@>=0.11 <=16": + version "16.9.0" + resolved "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz" + integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== From 46b022577c4f19ea59ca8db1ee5cab118f1e3067 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:45:03 +0200 Subject: [PATCH 16/23] fix: yarn install --- yarn.lock | 5 ----- 1 file changed, 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 586da5b..e7f2d23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,8 +6,3 @@ graphql-ws@^5.16.0: version "5.16.0" resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.16.0.tgz" integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== - -"graphql@>=0.11 <=16": - version "16.9.0" - resolved "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz" - integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== From 03d3b73e01c2ef89669239af943ca3d1d8f78569 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:47:31 +0200 Subject: [PATCH 17/23] fix: Bump decidim --- Gemfile.lock | 580 ++++++++++++++++++++++++++------------------------- yarn.lock | 5 + 2 files changed, 304 insertions(+), 281 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 87a48ce..8a1526c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,40 +7,40 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7) - actionpack (= 6.1.7) - activesupport (= 6.1.7) + actioncable (6.1.7.9) + actionpack (= 6.1.7.9) + activesupport (= 6.1.7.9) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7) - actionpack (= 6.1.7) - activejob (= 6.1.7) - activerecord (= 6.1.7) - activestorage (= 6.1.7) - activesupport (= 6.1.7) + actionmailbox (6.1.7.9) + actionpack (= 6.1.7.9) + activejob (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) mail (>= 2.7.1) - actionmailer (6.1.7) - actionpack (= 6.1.7) - actionview (= 6.1.7) - activejob (= 6.1.7) - activesupport (= 6.1.7) + actionmailer (6.1.7.9) + actionpack (= 6.1.7.9) + actionview (= 6.1.7.9) + activejob (= 6.1.7.9) + activesupport (= 6.1.7.9) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.7) - actionview (= 6.1.7) - activesupport (= 6.1.7) + actionpack (6.1.7.9) + actionview (= 6.1.7.9) + activesupport (= 6.1.7.9) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7) - actionpack (= 6.1.7) - activerecord (= 6.1.7) - activestorage (= 6.1.7) - activesupport (= 6.1.7) + actiontext (6.1.7.9) + actionpack (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) nokogiri (>= 1.8.5) - actionview (6.1.7) - activesupport (= 6.1.7) + actionview (6.1.7.9) + activesupport (= 6.1.7.9) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -48,22 +48,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.7) - activesupport (= 6.1.7) + activejob (6.1.7.9) + activesupport (= 6.1.7.9) globalid (>= 0.3.6) - activemodel (6.1.7) - activesupport (= 6.1.7) - activerecord (6.1.7) - activemodel (= 6.1.7) - activesupport (= 6.1.7) - activestorage (6.1.7) - actionpack (= 6.1.7) - activejob (= 6.1.7) - activerecord (= 6.1.7) - activesupport (= 6.1.7) + activemodel (6.1.7.9) + activesupport (= 6.1.7.9) + activerecord (6.1.7.9) + activemodel (= 6.1.7.9) + activesupport (= 6.1.7.9) + activestorage (6.1.7.9) + actionpack (= 6.1.7.9) + activejob (= 6.1.7.9) + activerecord (= 6.1.7.9) + activesupport (= 6.1.7.9) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7) + activesupport (6.1.7.9) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -71,10 +71,10 @@ GEM zeitwerk (~> 2.3) acts_as_list (0.9.19) activerecord (>= 3.0) - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) - axe-core-api (4.5.1) + axe-core-api (4.10.0) dumb_delegator virtus axe-core-rspec (4.1.0) @@ -85,8 +85,9 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) + base64 (0.2.0) batch-loader (1.5.0) - bcrypt (3.1.18) + bcrypt (3.1.20) better_html (1.0.16) actionview (>= 4.0) activesupport (>= 4.0) @@ -95,22 +96,23 @@ GEM html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties + bigdecimal (3.1.8) bindex (0.8.1) - bootsnap (1.15.0) + bootsnap (1.18.4) msgpack (~> 1.2) browser (2.7.1) - builder (3.2.4) + builder (3.3.0) byebug (11.1.3) - capybara (3.38.0) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.3) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -129,8 +131,8 @@ GEM cells-rails (0.1.5) actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) - charlock_holmes (0.7.7) - chef-utils (18.0.185) + charlock_holmes (0.7.9) + chef-utils (18.5.0) concurrent-ruby childprocess (4.1.0) codecov (0.6.0) @@ -144,77 +146,79 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - commonmarker (0.23.6) - concurrent-ruby (1.1.10) - crack (0.4.5) + commonmarker (0.23.10) + concurrent-ruby (1.3.4) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.13.0) + css_parser (1.19.1) addressable - date (3.3.3) + csv (3.3.0) + date (3.3.4) date_validator (0.12.0) activemodel (>= 3) activesupport (>= 3) db-query-matchers (0.10.0) activesupport (>= 4.0, < 7) rspec (~> 3.0) - decidim (0.27.1) - decidim-accountability (= 0.27.1) - decidim-admin (= 0.27.1) - decidim-api (= 0.27.1) - decidim-assemblies (= 0.27.1) - decidim-blogs (= 0.27.1) - decidim-budgets (= 0.27.1) - decidim-comments (= 0.27.1) - decidim-core (= 0.27.1) - decidim-debates (= 0.27.1) - decidim-forms (= 0.27.1) - decidim-generators (= 0.27.1) - decidim-meetings (= 0.27.1) - decidim-pages (= 0.27.1) - decidim-participatory_processes (= 0.27.1) - decidim-proposals (= 0.27.1) - decidim-sortitions (= 0.27.1) - decidim-surveys (= 0.27.1) - decidim-system (= 0.27.1) - decidim-templates (= 0.27.1) - decidim-verifications (= 0.27.1) - decidim-accountability (0.27.1) - decidim-comments (= 0.27.1) - decidim-core (= 0.27.1) - decidim-admin (0.27.1) + decidim (0.27.8) + decidim-accountability (= 0.27.8) + decidim-admin (= 0.27.8) + decidim-api (= 0.27.8) + decidim-assemblies (= 0.27.8) + decidim-blogs (= 0.27.8) + decidim-budgets (= 0.27.8) + decidim-comments (= 0.27.8) + decidim-core (= 0.27.8) + decidim-debates (= 0.27.8) + decidim-forms (= 0.27.8) + decidim-generators (= 0.27.8) + decidim-meetings (= 0.27.8) + decidim-pages (= 0.27.8) + decidim-participatory_processes (= 0.27.8) + decidim-proposals (= 0.27.8) + decidim-sortitions (= 0.27.8) + decidim-surveys (= 0.27.8) + decidim-system (= 0.27.8) + decidim-templates (= 0.27.8) + decidim-verifications (= 0.27.8) + decidim-accountability (0.27.8) + decidim-comments (= 0.27.8) + decidim-core (= 0.27.8) + decidim-admin (0.27.8) active_link_to (~> 1.0) - decidim-core (= 0.27.1) + decidim-core (= 0.27.8) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-api (0.27.1) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-api (0.27.8) + decidim-core (= 0.27.8) graphql (~> 1.12, < 1.13) graphql-docs (~> 2.1.0) rack-cors (~> 1.0) - decidim-assemblies (0.27.1) - decidim-core (= 0.27.1) - decidim-blogs (0.27.1) - decidim-admin (= 0.27.1) - decidim-comments (= 0.27.1) - decidim-core (= 0.27.1) - decidim-budgets (0.27.1) - decidim-comments (= 0.27.1) - decidim-core (= 0.27.1) - decidim-comments (0.27.1) - decidim-core (= 0.27.1) + decidim-assemblies (0.27.8) + decidim-core (= 0.27.8) + decidim-blogs (0.27.8) + decidim-admin (= 0.27.8) + decidim-comments (= 0.27.8) + decidim-core (= 0.27.8) + decidim-budgets (0.27.8) + decidim-comments (= 0.27.8) + decidim-core (= 0.27.8) + decidim-comments (0.27.8) + decidim-core (= 0.27.8) redcarpet (~> 3.5, >= 3.5.1) - decidim-core (0.27.1) + decidim-core (0.27.8) active_link_to (~> 1.0) acts_as_list (~> 0.9) batch-loader (~> 1.2) browser (~> 2.7) - carrierwave (~> 2.2.1) + carrierwave (~> 2.2.5, >= 2.2.5) cells-erb (~> 0.1.0) cells-rails (~> 0.1.3) charlock_holmes (~> 0.7) date_validator (~> 0.12.0) - decidim-api (= 0.27.1) devise (~> 4.7) devise-i18n (~> 1.2) diffy (~> 3.3) @@ -227,10 +231,9 @@ GEM hashdiff (>= 0.4.0, < 2.0.0) invisible_captcha (~> 0.12) kaminari (~> 1.2, >= 1.2.1) - loofah (~> 2.3.1) + loofah (~> 2.19.0) mime-types (>= 1.16, < 4.0) mini_magick (~> 4.9) - mustache (~> 1.1.0) omniauth (~> 2.0) omniauth-facebook (~> 5.0) omniauth-google-oauth2 (~> 1.0) @@ -255,17 +258,18 @@ GEM webpacker (= 6.0.0.rc.5) webpush (~> 1.1) wisper (~> 2.0) - decidim-debates (0.27.1) - decidim-comments (= 0.27.1) - decidim-core (= 0.27.1) - decidim-dev (0.27.1) + decidim-debates (0.27.8) + decidim-comments (= 0.27.8) + decidim-core (= 0.27.8) + decidim-dev (0.27.8) axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.10.0) - decidim (= 0.27.1) + decidim (= 0.27.8) erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) + faker (= 2.19.0) i18n-tasks (~> 0.9.18) mdl (~> 0.5) nokogiri (~> 1.13) @@ -286,68 +290,67 @@ GEM w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-forms (0.27.1) - decidim-core (= 0.27.1) + decidim-forms (0.27.8) + decidim-core (= 0.27.8) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.27.1) - decidim-core (= 0.27.1) - decidim-meetings (0.27.1) - decidim-core (= 0.27.1) - decidim-forms (= 0.27.1) + decidim-generators (0.27.8) + decidim-core (= 0.27.8) + decidim-meetings (0.27.8) + decidim-core (= 0.27.8) + decidim-forms (= 0.27.8) icalendar (~> 2.5) - decidim-pages (0.27.1) - decidim-core (= 0.27.1) - decidim-participatory_processes (0.27.1) - decidim-core (= 0.27.1) - decidim-proposals (0.27.1) - decidim-comments (= 0.27.1) - decidim-core (= 0.27.1) + decidim-pages (0.27.8) + decidim-core (= 0.27.8) + decidim-participatory_processes (0.27.8) + decidim-core (= 0.27.8) + decidim-proposals (0.27.8) + decidim-comments (= 0.27.8) + decidim-core (= 0.27.8) doc2text (~> 0.4.5) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.27.1) - decidim-admin (= 0.27.1) - decidim-comments (= 0.27.1) - decidim-core (= 0.27.1) - decidim-proposals (= 0.27.1) - decidim-surveys (0.27.1) - decidim-core (= 0.27.1) - decidim-forms (= 0.27.1) - decidim-templates (= 0.27.1) - decidim-system (0.27.1) + decidim-sortitions (0.27.8) + decidim-admin (= 0.27.8) + decidim-comments (= 0.27.8) + decidim-core (= 0.27.8) + decidim-proposals (= 0.27.8) + decidim-surveys (0.27.8) + decidim-core (= 0.27.8) + decidim-forms (= 0.27.8) + decidim-system (0.27.8) active_link_to (~> 1.0) - decidim-core (= 0.27.1) + decidim-core (= 0.27.8) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-templates (0.27.1) - decidim-core (= 0.27.1) - decidim-forms (= 0.27.1) - decidim-verifications (0.27.1) - decidim-core (= 0.27.1) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-templates (0.27.8) + decidim-core (= 0.27.8) + decidim-forms (= 0.27.8) + decidim-verifications (0.27.8) + decidim-core (= 0.27.8) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.8.1) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-i18n (1.10.2) - devise (>= 4.8.0) - devise_invitable (2.0.6) + devise-i18n (1.12.1) + devise (>= 4.9.0) + devise_invitable (2.0.9) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.5.0) + diff-lcs (1.5.1) diffy (3.4.2) - doc2text (0.4.5) - nokogiri (>= 1.13.2, < 1.14.0) + doc2text (0.4.7) + nokogiri (>= 1.13.2, < 1.17.0) rubyzip (~> 2.3.0) - docile (1.4.0) - doorkeeper (5.6.2) + docile (1.4.1) + doorkeeper (5.7.1) railties (>= 5) doorkeeper-i18n (4.0.1) dumb_delegator (1.0.0) @@ -361,10 +364,10 @@ GEM smart_properties erbse (0.1.4) temple - erubi (1.12.0) + erubi (1.13.0) escape_utils (1.3.0) - excon (0.96.0) - execjs (2.8.1) + excon (0.112.0) + execjs (2.9.1) extended-markdown-filter (0.7.0) html-pipeline (~> 2.9) factory_bot (4.11.1) @@ -372,17 +375,19 @@ GEM factory_bot_rails (4.11.1) factory_bot (~> 4.11.1) railties (>= 3.0.0) - faker (2.23.0) - i18n (>= 1.8.11, < 2) - faraday (2.7.2) - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-net_http (3.0.2) - ffi (1.15.5) + faker (2.19.0) + i18n (>= 1.6, < 2) + faraday (2.12.0) + faraday-net_http (>= 2.0, < 3.4) + json + logger + faraday-net_http (3.3.0) + net-http + ffi (1.17.0-arm64-darwin) file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-core (2.3.0) + fog-core (2.5.0) builder excon (~> 0.71) formatador (>= 0.2, < 2.0) @@ -396,9 +401,11 @@ GEM activesupport (>= 4.1, < 7.1) railties (>= 4.1, < 7.1) gemoji (3.0.1) - geocoder (1.8.1) - globalid (1.0.0) - activesupport (>= 5.0) + geocoder (1.8.3) + base64 (>= 0.1.0) + csv (>= 3.0.0) + globalid (1.2.1) + activesupport (>= 6.1) graphql (1.12.24) graphql-docs (2.1.0) commonmarker (~> 0.16) @@ -408,16 +415,17 @@ GEM graphql (~> 1.12) html-pipeline (~> 2.9) sass (~> 3.4) - hashdiff (1.0.1) + hashdiff (1.1.1) hashie (5.0.0) - highline (2.1.0) + highline (3.1.1) + reline hkdf (0.3.0) html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) - html_tokenizer (0.0.7) + html_tokenizer (0.0.8) htmlentities (4.3.4) - i18n (1.12.0) + i18n (1.14.6) concurrent-ruby (~> 1.0) i18n-tasks (0.9.37) activesupport (>= 4.0.2) @@ -429,17 +437,20 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.8.0) + icalendar (2.10.3) ice_cube (~> 0.16) - ice_cube (0.16.4) + ostruct + ice_cube (0.17.0) ice_nine (0.11.2) - image_processing (1.12.2) + image_processing (1.13.0) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - json (2.6.3) - jwt (2.6.0) + io-console (0.7.2) + json (2.7.2) + jwt (2.9.3) + base64 kaminari (1.2.2) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.2) @@ -458,59 +469,60 @@ GEM kramdown (~> 2.0) launchy (2.5.2) addressable (~> 2.8) - letter_opener (1.8.1) - launchy (>= 2.2, < 3) + letter_opener (1.10.0) + launchy (>= 2.2, < 4) letter_opener_web (1.4.1) actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - listen (3.7.1) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.3.1) + logger (1.6.1) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.8.0) + 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) - mdl (0.12.0) + mdl (0.13.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) mixlib-cli (~> 2.1, >= 2.1.1) mixlib-config (>= 2.2.1, < 4) mixlib-shellout - method_source (1.0.0) - mime-types (3.4.1) + method_source (1.1.0) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) - mini_magick (4.12.0) - mini_mime (1.1.2) - minitest (5.17.0) + mime-types-data (3.2024.1001) + mini_magick (4.13.2) + mini_mime (1.1.5) + minitest (5.25.1) mixlib-cli (2.1.8) mixlib-config (3.0.27) tomlrb - mixlib-shellout (3.2.7) + mixlib-shellout (3.3.3) chef-utils - msgpack (1.6.0) + msgpack (1.7.3) multi_xml (0.6.0) - mustache (1.1.1) - net-imap (0.3.4) + net-http (0.4.1) + uri + net-imap (0.4.17) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.5.0) net-protocol - nio4r (2.5.8) - nokogiri (1.13.10-arm64-darwin) - racc (~> 1.4) - nokogiri (1.13.10-x86_64-linux) + nio4r (2.7.3) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) @@ -525,134 +537,141 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - omniauth (2.1.0) + omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.1.1) - jwt (>= 2.0) - oauth2 (~> 2.0.6) + omniauth-google-oauth2 (1.2.0) + jwt (>= 2.9) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) - omniauth-oauth (1.2.0) + omniauth-oauth2 (~> 1.8) + omniauth-oauth (1.2.1) oauth omniauth (>= 1.0, < 3) + rack (>= 1.6.2, < 4) omniauth-oauth2 (1.8.0) oauth2 (>= 1.4, < 3) omniauth (~> 2.0) - omniauth-rails_csrf_protection (1.0.1) + omniauth-rails_csrf_protection (1.0.2) actionpack (>= 4.2) omniauth (~> 2.0) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack orm_adapter (0.5.0) + ostruct (0.6.0) paper_trail (12.3.0) activerecord (>= 5.2) request_store (~> 1.1) - parallel (1.22.1) + parallel (1.26.3) parallel_tests (3.13.0) parallel - parser (3.2.0.0) + parser (3.3.5.0) ast (~> 2.4.1) + racc pg (1.1.4) - pg_search (2.3.6) - activerecord (>= 5.2) - activesupport (>= 5.2) - premailer (1.18.0) + pg_search (2.3.7) + activerecord (>= 6.1) + activesupport (>= 6.1) + premailer (1.27.0) addressable - css_parser (>= 1.12.0) + css_parser (>= 1.19.0) htmlentities (>= 4.0.0) premailer-rails (1.12.0) actionmailer (>= 3) net-smtp premailer (~> 1.7, >= 1.7.9) - public_suffix (5.0.1) - puma (5.6.5) + public_suffix (6.0.1) + puma (5.6.9) nio4r (~> 2.0) - racc (1.6.2) - rack (2.2.5) - rack-attack (6.6.1) - rack (>= 1.0, < 3) + racc (1.8.1) + rack (2.2.10) + rack-attack (6.7.0) + rack (>= 1.0, < 4) rack-cors (1.1.1) rack (>= 2.0.0) - rack-protection (3.0.5) - rack - rack-proxy (0.7.4) + rack-protection (3.2.0) + base64 (>= 0.1.0) + rack (~> 2.2, >= 2.2.4) + rack-proxy (0.7.7) rack - rack-test (2.0.2) + rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7) - actioncable (= 6.1.7) - actionmailbox (= 6.1.7) - actionmailer (= 6.1.7) - actionpack (= 6.1.7) - actiontext (= 6.1.7) - actionview (= 6.1.7) - activejob (= 6.1.7) - activemodel (= 6.1.7) - activerecord (= 6.1.7) - activestorage (= 6.1.7) - activesupport (= 6.1.7) + rails (6.1.7.9) + actioncable (= 6.1.7.9) + actionmailbox (= 6.1.7.9) + actionmailer (= 6.1.7.9) + actionpack (= 6.1.7.9) + actiontext (= 6.1.7.9) + actionview (= 6.1.7.9) + activejob (= 6.1.7.9) + activemodel (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) bundler (>= 1.15.0) - railties (= 6.1.7) + railties (= 6.1.7.9) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) rails-i18n (6.0.0) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 7) - railties (6.1.7) - actionpack (= 6.1.7) - activesupport (= 6.1.7) + railties (6.1.7.9) + actionpack (= 6.1.7.9) + activesupport (= 6.1.7.9) method_source rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) - rake (13.0.6) + rake (13.2.1) ransack (2.4.2) activerecord (>= 5.2.4) activesupport (>= 5.2.4) i18n rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) - redcarpet (3.5.1) - redis (4.8.0) - regexp_parser (2.6.1) + redcarpet (3.6.0) + redis (4.8.1) + regexp_parser (2.9.2) + reline (0.5.10) + io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) - rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-cells (0.3.8) + responders (3.1.1) + actionpack (>= 5.2) + railties (>= 5.2) + rexml (3.3.8) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-cells (0.3.9) cells (>= 4.0.0, < 6.0.0) - rspec-rails (>= 3.0.0, < 6.1.0) - rspec-core (3.12.0) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.1) + rspec-rails (>= 3.0.0, < 6.2.0) + rspec-core (3.13.1) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.12.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -663,7 +682,7 @@ GEM rspec-support (~> 3.10) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.12.0) + rspec-support (3.13.1) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (1.28.2) @@ -675,8 +694,8 @@ GEM rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.24.1) - parser (>= 3.1.1.0) + rubocop-ast (1.32.3) + parser (>= 3.3.1.0) rubocop-faker (1.1.0) faker (>= 2.12.0) rubocop (>= 0.82.0) @@ -686,11 +705,11 @@ GEM rubocop (>= 1.7.0, < 2.0) rubocop-rspec (2.11.1) rubocop (~> 1.19) - ruby-progressbar (1.11.0) - ruby-vips (2.1.4) + ruby-progressbar (1.13.0) + ruby-vips (2.2.2) ffi (~> 1.12) - ruby2_keywords (0.0.5) - rubyXL (3.4.25) + logger + rubyXL (3.4.27) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) @@ -712,7 +731,7 @@ GEM simplecov-cobertura (2.1.0) rexml simplecov (~> 0.19) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) smart_properties (1.17.0) snaky_hash (2.0.1) @@ -724,30 +743,31 @@ GEM spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (4.2.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - ssrf_filter (1.1.1) - temple (0.9.1) + ssrf_filter (1.1.2) + temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - thor (1.2.1) + thor (1.3.2) thread_safe (0.3.6) - tilt (2.0.11) - timeout (0.3.1) + tilt (2.4.0) + timeout (0.4.1) tomlrb (2.0.3) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (2.4.2) + unicode-display_width (2.6.0) + uri (0.13.1) valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) - version_gem (1.1.1) + version_gem (1.1.4) virtus (2.0.0) axiom-types (~> 0.1) coercible (~> 1.0) @@ -762,12 +782,12 @@ GEM rexml (~> 3.2) warden (1.2.9) rack (>= 2.0.9) - web-console (4.2.0) + web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.18.1) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -779,22 +799,20 @@ GEM webpush (1.1.0) hkdf (~> 0.2) jwt (~> 2.0) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked_pdf (2.6.3) + wicked_pdf (2.8.1) activesupport wisper (2.0.1) wisper-rspec (1.1.0) - wkhtmltopdf-binary (0.12.6.6) + wkhtmltopdf-binary (0.12.6.8) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.6) + zeitwerk (2.6.18) PLATFORMS - arm64-darwin-21 arm64-darwin-22 - x86_64-linux DEPENDENCIES bootsnap (~> 1.4) diff --git a/yarn.lock b/yarn.lock index e7f2d23..586da5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,3 +6,8 @@ graphql-ws@^5.16.0: version "5.16.0" resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.16.0.tgz" integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== + +"graphql@>=0.11 <=16": + version "16.9.0" + resolved "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz" + integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== From 3217e347da53f068f1825a5381e7d3306aceab1e Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:48:48 +0200 Subject: [PATCH 18/23] ci: Add x86_64 linux support --- Gemfile.lock | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8a1526c..26f67dc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -383,7 +383,7 @@ GEM logger faraday-net_http (3.3.0) net-http - ffi (1.17.0-arm64-darwin) + ffi (1.17.0) file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) @@ -524,6 +524,8 @@ GEM nio4r (2.7.3) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) + nokogiri (1.16.7-x86_64-linux) + racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) snaky_hash (~> 2.0) @@ -813,6 +815,7 @@ GEM PLATFORMS arm64-darwin-22 + x86_64-linux DEPENDENCIES bootsnap (~> 1.4) From 05dc1133ae03eb06689cd863f5e39ad69603566a Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 17:57:06 +0200 Subject: [PATCH 19/23] ci: Add missing js deps...again... --- Rakefile | 1 + package.json | 1 + yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index 4b15ce5..16e7477 100644 --- a/Rakefile +++ b/Rakefile @@ -8,6 +8,7 @@ def js_configuration(path) Dir.chdir(path) do FileUtils.cp(babel_file_path, "babel.config.json") system("yarn add graphql-ws") + system("yarn add @tarekraafat/autocomplete.js") system("yarn add @babel/plugin-proposal-private-methods") system("yarn add @babel/plugin-proposal-private-property-in-object") system("yarn install") diff --git a/package.json b/package.json index 98a1a26..1193d64 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "@tarekraafat/autocomplete.js": "^10.2.8", "graphql-ws": "^5.16.0" } } diff --git a/yarn.lock b/yarn.lock index 586da5b..5e37497 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,12 +2,12 @@ # yarn lockfile v1 +"@tarekraafat/autocomplete.js@^10.2.8": + version "10.2.8" + resolved "https://registry.yarnpkg.com/@tarekraafat/autocomplete.js/-/autocomplete.js-10.2.8.tgz#d12f1a8c32bb766281d5022fd0a6ddd5f5b9afe9" + integrity sha512-vQuhtUSpSOJijDP4kHyZhPvZaNoRTDqJUQXIIt5cUPxdxcrajaK6gGyEhFdzmt505cgd2zrgA/HRzbGcAG8H7w== + graphql-ws@^5.16.0: version "5.16.0" resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.16.0.tgz" integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== - -"graphql@>=0.11 <=16": - version "16.9.0" - resolved "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz" - integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== From e55028d17262a26cc7bd891884878a2073d916be Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 18:03:42 +0200 Subject: [PATCH 20/23] ci: Remove assets precompilation --- .github/workflows/ci_cd.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 261bf48..0f03504 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -58,14 +58,6 @@ jobs: - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots name: Create the screenshots folder - uses: nanasess/setup-chromedriver@v2 - - name: Run precompile if needed - run: | - if [[ -d "app/views" ]] || [[ -d "spec/mailers" ]] || [[ -d "spec/system" ]]; then - cd "spec/decidim_dummy_app" - bundle exec rails assets:precompile - else - echo "No need to precompile assets since system folder is empty" - fi - run: bundle exec rspec name: RSpec - uses: codecov/codecov-action@v1 From f5b6b924b3b15b617cdcd9d1c0b2263cd66903a5 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 18:09:03 +0200 Subject: [PATCH 21/23] ci: Remove codecov --- .github/workflows/ci_cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 0f03504..134dbb1 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -60,7 +60,6 @@ jobs: - uses: nanasess/setup-chromedriver@v2 - run: bundle exec rspec name: RSpec - - uses: codecov/codecov-action@v1 - uses: actions/upload-artifact@v3 if: always() with: From 4f0720ef051e5ca1d6f3b152763c1ef973e515df Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 18:14:46 +0200 Subject: [PATCH 22/23] ci: Disable codecov --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 134dbb1..a43177c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -3,7 +3,7 @@ on: [push] env: CI: "true" - CODECOV: "true" + CODECOV: "false" jobs: lint: From 394420f9525d3ebd48c93d61e2f02d4719a1a943 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 20:16:58 +0200 Subject: [PATCH 23/23] ci: Remove codecov --- .github/workflows/ci_cd.yml | 3 +-- spec/spec_helper.rb | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index a43177c..a27a47d 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -3,7 +3,6 @@ on: [push] env: CI: "true" - CODECOV: "false" jobs: lint: @@ -107,4 +106,4 @@ jobs: gem build *.gemspec gem push *.gem env: - GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}" \ No newline at end of file + GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4dcba46..b08e48e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -require "simplecov" -require "codecov" - -SimpleCov.start "rails" -SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV["CODECOV"] - require "decidim/dev" ENV["ENGINE_ROOT"] = File.dirname(__dir__)