From 631de798f63ec26d76d0cc382a82fb4ec1793c46 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 14 Nov 2024 15:16:40 +0100 Subject: [PATCH 1/3] bump: Module spam detection to 4.1.2 --- Gemfile | 2 +- Gemfile.lock | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 4c96bb4..acc2c0e 100644 --- a/Gemfile +++ b/Gemfile @@ -32,7 +32,7 @@ gem "decidim-half_signup", git: "https://github.com/OpenSourcePolitics/decidim-m gem "decidim-homepage_interactive_map", git: "https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map.git", branch: DECIDIM_BRANCH gem "decidim-ludens", git: "https://github.com/OpenSourcePolitics/decidim-ludens.git", branch: DECIDIM_BRANCH gem "decidim-phone_authorization_handler", git: "https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler", branch: "release/0.27-stable" -gem "decidim-spam_detection" +gem "decidim-spam_detection", git: "https://github.com/OpenSourcePolitics/decidim-spam_detection.git", tag: "4.1.2" gem "decidim-survey_multiple_answers", git: "https://github.com/OpenSourcePolitics/decidim-module-survey_multiple_answers" gem "decidim-term_customizer", git: "https://github.com/OpenSourcePolitics/decidim-module-term_customizer.git", branch: "fix/email_with_precompile" diff --git a/Gemfile.lock b/Gemfile.lock index 60059d8..c7d6e48 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,14 @@ GIT decidim-phone_authorization_handler (1.0.0) decidim-core (~> 0.27) +GIT + remote: https://github.com/OpenSourcePolitics/decidim-spam_detection.git + revision: 5e4f92f19b903228b8349fb002d735e900d63ed4 + tag: 4.1.2 + specs: + decidim-spam_detection (4.1.2) + decidim-core (~> 0.27.0) + GIT remote: https://github.com/OpenSourcePolitics/omniauth-france_connect revision: 14a53ad31928c8a83742360cfbdb90938d0a057e @@ -521,8 +529,6 @@ GEM decidim-comments (= 0.27.4) decidim-core (= 0.27.4) decidim-proposals (= 0.27.4) - decidim-spam_detection (4.0.0) - decidim-core (~> 0.27.0) decidim-surveys (0.27.4) decidim-core (= 0.27.4) decidim-forms (= 0.27.4) @@ -1165,7 +1171,7 @@ DEPENDENCIES decidim-initiatives (~> 0.27.0) decidim-ludens! decidim-phone_authorization_handler! - decidim-spam_detection + decidim-spam_detection! decidim-survey_multiple_answers! decidim-templates (~> 0.27.0) decidim-term_customizer! @@ -1205,4 +1211,4 @@ RUBY VERSION ruby 3.0.6p216 BUNDLED WITH - 2.4.9 + 2.5.22 From c1cdb44b3b55af83310468b0b115beaa54a7b6f4 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 14 Nov 2024 15:16:50 +0100 Subject: [PATCH 2/3] fix: Makefile docker compose commands --- Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 5430ec8..02697ad 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ run: up @make create-seeds up: build - docker-compose -f docker-compose.local.yml up -d + docker compose -f docker-compose.local.yml up -d @make setup-database build: @@ -10,33 +10,33 @@ build: # Stops containers and remove volumes teardown: - docker-compose -f docker-compose.local.yml down -v --rmi all + docker compose -f docker-compose.local.yml down -v --rmi all create-database: - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:create' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:create' setup-database: create-database - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:migrate' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:migrate' # Create seeds create-seeds: - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:schema:load db:seed' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:schema:load db:seed' # Restore dump restore-dump: bundle exec rake restore_dump shell: - docker-compose -f docker-compose.local.yml exec app /bin/bash + docker compose -f docker-compose.local.yml exec app /bin/bash restart: - docker-compose -f docker-compose.local.yml up -d + docker compose -f docker-compose.local.yml up -d status: - docker-compose -f docker-compose.local.yml ps + docker compose -f docker-compose.local.yml ps logs: - docker-compose -f docker-compose.local.yml logs app + docker compose -f docker-compose.local.yml logs app external: @if [ -z "$(IP)" ]; then \ @@ -44,11 +44,11 @@ external: echo "You can discover your IP as follow : \n > ifconfig | grep netmask | grep -v 127.0.0.1 | awk '{print \$$2}' | tail -n1"; \ exit 1; \ fi - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rails runner "puts Decidim::Organization.first.update(host: \"$(IP)\")"'; \ + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rails runner "puts Decidim::Organization.first.update(host: \"$(IP)\")"'; \ echo "Decidim organization host updated to $(IP)"; \ echo "App is now accessible at https://$(IP):3000"; rebuild: - docker-compose -f docker-compose.local.yml down + docker compose -f docker-compose.local.yml down docker volume rm decidim-app_shared-volume || true @make up From 90f47579bb4f03bc2f87a8bc9bf60344da449eb0 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 14 Nov 2024 16:05:25 +0100 Subject: [PATCH 3/3] ci: Fix chromedriver version --- .github/workflows/ci_cd.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 828762d..146a88e 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -89,6 +89,7 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - run: | + sudo apt install libu2f-udev wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${{env.CHROME_VERSION}}-1_amd64.deb sudo dpkg -i /tmp/chrome.deb rm /tmp/chrome.deb @@ -161,6 +162,12 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true + - run: | + sudo apt install libu2f-udev + wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${{env.CHROME_VERSION}}-1_amd64.deb + sudo dpkg -i /tmp/chrome.deb + rm /tmp/chrome.deb + name: Install Chrome version ${{ env.CHROME_VERSION }} - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} @@ -264,4 +271,4 @@ jobs: namespace: ${{ vars.REGISTRY_NAMESPACE }} password: ${{ secrets.TOKEN }} image_name: ${{ vars.IMAGE_NAME }} - tag: ${{ steps.tag_version.outputs.new_tag }} + tag: ${{ steps.tag_version.outputs.new_tag }} \ No newline at end of file