From 4b9a6374afa49044fbce75d0339c8603e7a30aa5 Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 14:58:30 +0100 Subject: [PATCH 1/9] update 0.29 --- Gemfile | 10 +- Gemfile.lock | 1259 ++++++++++---------- config/shakapacker.yml | 89 ++ decidim-anonymous_proposals.gemspec | 4 +- lib/decidim/anonymous_proposals/version.rb | 4 +- 5 files changed, 744 insertions(+), 622 deletions(-) create mode 100644 config/shakapacker.yml diff --git a/Gemfile b/Gemfile index cb35275..7664eb8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -DECIDIM_VERSION = ">= 0.25.0" +DECIDIM_VERSION = { github: "decidim/decidim", branch: "release/0.29-stable" }.freeze source "https://rubygems.org" @@ -20,10 +20,8 @@ group :development, :test do end group :development do - gem "faker", "~> 1.9" - gem "letter_opener_web", "~> 1.3" - gem "listen", "~> 3.1" - gem "spring", "~> 2.0" - gem "spring-watcher-listen", "~> 2.0" + gem "faker", "~> 3.2" + gem "letter_opener_web" + gem "listen" gem "web-console", "~> 3.5" end diff --git a/Gemfile.lock b/Gemfile.lock index 7c4efbd..f4d9242 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,45 +1,230 @@ +GIT + remote: https://github.com/decidim/decidim.git + revision: b730d70baced751ab70e97e1adb5ab488578d46d + branch: release/0.29-stable + specs: + decidim (0.29.2) + decidim-accountability (= 0.29.2) + decidim-admin (= 0.29.2) + decidim-api (= 0.29.2) + decidim-assemblies (= 0.29.2) + decidim-blogs (= 0.29.2) + decidim-budgets (= 0.29.2) + decidim-comments (= 0.29.2) + decidim-core (= 0.29.2) + decidim-debates (= 0.29.2) + decidim-forms (= 0.29.2) + decidim-generators (= 0.29.2) + decidim-meetings (= 0.29.2) + decidim-pages (= 0.29.2) + decidim-participatory_processes (= 0.29.2) + decidim-proposals (= 0.29.2) + decidim-sortitions (= 0.29.2) + decidim-surveys (= 0.29.2) + decidim-system (= 0.29.2) + decidim-verifications (= 0.29.2) + decidim-accountability (0.29.2) + decidim-comments (= 0.29.2) + decidim-core (= 0.29.2) + decidim-admin (0.29.2) + active_link_to (~> 1.0) + decidim-core (= 0.29.2) + devise (~> 4.7) + devise-i18n (~> 1.2) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-api (0.29.2) + decidim-core (= 0.29.2) + graphql (~> 2.2.6) + graphql-docs (~> 4.0) + rack-cors (~> 1.0) + decidim-assemblies (0.29.2) + decidim-core (= 0.29.2) + decidim-blogs (0.29.2) + decidim-admin (= 0.29.2) + decidim-comments (= 0.29.2) + decidim-core (= 0.29.2) + decidim-budgets (0.29.2) + decidim-comments (= 0.29.2) + decidim-core (= 0.29.2) + decidim-comments (0.29.2) + decidim-core (= 0.29.2) + redcarpet (~> 3.5, >= 3.5.1) + decidim-core (0.29.2) + active_link_to (~> 1.0) + acts_as_list (~> 1.0) + batch-loader (~> 1.2) + browser (~> 2.7) + cells-erb (~> 0.1.0) + cells-rails (~> 0.1.3) + charlock_holmes (~> 0.7) + concurrent-ruby (= 1.3.4) + date_validator (~> 0.12.0) + devise (~> 4.7) + devise-i18n (~> 1.2, < 1.11.1) + diffy (~> 3.3) + doorkeeper (~> 5.6, >= 5.6.6) + doorkeeper-i18n (~> 4.0) + file_validators (~> 3.0) + fog-local (~> 0.6) + foundation_rails_helper (~> 4.0) + geocoder (~> 1.8) + hashdiff (>= 0.4.0, < 2.0.0) + image_processing (~> 1.2) + invisible_captcha (~> 0.12) + kaminari (~> 1.2, >= 1.2.1) + loofah (~> 2.19, >= 2.19.1) + mime-types (>= 1.16, < 4.0) + mini_magick (~> 4.9) + net-smtp (~> 0.3.1) + nokogiri (~> 1.16, >= 1.16.2) + omniauth (~> 2.0) + omniauth-facebook (~> 5.0) + omniauth-google-oauth2 (~> 1.0) + omniauth-rails_csrf_protection (~> 1.0) + omniauth-twitter (~> 1.4) + paper_trail (~> 12.0) + pg (~> 1.4.0, < 2) + pg_search (~> 2.2) + premailer-rails (~> 1.10) + psych (~> 4.0) + rack (~> 2.2, >= 2.2.8.1) + rack-attack (~> 6.0) + rails (~> 7.0.8) + rails-i18n (~> 7.0) + ransack (~> 3.2.1) + redis (~> 4.1) + request_store (~> 1.5.0) + rubyXL (~> 3.4) + rubyzip (~> 2.0) + shakapacker (~> 7.1.0) + valid_email2 (~> 4.0) + web-push (~> 3.0) + wisper (~> 2.0) + decidim-debates (0.29.2) + decidim-comments (= 0.29.2) + decidim-core (= 0.29.2) + decidim-dev (0.29.2) + bullet (~> 7.1.6) + byebug (~> 11.0) + capybara (~> 3.39) + decidim (= 0.29.2) + erb_lint (~> 0.4.0) + factory_bot_rails (~> 6.2) + faker (~> 3.2) + i18n-tasks (~> 1.0) + nokogiri (~> 1.16, >= 1.16.2) + parallel_tests (~> 4.2) + puma (~> 6.2, >= 6.3.1) + rails-controller-testing (~> 1.0) + rspec (~> 3.12) + rspec-cells (~> 0.3.7) + rspec-html-matchers (~> 0.10) + rspec-rails (~> 6.0) + rspec-retry (~> 0.6.2) + rspec_junit_formatter (~> 0.6.0) + rubocop (~> 1.65.0) + rubocop-capybara (~> 2.21) + rubocop-factory_bot (~> 2.26) + rubocop-faker (~> 1.1) + rubocop-performance (~> 1.21) + rubocop-rails (~> 2.25) + rubocop-rspec (~> 3.0) + rubocop-rspec_rails (~> 2.30) + rubocop-rubycw (~> 0.1) + selenium-webdriver (~> 4.9) + simplecov (~> 0.22.0) + simplecov-cobertura (~> 2.1.0) + spring (~> 4.0) + spring-watcher-listen (~> 2.0) + w3c_rspec_validators (~> 0.3.0) + webmock (~> 3.18) + wisper-rspec (~> 1.0) + decidim-forms (0.29.2) + decidim-core (= 0.29.2) + wicked_pdf (~> 2.1) + decidim-generators (0.29.2) + decidim-core (= 0.29.2) + decidim-meetings (0.29.2) + decidim-core (= 0.29.2) + decidim-forms (= 0.29.2) + icalendar (~> 2.5) + decidim-pages (0.29.2) + decidim-core (= 0.29.2) + decidim-participatory_processes (0.29.2) + decidim-core (= 0.29.2) + decidim-proposals (0.29.2) + decidim-comments (= 0.29.2) + decidim-core (= 0.29.2) + doc2text (~> 0.4.7) + redcarpet (~> 3.5, >= 3.5.1) + decidim-sortitions (0.29.2) + decidim-admin (= 0.29.2) + decidim-comments (= 0.29.2) + decidim-core (= 0.29.2) + decidim-proposals (= 0.29.2) + decidim-surveys (0.29.2) + decidim-core (= 0.29.2) + decidim-forms (= 0.29.2) + decidim-system (0.29.2) + active_link_to (~> 1.0) + decidim-core (= 0.29.2) + devise (~> 4.7) + devise-i18n (~> 1.2) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-verifications (0.29.2) + decidim-core (= 0.29.2) + PATH remote: . specs: - decidim-anonymous_proposals (0.25.2) - decidim-core (>= 0.25.0) - deface (~> 1.5) + decidim-anonymous_proposals (0.29) + decidim-core (>= 0.29) + deface (~> 1.9) GEM remote: https://rubygems.org/ specs: - actioncable (6.0.4.1) - actionpack (= 6.0.4.1) + actioncable (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.4.1) - actionpack (= 6.0.4.1) - activejob (= 6.0.4.1) - activerecord (= 6.0.4.1) - activestorage (= 6.0.4.1) - activesupport (= 6.0.4.1) + actionmailbox (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (>= 2.7.1) - actionmailer (6.0.4.1) - actionpack (= 6.0.4.1) - actionview (= 6.0.4.1) - activejob (= 6.0.4.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.8.7) + actionpack (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.0.4.1) - actionview (= 6.0.4.1) - activesupport (= 6.0.4.1) - rack (~> 2.0, >= 2.0.8) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.4.1) - actionpack (= 6.0.4.1) - activerecord (= 6.0.4.1) - activestorage (= 6.0.4.1) - activesupport (= 6.0.4.1) + actiontext (7.0.8.7) + actionpack (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.0.4.1) - activesupport (= 6.0.4.1) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -47,716 +232,561 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.0.4.1) - activesupport (= 6.0.4.1) + activejob (7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.3.6) - activemodel (6.0.4.1) - activesupport (= 6.0.4.1) - activerecord (6.0.4.1) - activemodel (= 6.0.4.1) - activesupport (= 6.0.4.1) - activestorage (6.0.4.1) - actionpack (= 6.0.4.1) - activejob (= 6.0.4.1) - activerecord (= 6.0.4.1) - marcel (~> 1.0.0) - activesupport (6.0.4.1) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) + activerecord (7.0.8.7) + activemodel (= 7.0.8.7) + activesupport (= 7.0.8.7) + activestorage (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activesupport (= 7.0.8.7) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.8.7) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) - acts_as_list (0.9.19) - activerecord (>= 3.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - anchored (1.1.0) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + acts_as_list (1.2.4) + activerecord (>= 6.1) + activesupport (>= 6.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) - axe-core-api (4.3.2) - dumb_delegator - virtus - axe-core-rspec (4.1.0) - axe-core-api - dumb_delegator - virtus - axiom-types (0.1.1) - 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.16) - better_html (1.0.16) - actionview (>= 4.0) - activesupport (>= 4.0) + bcrypt (3.1.20) + better_html (2.1.1) + actionview (>= 6.0) + activesupport (>= 6.0) ast (~> 2.0) erubi (~> 1.4) - html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties + bigdecimal (3.1.9) bindex (0.8.1) - bootsnap (1.9.1) - msgpack (~> 1.0) + bootsnap (1.18.4) + msgpack (~> 1.2) browser (2.7.1) - builder (3.2.4) + builder (3.3.0) + bullet (7.1.6) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.11) byebug (11.1.3) - capybara (3.36.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.2) - activemodel (>= 5.0.0) - activesupport (>= 5.0.0) - addressable (~> 2.6) - image_processing (~> 1.1) - marcel (~> 1.0.0) - mini_mime (>= 0.1.3) - ssrf_filter (~> 1.0) - cells (4.1.7) - declarative-builder (< 0.2.0) + cells (4.1.8) + declarative-builder (~> 0.2.0) declarative-option (< 0.2.0) tilt (>= 1.4, < 3) uber (< 0.2.0) cells-erb (0.1.0) cells (~> 4.0) erbse (>= 0.1.1) - cells-rails (0.1.4) + cells-rails (0.1.6) actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) - charlock_holmes (0.7.7) - chef-utils (17.7.29) - concurrent-ruby - childprocess (3.0.0) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (5.0.0) - coffee-script (>= 2.2.0) - railties (>= 5.2.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) - concurrent-ruby (1.1.9) - crack (0.4.5) + charlock_holmes (0.7.9) + childprocess (5.1.0) + logger (~> 1.5) + commonmarker (0.23.11) + concurrent-ruby (1.3.4) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.10.0) + css_parser (1.21.1) addressable - date_validator (0.9.0) - activemodel - activesupport - db-query-matchers (0.10.0) - activesupport (>= 4.0, < 7) - rspec (~> 3.0) - decidim (0.25.1) - decidim-accountability (= 0.25.1) - decidim-admin (= 0.25.1) - decidim-api (= 0.25.1) - decidim-assemblies (= 0.25.1) - decidim-blogs (= 0.25.1) - decidim-budgets (= 0.25.1) - decidim-comments (= 0.25.1) - decidim-core (= 0.25.1) - decidim-debates (= 0.25.1) - decidim-forms (= 0.25.1) - decidim-generators (= 0.25.1) - decidim-meetings (= 0.25.1) - decidim-pages (= 0.25.1) - decidim-participatory_processes (= 0.25.1) - decidim-proposals (= 0.25.1) - decidim-sortitions (= 0.25.1) - decidim-surveys (= 0.25.1) - decidim-system (= 0.25.1) - decidim-templates (= 0.25.1) - decidim-verifications (= 0.25.1) - decidim-accountability (0.25.1) - decidim-comments (= 0.25.1) - decidim-core (= 0.25.1) - decidim-admin (0.25.1) - active_link_to (~> 1.0) - decidim-core (= 0.25.1) - devise (~> 4.7) - devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-api (0.25.1) - graphql (~> 1.12, >= 1.12.3) - rack-cors (~> 1.0) - redcarpet (~> 3.5, >= 3.5.1) - decidim-assemblies (0.25.1) - decidim-core (= 0.25.1) - decidim-blogs (0.25.1) - decidim-admin (= 0.25.1) - decidim-comments (= 0.25.1) - decidim-core (= 0.25.1) - decidim-budgets (0.25.1) - decidim-comments (= 0.25.1) - decidim-core (= 0.25.1) - decidim-comments (0.25.1) - decidim-core (= 0.25.1) - redcarpet (~> 3.5, >= 3.5.1) - decidim-core (0.25.1) - active_link_to (~> 1.0) - acts_as_list (~> 0.9) - anchored (~> 1.1) - batch-loader (~> 1.2) - browser (~> 2.7) - carrierwave (~> 2.2.1) - cells-erb (~> 0.1.0) - cells-rails (~> 0.1.3) - charlock_holmes (~> 0.7) - date_validator (~> 0.9.0) - decidim-api (= 0.25.1) - devise (~> 4.7) - devise-i18n (~> 1.2) - diffy (~> 3.3) - doorkeeper (~> 5.1) - doorkeeper-i18n (~> 4.0) - etherpad-lite (~> 0.3) - file_validators (~> 2.1) - fog-local (~> 0.6) - foundation_rails_helper - geocoder (~> 1.5) - hashdiff (>= 0.4.0, < 2.0.0) - invisible_captcha (~> 0.12) - kaminari (~> 1.2, >= 1.2.1) - loofah (~> 2.3.1) - mini_magick (~> 4.9) - mustache (~> 1.1.0) - nobspw (~> 0.6.0) - omniauth (~> 2.0) - omniauth-facebook (~> 5.0) - omniauth-google-oauth2 (~> 1.0) - omniauth-rails_csrf_protection (~> 1.0) - omniauth-twitter (~> 1.4) - paper_trail (~> 10.3) - pg (~> 1.1.4, < 2) - pg_search (~> 2.2) - premailer-rails (~> 1.10) - rack (~> 2.2, >= 2.2.3) - rack-attack (~> 6.0) - rails (~> 6.0.4) - rails-i18n (~> 6.0) - ransack (~> 2.4.1) - rectify (~> 0.13.0) - redis (~> 4.1) - request_store (~> 1.5.0) - rubyXL (~> 3.4) - rubyzip (~> 2.0) - searchlight (~> 4.1) - seven_zip_ruby (~> 1.3) - social-share-button (~> 1.2, >= 1.2.1) - truncato (~> 0.7) - valid_email2 (~> 2.1) - webpacker (~> 6.0.0.rc.5) - wisper (~> 2.0) - decidim-debates (0.25.1) - decidim-comments (= 0.25.1) - decidim-core (= 0.25.1) - decidim-dev (0.25.1) - axe-core-rspec (~> 4.1.0) - byebug (~> 11.0) - capybara (~> 3.24) - db-query-matchers (~> 0.10.0) - decidim (= 0.25.1) - erb_lint (~> 0.0.35) - factory_bot_rails (~> 4.8) - i18n-tasks (~> 0.9.18) - mdl (~> 0.5) - nokogiri (~> 1.11, >= 1.11.4) - puma (~> 5.0) - rails-controller-testing (~> 1.0) - rspec-cells (~> 0.3.4) - rspec-html-matchers (~> 0.9.1) - rspec-rails (~> 4.0) - rspec-retry (~> 0.6.2) - rspec_junit_formatter (~> 0.3.0) - rubocop (~> 0.92.0) - rubocop-rails (~> 2.8) - rubocop-rspec (= 1.43.2) - selenium-webdriver (~> 3.142) - simplecov (~> 0.19.0) - simplecov-cobertura (~> 1.3.1) - system_test_html_screenshots (~> 0.2) - w3c_rspec_validators (~> 0.3.0) - webmock (~> 3.6) - wisper-rspec (~> 1.0) - decidim-forms (0.25.1) - decidim-core (= 0.25.1) - wicked_pdf (~> 2.1) - wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.25.1) - decidim-core (= 0.25.1) - decidim-meetings (0.25.1) - decidim-core (= 0.25.1) - decidim-forms (= 0.25.1) - icalendar (~> 2.5) - decidim-pages (0.25.1) - decidim-core (= 0.25.1) - decidim-participatory_processes (0.25.1) - decidim-core (= 0.25.1) - decidim-proposals (0.25.1) - decidim-comments (= 0.25.1) - decidim-core (= 0.25.1) - doc2text (~> 0.4.3) - redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.25.1) - decidim-admin (= 0.25.1) - decidim-comments (= 0.25.1) - decidim-core (= 0.25.1) - decidim-proposals (= 0.25.1) - decidim-surveys (0.25.1) - decidim-core (= 0.25.1) - decidim-forms (= 0.25.1) - decidim-templates (= 0.25.1) - decidim-system (0.25.1) - active_link_to (~> 1.0) - decidim-core (= 0.25.1) - devise (~> 4.7) - devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-templates (0.25.1) - decidim-core (= 0.25.1) - decidim-forms (= 0.25.1) - decidim-verifications (0.25.1) - decidim-core (= 0.25.1) - declarative-builder (0.1.0) - declarative-option (< 0.2.0) + csv (3.3.2) + dartsass (1.49.8) + date (3.4.1) + date_validator (0.12.0) + activemodel (>= 3) + activesupport (>= 3) + declarative-builder (0.2.0) + trailblazer-option (~> 0.1.0) declarative-option (0.1.0) - deface (1.8.1) + deface (1.9.0) + actionview (>= 5.2) nokogiri (>= 1.6) polyglot - rails (>= 5.2) + railties (>= 5.2) rainbow (>= 2.1.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.8.0) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-i18n (1.10.1) - devise (>= 4.8.0) - devise_invitable (2.0.5) + devise-i18n (1.11.0) + devise (>= 4.9.0) + devise_invitable (2.0.9) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.4.4) - diffy (3.4.0) - doc2text (0.4.3) - nokogiri (~> 1.11.1) + diff-lcs (1.6.0) + diffy (3.4.3) + doc2text (0.4.8) + nokogiri (>= 1.18.2) rubyzip (~> 2.3.0) - docile (1.4.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.5.4) + docile (1.4.1) + doorkeeper (5.8.1) railties (>= 5) doorkeeper-i18n (4.0.1) - dumb_delegator (1.0.0) - equalizer (0.0.11) - erb_lint (0.0.37) + erb_lint (0.4.0) activesupport - better_html (~> 1.0.7) - html_tokenizer + better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow rubocop smart_properties erbse (0.1.4) temple - erubi (1.10.0) - etherpad-lite (0.3.0) - rest-client (>= 1.6) - excon (0.88.0) - execjs (2.8.1) - factory_bot (4.11.1) - activesupport (>= 3.0.0) - factory_bot_rails (4.11.1) - factory_bot (~> 4.11.1) - railties (>= 3.0.0) - faker (1.9.6) - i18n (>= 0.7) - faraday (1.8.0) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0.1) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - multipart-post (>= 1.2, < 3) - ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - ffi (1.15.4) - file_validators (2.3.0) + erubi (1.13.1) + escape_utils (1.3.0) + excon (1.2.5) + logger + execjs (2.10.0) + extended-markdown-filter (0.7.0) + html-pipeline (~> 2.9) + factory_bot (6.5.1) + activesupport (>= 6.1.0) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) + railties (>= 5.0.0) + faker (3.5.1) + i18n (>= 1.8.11, < 2) + faraday (2.12.2) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-net_http (3.4.0) + net-http (>= 0.5.0) + ffi (1.17.1-aarch64-linux-gnu) + ffi (1.17.1-aarch64-linux-musl) + ffi (1.17.1-arm-linux-gnu) + ffi (1.17.1-arm-linux-musl) + ffi (1.17.1-arm64-darwin) + ffi (1.17.1-x86_64-darwin) + ffi (1.17.1-x86_64-linux-gnu) + ffi (1.17.1-x86_64-linux-musl) + file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-core (2.2.4) + fog-core (2.6.0) builder - excon (~> 0.71) - formatador (~> 0.2) + excon (~> 1.0) + formatador (>= 0.2, < 2.0) mime-types - fog-local (0.7.0) + fog-local (0.8.0) fog-core (>= 1.27, < 3.0) - formatador (0.3.0) - foundation_rails_helper (4.0.0) - actionpack (>= 4.1, < 7.0) - activemodel (>= 4.1, < 7.0) - activesupport (>= 4.1, < 7.0) - railties (>= 4.1, < 7.0) - geocoder (1.7.0) - globalid (0.5.2) - activesupport (>= 5.0) - graphql (1.12.18) - hashdiff (1.0.1) - hashie (4.1.0) - highline (2.0.3) - html_tokenizer (0.0.7) + formatador (1.1.0) + foundation_rails_helper (4.0.1) + actionpack (>= 4.1, < 7.1) + activemodel (>= 4.1, < 7.1) + activesupport (>= 4.1, < 7.1) + railties (>= 4.1, < 7.1) + gemoji (3.0.1) + geocoder (1.8.5) + base64 (>= 0.1.0) + csv (>= 3.0.0) + globalid (1.2.1) + activesupport (>= 6.1) + graphql (2.2.17) + base64 + graphql-docs (4.0.0) + commonmarker (~> 0.23, >= 0.23.6) + dartsass (~> 1.49) + escape_utils (~> 1.2) + extended-markdown-filter (~> 0.4) + gemoji (~> 3.0) + graphql (~> 2.0) + html-pipeline (~> 2.14, >= 2.14.3) + hashdiff (1.1.2) + hashie (5.0.0) + highline (3.1.2) + reline + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) htmlentities (4.3.4) - http-accept (1.7.0) - http-cookie (1.0.4) - domain_name (~> 0.5) - i18n (1.8.11) + i18n (1.14.7) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.34) + i18n-tasks (1.0.15) activesupport (>= 4.0.2) ast (>= 2.1.0) erubi highline (>= 2.0.0) i18n - parser (>= 2.2.3.0) + parser (>= 3.2.2.1) rails-i18n rainbow (>= 2.2.2, < 4.0) + ruby-progressbar (~> 1.8, >= 1.8.1) terminal-table (>= 1.5.1) - icalendar (2.7.1) + icalendar (2.10.3) ice_cube (~> 0.16) - ice_cube (0.16.4) - ice_nine (0.11.2) - image_processing (1.12.1) - mini_magick (>= 4.9.5, < 5) + ostruct + ice_cube (0.17.0) + image_processing (1.14.0) + mini_magick (>= 4.9.5, < 6) ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - json (2.6.1) - jwt (2.3.0) - kaminari (1.2.1) + io-console (0.8.0) + json (2.10.2) + jwt (2.10.1) + base64 + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - kramdown (2.3.1) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + language_server-protocol (3.17.0.4) + launchy (3.1.1) + addressable (~> 2.8) + childprocess (~> 5.0) + logger (~> 1.6) + letter_opener (1.10.0) + launchy (>= 2.2, < 4) + letter_opener_web (3.0.0) + actionmailer (>= 6.1) + letter_opener (~> 1.9) + railties (>= 6.1) rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - launchy (2.5.0) - addressable (~> 2.7) - letter_opener (1.7.0) - launchy (~> 2.2) - letter_opener_web (1.4.1) - actionmailer (>= 3.2) - letter_opener (~> 1.0) - railties (>= 3.2) - listen (3.7.0) + 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.6) + loofah (2.24.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) + nokogiri (>= 1.12.0) + mail (2.8.1) mini_mime (>= 0.1.1) - marcel (1.0.2) + net-imap + net-pop + net-smtp + marcel (1.0.4) matrix (0.4.2) - mdl (0.11.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.3.1) + method_source (1.1.0) + mime-types (3.6.1) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2021.0901) - mini_magick (4.11.0) - mini_mime (1.1.2) - mini_portile2 (2.5.3) - minitest (5.14.4) - mixlib-cli (2.1.8) - mixlib-config (3.0.9) - tomlrb - mixlib-shellout (3.2.5) - chef-utils - msgpack (1.4.2) - multi_json (1.15.0) - multi_xml (0.6.0) - multipart-post (2.1.1) - mustache (1.1.1) - netrc (0.11.0) - nio4r (2.5.8) - nobspw (0.6.2) - nokogiri (1.11.7) - mini_portile2 (~> 2.5.0) + mime-types-data (3.2025.0304) + mini_magick (4.13.2) + mini_mime (1.1.5) + minitest (5.25.5) + msgpack (1.8.0) + multi_xml (0.7.1) + bigdecimal (~> 3.1) + net-http (0.6.0) + uri + net-imap (0.5.6) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.3.4) + net-protocol + nio4r (2.7.4) + nokogiri (1.18.4-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.4-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.4-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.4-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.4-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.4-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.4-x86_64-linux-gnu) racc (~> 1.4) - oauth (0.5.7) - oauth2 (1.4.7) - faraday (>= 0.8, < 2.0) + nokogiri (1.18.4-x86_64-linux-musl) + racc (~> 1.4) + oauth (1.1.0) + oauth-tty (~> 1.0, >= 1.0.1) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + oauth-tty (1.0.5) + version_gem (~> 1.1, >= 1.1.1) + oauth2 (2.0.9) + faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) - multi_json (~> 1.3) multi_xml (~> 0.5) - rack (>= 1.2, < 3) - omniauth (2.0.4) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + omniauth (2.1.3) hashie (>= 3.4.6) - rack (>= 1.6.2, < 3) + rack (>= 2.2.3) rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.0.0) - jwt (>= 2.0) - oauth2 (~> 1.1) + omniauth-google-oauth2 (1.2.1) + jwt (>= 2.9.2) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.7.1) - omniauth-oauth (1.2.0) + omniauth-oauth2 (~> 1.8) + omniauth-oauth (1.2.1) oauth omniauth (>= 1.0, < 3) - omniauth-oauth2 (1.7.2) - oauth2 (~> 1.4) - omniauth (>= 1.9, < 3) - omniauth-rails_csrf_protection (1.0.0) + rack (>= 1.6.2, < 4) + omniauth-oauth2 (1.8.0) + oauth2 (>= 1.4, < 3) + omniauth (~> 2.0) + omniauth-rails_csrf_protection (1.0.2) actionpack (>= 4.2) omniauth (~> 2.0) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack + openssl (3.3.0) orm_adapter (0.5.0) - paper_trail (10.3.1) - activerecord (>= 4.2) + ostruct (0.6.1) + paper_trail (12.3.0) + activerecord (>= 5.2) request_store (~> 1.1) - parallel (1.21.0) - parser (3.0.2.0) + parallel (1.26.3) + parallel_tests (4.10.1) + parallel + parser (3.3.7.1) ast (~> 2.4.1) - pg (1.1.4) - pg_search (2.3.5) - activerecord (>= 5.2) - activesupport (>= 5.2) + racc + pg (1.4.6) + pg_search (2.3.7) + activerecord (>= 6.1) + activesupport (>= 6.1) polyglot (0.3.5) - premailer (1.15.0) + premailer (1.27.0) addressable - css_parser (>= 1.6.0) + css_parser (>= 1.19.0) htmlentities (>= 4.0.0) - premailer-rails (1.11.1) + premailer-rails (1.12.0) actionmailer (>= 3) + net-smtp premailer (~> 1.7, >= 1.7.9) - public_suffix (4.0.6) - puma (5.5.2) + psych (4.0.6) + stringio + public_suffix (6.0.1) + puma (6.6.0) nio4r (~> 2.0) - racc (1.6.0) - rack (2.2.3) - rack-attack (6.5.0) - rack (>= 1.0, < 3) + racc (1.8.1) + rack (2.2.13) + rack-attack (6.7.0) + rack (>= 1.0, < 4) rack-cors (1.1.1) rack (>= 2.0.0) - rack-protection (2.1.0) - rack - rack-proxy (0.7.0) + rack-protection (3.2.0) + base64 (>= 0.1.0) + rack (~> 2.2, >= 2.2.4) + rack-proxy (0.7.7) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (6.0.4.1) - actioncable (= 6.0.4.1) - actionmailbox (= 6.0.4.1) - actionmailer (= 6.0.4.1) - actionpack (= 6.0.4.1) - actiontext (= 6.0.4.1) - actionview (= 6.0.4.1) - activejob (= 6.0.4.1) - activemodel (= 6.0.4.1) - activerecord (= 6.0.4.1) - activestorage (= 6.0.4.1) - activesupport (= 6.0.4.1) - bundler (>= 1.3.0) - railties (= 6.0.4.1) - sprockets-rails (>= 2.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rails (7.0.8.7) + actioncable (= 7.0.8.7) + actionmailbox (= 7.0.8.7) + actionmailer (= 7.0.8.7) + actionpack (= 7.0.8.7) + actiontext (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activemodel (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) + bundler (>= 1.15.0) + railties (= 7.0.8.7) 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.2) - loofah (~> 2.3) - rails-i18n (6.0.0) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + rails-i18n (7.0.10) i18n (>= 0.7, < 2) - railties (>= 6.0.0, < 7) - railties (6.0.4.1) - actionpack (= 6.0.4.1) - activesupport (= 6.0.4.1) + railties (>= 6.0.0, < 8) + railties (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) method_source - rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) - rainbow (3.0.0) - rake (13.0.6) - ransack (2.4.2) - activerecord (>= 5.2.4) - activesupport (>= 5.2.4) + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rainbow (3.1.1) + rake (13.2.1) + ransack (3.2.1) + activerecord (>= 6.1.5) + activesupport (>= 6.1.5) i18n - rb-fsevent (0.11.0) - rb-inotify (0.10.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) - rectify (0.13.0) - activemodel (>= 4.1.0) - activerecord (>= 4.1.0) - activesupport (>= 4.1.0) - virtus (~> 1.0.5) - wisper (>= 1.6.1) - redcarpet (3.5.1) - redis (4.5.1) - regexp_parser (2.1.1) - request_store (1.5.0) + redcarpet (3.6.1) + redis (4.8.1) + regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) + request_store (1.5.1) rack (>= 1.4) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) - rest-client (2.1.0) - http-accept (>= 1.7.0, < 2.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 4.0) - netrc (~> 0.8) - rexml (3.2.5) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-cells (0.3.7) + responders (3.1.1) + actionpack (>= 5.2) + railties (>= 5.2) + rexml (3.4.1) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-cells (0.3.10) cells (>= 4.0.0, < 6.0.0) - rspec-rails (< 6.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rspec-rails (>= 3.0.0) + rspec-core (3.13.3) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-html-matchers (0.9.4) + rspec-support (~> 3.13.0) + rspec-html-matchers (0.10.0) nokogiri (~> 1) - rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.10.2) + rspec (>= 3.0.0.a) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-rails (4.1.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) + rspec-support (~> 3.13.0) + rspec-rails (6.1.5) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.10.3) - rspec_junit_formatter (0.3.0) + rspec-support (3.13.2) + rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.92.0) + rubocop (1.65.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.7) - rexml - rubocop-ast (>= 0.5.0) + regexp_parser (>= 2.4, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.12.0) - parser (>= 3.0.1.1) - rubocop-rails (2.9.1) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.39.0) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-faker (1.2.0) + faker (>= 2.12.0) + rubocop (>= 1.13.0) + rubocop-performance (1.23.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.29.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) - rubocop-rspec (1.43.2) - rubocop (~> 0.87) - ruby-progressbar (1.11.0) - ruby-vips (2.1.3) + rubocop (>= 1.52.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rspec (3.4.0) + rubocop (~> 1.61) + rubocop-rspec_rails (2.30.0) + rubocop (~> 1.61) + rubocop-rspec (~> 3, >= 3.0.1) + rubocop-rubycw (0.1.6) + rubocop (~> 1.0) + ruby-progressbar (1.13.0) + ruby-vips (2.2.3) ffi (~> 1.12) - ruby2_keywords (0.0.5) - rubyXL (3.4.18) + logger + rubyXL (3.4.33) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) - searchlight (4.1.0) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) - semantic_range (3.0.0) - seven_zip_ruby (1.3.0) - simplecov (0.19.1) + selenium-webdriver (4.29.1) + base64 (~> 0.2) + logger (~> 1.4) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + semantic_range (3.1.0) + shakapacker (7.1.0) + activesupport (>= 5.2) + rack-proxy (>= 0.6.1) + railties (>= 5.2) + semantic_range (>= 2.3.0) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) - simplecov-cobertura (1.3.1) - simplecov (~> 0.8) - simplecov-html (0.12.3) - smart_properties (1.16.3) - social-share-button (1.2.4) - coffee-rails - spring (2.1.1) - spring-watcher-listen (2.0.1) + simplecov_json_formatter (~> 0.1) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-html (0.13.1) + simplecov_json_formatter (0.1.4) + smart_properties (1.17.0) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) + spring (4.3.0) + spring-watcher-listen (2.1.0) listen (>= 2.7, < 4.0) - spring (>= 1.2, < 3.0) - sprockets (4.0.2) + spring (>= 4) + stringio (3.1.5) + temple (0.10.3) + terminal-table (4.0.0) + unicode-display_width (>= 1.1.1, < 4) + thor (1.3.2) + tilt (2.6.0) + timeout (0.4.3) + trailblazer-option (0.1.2) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - ssrf_filter (1.0.7) - system_test_html_screenshots (0.2.0) - actionpack (>= 5.2, < 6.1.a) - temple (0.8.2) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - thor (1.1.0) - thread_safe (0.3.6) - tilt (2.0.10) - tomlrb (2.0.1) - truncato (0.7.11) - htmlentities (~> 4.3.1) - nokogiri (>= 1.7.0, <= 2.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) uber (0.1.0) - uglifier (4.2.0) + uglifier (4.2.1) execjs (>= 0.3.0, < 3) - unf (0.1.4) - unf_ext - unf_ext (0.0.8) - unicode-display_width (1.8.0) - valid_email2 (2.3.1) + unicode-display_width (2.6.0) + uniform_notifier (1.16.0) + uri (1.0.3) + valid_email2 (4.0.6) activemodel (>= 3.2) mail (~> 2.5) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) + version_gem (1.1.6) w3c_rspec_validators (0.3.0) rails rspec w3c_validators - w3c_validators (1.3.6) + w3c_validators (1.3.7) json (>= 1.8) nokogiri (~> 1.6) rexml (~> 3.2) @@ -767,47 +797,52 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - webmock (3.14.0) + web-push (3.0.1) + jwt (~> 2.0) + openssl (~> 3.0) + webmock (3.25.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webpacker (6.0.0.rc.5) - activesupport (>= 5.2) - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) - websocket-driver (0.7.5) + websocket (1.2.11) + websocket-driver (0.7.7) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked_pdf (2.1.0) + wicked_pdf (2.8.2) activesupport + ostruct wisper (2.0.1) wisper-rspec (1.1.0) - wkhtmltopdf-binary (0.12.6.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.5.1) + zeitwerk (2.7.2) PLATFORMS - ruby + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES bootsnap (~> 1.4) byebug (~> 11.0) - decidim (>= 0.25.0) + decidim! decidim-anonymous_proposals! - decidim-dev (>= 0.25.0) - faker (~> 1.9) - letter_opener_web (~> 1.3) - listen (~> 3.1) + decidim-dev! + faker (~> 3.2) + letter_opener_web + listen puma (>= 4.3) - spring (~> 2.0) - spring-watcher-listen (~> 2.0) uglifier (~> 4.1) web-console (~> 3.5) RUBY VERSION - ruby 2.7.1p83 + ruby 3.2.6p234 BUNDLED WITH - 2.1.4 + 2.6.5 diff --git a/config/shakapacker.yml b/config/shakapacker.yml new file mode 100644 index 0000000..a333ad2 --- /dev/null +++ b/config/shakapacker.yml @@ -0,0 +1,89 @@ +# File written by Decidim generator +# Note: You must restart bin/webpack-dev-server for changes to take effect + +default: &default + source_path: app/packs + source_entry_path: entrypoints + nested_entries: true + css_extract_ignore_order_warnings: false + + public_root_path: public + public_output_path: decidim-packs + cache_path: tmp/shakapacker + webpack_compile_output: true + extract_css: true + shakapacker_precompile: true + + additional_paths: + - node_modules + - app/packs + + # Reload manifest.json on all requests so we reload latest compiled packs + cache_manifest: false + + # Select loader to use, available options are 'babel' (default), 'swc' or 'esbuild' + webpack_loader: 'esbuild' + + # Set to true to enable check for matching versions of shakapacker gem and NPM package - will raise an error if there is a mismatch or wildcard versioning is used + ensure_consistent_versioning: true + + # Select whether the compiler will use SHA digest ('digest' option) or most recent modified timestamp ('mtime') to determine freshness + compiler_strategy: digest + + # Select whether the compiler will always use a content hash and not just in production + # Do not use contentHash except for production for performance + # https://webpack.js.org/guides/build-performance/#avoid-production-specific-tooling + useContentHash: false + +development: + <<: *default + compile: true + compiler_strategy: mtime + # Compile test packs to decidim decidim-packs folder + + # Reference: https://webpack.js.org/configuration/dev-server/ + dev_server: + https: false + host: localhost + # Notice that we use a different port (to prevent blocking the default one) as + # there will be at least two webpack servers running + port: 3035 + # Hot Module Replacement updates modules while the application is running without a full reload + hmr: false + # mini-css-extract-plugin is a required dependency in both cases. + inline_css: true + client: + # Should we show a full-screen overlay in the browser when there are compiler errors or warnings? + overlay: false + # May also be a string + # webSocketURL: + # hostname: "0.0.0.0" + # pathname: "/ws" + # port: 8080 + # Should we use gzip compression? + compress: true + # Note that apps that do not check the host are vulnerable to DNS rebinding attacks + allowed_hosts: "all" + pretty: true + headers: + 'Access-Control-Allow-Origin': '*' + static: + watch: + ignored: '**/node_modules/**' + +test: + <<: *default + compile: true + public_output_path: packs-test + +production: + <<: *default + + # Production depends on precompilation of packs prior to booting for performance. + compile: false + + # Use content hash for naming assets. Cannot be overridden by for production. + useContentHash: true + + # Cache manifest.json for performance + cache_manifest: true diff --git a/decidim-anonymous_proposals.gemspec b/decidim-anonymous_proposals.gemspec index 2305cfb..375c887 100644 --- a/decidim-anonymous_proposals.gemspec +++ b/decidim-anonymous_proposals.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |s| s.email = ["entantoencuanto.rb@gmail.com"] s.license = "AGPL-3.0" s.homepage = "https://github.com/PopulateTools/decidim-module-anonymous_proposals" - s.required_ruby_version = ">= 2.6" + s.required_ruby_version = ">= 3.2" s.name = "decidim-anonymous_proposals" s.summary = "A decidim anonymous_proposals module" @@ -19,5 +19,5 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,lib}/**/*", "LICENSE-AGPLv3.txt", "Rakefile", "README.md"] s.add_dependency "decidim-core", Decidim::AnonymousProposals.decidim_version - s.add_dependency "deface", "~> 1.5" + s.add_dependency "deface", "~> 1.9" end diff --git a/lib/decidim/anonymous_proposals/version.rb b/lib/decidim/anonymous_proposals/version.rb index f944eeb..c2e1103 100644 --- a/lib/decidim/anonymous_proposals/version.rb +++ b/lib/decidim/anonymous_proposals/version.rb @@ -4,11 +4,11 @@ module Decidim # This holds the decidim-meetings version. module AnonymousProposals def self.version - "0.27.0" + "0.29" end def self.decidim_version - ">= 0.27.0" + ">= 0.29" end end end From 4d1317222bd6aa6f086770e1dbc97c740e2f98bd Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 15:01:53 +0100 Subject: [PATCH 2/9] update 0.29 --- ...m-decidim-release-0-28-stable--rubocop-yml | 94 ++ .rubocop.yml | 1251 +---------------- .rubocop_rails.yml | 83 -- config/shakapacker.yml | 89 -- 4 files changed, 97 insertions(+), 1420 deletions(-) create mode 100644 .rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml delete mode 100644 .rubocop_rails.yml delete mode 100644 config/shakapacker.yml diff --git a/.rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml b/.rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml new file mode 100644 index 0000000..13bc55c --- /dev/null +++ b/.rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml @@ -0,0 +1,94 @@ +inherit_gem: + decidim-dev: rubocop-decidim.yml + +inherit_mode: + merge: + - Exclude + +AllCops: + Exclude: + - "decidim-initiatives/lib/gem_overrides/origami/date.rb" + +Naming/FileName: + Exclude: + - "decidim-dev/lib/decidim-dev.rb" + +Metrics/CyclomaticComplexity: + Exclude: + - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb" + +Metrics/ParameterLists: + Exclude: + - "decidim-core/lib/decidim/filter_form_builder.rb" + +Metrics/PerceivedComplexity: + Exclude: + - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb" + +RSpec/DescribeClass: + Exclude: + - decidim-core/spec/lib/global_engines_spec.rb + +RSpec/EmptyExampleGroup: + Exclude: + - decidim-core/spec/lib/participatory_space_manifest_spec.rb + +RSpec/MultipleMemoizedHelpers: + Exclude: + - decidim-assemblies/spec/forms/assembly_form_spec.rb + +Rails/Output: + Exclude: + - lib/decidim/git_backport_manager.rb + - lib/decidim/github_manager/poster.rb + - decidim-core/lib/decidim/core.rb + - decidim-core/lib/decidim/component_manifest.rb + - decidim-core/lib/decidim/participatory_space_manifest.rb + +Rails/Exit: + Exclude: + - lib/decidim/git_backport_manager.rb + +RSpec/NoExpectationExample: + Exclude: + - decidim-admin/spec/system/participatory_space_private_user_spec.rb + - decidim-comments/spec/services/decidim/comments/comment_creation_spec.rb + - decidim-conferences/spec/cells/decidim/conferences/conference_speaker_cell_spec.rb + - decidim-core/spec/cells/decidim/date_range_cell_spec.rb + - decidim-core/spec/commands/decidim/unsubscribe_settings_spec.rb + - decidim-core/spec/controllers/registrations_controller_spec.rb + - decidim-core/spec/lib/importers/import_manifest_spec.rb + - decidim-core/spec/lib/map/geocoding_spec.rb + - decidim-core/spec/lib/participatory_space_manifest_spec.rb + - decidim-core/spec/services/decidim/events_manager_spec.rb + - decidim-core/spec/services/decidim/settings_change_spec.rb + - decidim-core/spec/services/decidim/zip_stream/zip_stream_writer_spec.rb + - decidim-core/spec/tasks/decidim_tasks_right_to_be_forgotten_spec.rb + - decidim-elections/spec/lib/tasks/decidim_election_generate_identification_keys_spec.rb + - decidim-elections/spec/lib/tasks/decidim_election_scheduled_tasks_spec.rb + - decidim-elections/spec/shared/vote_examples.rb + - decidim-elections/spec/system/key_ceremony_spec.rb + - decidim-elections/spec/system/vote_online_inside_a_voting_spec.rb + - decidim-initiatives/spec/system/admin/update_initiative_spec.rb + - decidim-initiatives/spec/system/initiative_signing_spec.rb + - decidim-meetings/spec/commands/admin/export_meeting_registrations_spec.rb + - decidim-meetings/spec/system/explore_meeting_directory_spec.rb + - decidim-meetings/spec/system/explore_meetings_spec.rb + - decidim-proposals/spec/lib/decidim/proposals/markdown_to_proposals_spec.rb + - decidim-proposals/spec/shared/import_proposals_examples.rb + - decidim-proposals/spec/shared/proposals_wizards_examples.rb + - decidim-proposals/spec/system/admin/admin_manages_participatory_texts_spec.rb + - decidim-proposals/spec/system/participatory_texts_spec.rb + - decidim-participatory_processes/spec/system/participatory_processes_spec.rb + +# fix these rules later +Capybara/SpecificFinders: + Enabled: false + +RSpec/IndexedLet: + Enabled: false + +Rails/HelperInstanceVariable: + Enabled: false + +# EOF fix these rules later diff --git a/.rubocop.yml b/.rubocop.yml index dfa34bc..7f5e268 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,1251 +1,6 @@ -require: rubocop-rspec +inherit_from: + - https://raw.githubusercontent.com/decidim/decidim/release/0.28-stable/.rubocop.yml -# Common configuration. AllCops: - Include: - - .simplecov - - "**/*.rb" - - "**/*.rake" - - "**/*.gemspec" - - "**/*.ru" - - "**/Gemfile" - - "**/Rakefile" Exclude: - - "**/vendor/**/*" - - "development_app/**/*" - - "spec/decidim_dummy_app/**/*" - - "node_modules/**/*" - # Default formatter will be used if no -f/--format option is given. - DefaultFormatter: progress - # Cop names are not displayed in offense messages by default. Change behavior - # by overriding DisplayCopNames, or by giving the -D/--display-cop-names - # option. - DisplayCopNames: true - # Style guide URLs are not displayed in offense messages by default. Change - # behavior by overriding DisplayStyleGuide, or by giving the - # -S/--display-style-guide option. - DisplayStyleGuide: false - # Extra details are not displayed in offense messages by default. Change - # behavior by overriding ExtraDetails, or by giving the - # -E/--extra-details option. - ExtraDetails: false - # Additional cops that do not reference a style guide rule may be enabled by - # default. Change behavior by overriding StyleGuideCopsOnly, or by giving - # the --only-guide-cops option. - StyleGuideCopsOnly: false - # All cops except the ones in disabled.yml are enabled by default. Change - # this behavior by overriding DisabledByDefault. When DisabledByDefault is - # true, all cops in the default configuration are disabled, and and only cops - # in user configuration are enabled. This makes cops opt-in instead of - # opt-out. Note that when DisabledByDefault is true, cops in user - # configuration will be enabled even if they don't set the Enabled parameter. - DisabledByDefault: false - # Enables the result cache if true. Can be overridden by the --cache command - # line option. - UseCache: true - # Threshold for how many files can be stored in the result cache before some - # of the files are automatically removed. - MaxFilesInCache: 20000 - # The cache will be stored in "rubocop_cache" under this directory. The name - # "/tmp" is special and will be converted to the system temporary directory, - # which is "/tmp" on Unix-like systems, but could be something else on other - # systems. - CacheRootDirectory: /tmp - # The default cache root directory is /tmp, which on most systems is - # writable by any system user. This means that it is possible for a - # malicious user to anticipate the location of Rubocop's cache directory, - # and create a symlink in its place that could cause Rubocop to overwrite - # unintended files, or read malicious input. If you are certain that your - # cache location is secure from this kind of attack, and wish to use a - # symlinked cache location, set this value to "true". - AllowSymlinksInCacheRootDirectory: true - # What MRI version of the Ruby interpreter is the inspected code intended to - # run on? (If there is more than one, set this to the lowest version.) - # If a value is specified for TargetRubyVersion then it is used. - # Else if .ruby-version exists and it contains an MRI version it is used. - # Otherwise we fallback to the oldest officially supported Ruby version (2.0). - TargetRubyVersion: 2.6 - - RSpec: - Patterns: - - "(?:^|/)spec/" - - "(?:^|/)test/" - -# Indent private/protected/public as deep as method definitions -Layout/AccessModifierIndentation: - EnforcedStyle: indent - SupportedStyles: - - outdent - - indent - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -Style/Alias: - EnforcedStyle: prefer_alias - SupportedStyles: - - prefer_alias - - prefer_alias_method - -# Align the elements of a hash literal if they span more than one line. -Layout/AlignHash: - # Alignment of entries using hash rocket as separator. Valid values are: - # - # key - left alignment of keys - # "a" => 2 - # "bb" => 3 - # separator - alignment of hash rockets, keys are right aligned - # "a" => 2 - # "bb" => 3 - # table - left alignment of keys, hash rockets, and values - # "a" => 2 - # "bb" => 3 - EnforcedHashRocketStyle: key - # Alignment of entries using colon as separator. Valid values are: - # - # key - left alignment of keys - # a: 0 - # bb: 1 - # separator - alignment of colons, keys are right aligned - # a: 0 - # bb: 1 - # table - left alignment of keys and values - # a: 0 - # bb: 1 - EnforcedColonStyle: key - # Select whether hashes that are the last argument in a method call should be - # inspected? Valid values are: - # - # always_inspect - Inspect both implicit and explicit hashes. - # Registers an offense for: - # function(a: 1, - # b: 2) - # Registers an offense for: - # function({a: 1, - # b: 2}) - # always_ignore - Ignore both implicit and explicit hashes. - # Accepts: - # function(a: 1, - # b: 2) - # Accepts: - # function({a: 1, - # b: 2}) - # ignore_implicit - Ignore only implicit hashes. - # Accepts: - # function(a: 1, - # b: 2) - # Registers an offense for: - # function({a: 1, - # b: 2}) - # ignore_explicit - Ignore only explicit hashes. - # Accepts: - # function({a: 1, - # b: 2}) - # Registers an offense for: - # function(a: 1, - # b: 2) - EnforcedLastArgumentHashStyle: always_inspect - SupportedLastArgumentHashStyles: - - always_inspect - - always_ignore - - ignore_implicit - - ignore_explicit - -Layout/AlignParameters: - # Alignment of parameters in multi-line method calls. - # - # The `with_first_parameter` style aligns the following lines along the same - # column as the first parameter. - # - # method_call(a, - # b) - # - # The `with_fixed_indentation` style aligns the following lines with one - # level of indentation relative to the start of the line with the method call. - # - # method_call(a, - # b) - EnforcedStyle: with_first_parameter - SupportedStyles: - - with_first_parameter - - with_fixed_indentation - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -Style/AndOr: - # Whether `and` and `or` are banned only in conditionals (conditionals) - # or completely (always). - EnforcedStyle: always - SupportedStyles: - - always - - conditionals - -Style/AsciiComments: - Enabled: false - -# Checks if usage of %() or %Q() matches configuration. -Style/BarePercentLiterals: - EnforcedStyle: bare_percent - SupportedStyles: - - percent_q - - bare_percent - -Style/BlockDelimiters: - EnforcedStyle: line_count_based - SupportedStyles: - # The `line_count_based` style enforces braces around single line blocks and - # do..end around multi-line blocks. - - line_count_based - # The `semantic` style enforces braces around functional blocks, where the - # primary purpose of the block is to return a value and do..end for - # procedural blocks, where the primary purpose of the block is its - # side-effects. - # - # This looks at the usage of a block's method to determine its type (e.g. is - # the result of a `map` assigned to a variable or passed to another - # method) but exceptions are permitted in the `ProceduralMethods`, - # `FunctionalMethods` and `IgnoredMethods` sections below. - - semantic - # The `braces_for_chaining` style enforces braces around single line blocks - # and do..end around multi-line blocks, except for multi-line blocks whose - # return value is being chained with another method (in which case braces - # are enforced). - - braces_for_chaining - ProceduralMethods: - # Methods that are known to be procedural in nature but look functional from - # their usage, e.g. - # - # time = Benchmark.realtime do - # foo.bar - # end - # - # Here, the return value of the block is discarded but the return value of - # `Benchmark.realtime` is used. - - benchmark - - bm - - bmbm - - create - - each_with_object - - measure - - new - - realtime - - tap - - with_object - FunctionalMethods: - # Methods that are known to be functional in nature but look procedural from - # their usage, e.g. - # - # let(:foo) { Foo.new } - # - # Here, the return value of `Foo.new` is used to define a `foo` helper but - # doesn't appear to be used from the return value of `let`. - - let - - let! - - subject - - watch - IgnoredMethods: - # Methods that can be either procedural or functional and cannot be - # categorised from their usage alone, e.g. - # - # foo = lambda do |x| - # puts "Hello, #{x}" - # end - # - # foo = lambda do |x| - # x * 100 - # end - # - # Here, it is impossible to tell from the return value of `lambda` whether - # the inner block's return value is significant. - - lambda - - proc - - it - -Style/BracesAroundHashParameters: - EnforcedStyle: no_braces - SupportedStyles: - # The `braces` style enforces braces around all method parameters that are - # hashes. - - braces - # The `no_braces` style checks that the last parameter doesn't have braces - # around it. - - no_braces - # The `context_dependent` style checks that the last parameter doesn't have - # braces around it, but requires braces if the second to last parameter is - # also a hash literal. - - context_dependent - -# Indentation of `when`. -Layout/CaseIndentation: - EnforcedStyle: case - SupportedStyles: - - case - - end - IndentOneStep: false - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - # This only matters if IndentOneStep is true - IndentationWidth: ~ - -Style/ClassAndModuleChildren: - Enabled: false - # Checks the style of children definitions at classes and modules. - # - # Basically there are two different styles: - # - # `nested` - have each child on a separate line - # class Foo - # class Bar - # end - # end - # - # `compact` - combine definitions as much as possible - # class Foo::Bar - # end - # - # The compact style is only forced, for classes / modules with one child. - EnforcedStyle: nested - SupportedStyles: - - nested - - compact - -Style/ClassCheck: - EnforcedStyle: is_a? - SupportedStyles: - - is_a? - - kind_of? - -# Align with the style guide. -Style/CollectionMethods: - # Mapping from undesired method to desired_method - # e.g. to use `detect` over `find`: - # - # CollectionMethods: - # PreferredMethods: - # find: detect - PreferredMethods: - collect: "map" - collect!: "map!" - inject: "reduce" - detect: "find" - find_all: "select" - -# Use ` or %x around command literals. -Style/CommandLiteral: - EnforcedStyle: backticks - # backticks: Always use backticks. - # percent_x: Always use %x. - # mixed: Use backticks on single-line commands, and %x on multi-line commands. - SupportedStyles: - - backticks - - percent_x - - mixed - # If false, the cop will always recommend using %x if one or more backticks - # are found in the command string. - AllowInnerBackticks: false - -# Checks formatting of special comments -Style/CommentAnnotation: - Keywords: - - TODO - - FIXME - - OPTIMIZE - - HACK - - REVIEW - -Style/ConditionalAssignment: - EnforcedStyle: assign_to_condition - SupportedStyles: - - assign_to_condition - - assign_inside_condition - # When configured to `assign_to_condition`, `SingleLineConditionsOnly` - # will only register an offense when all branches of a condition are - # a single line. - # When configured to `assign_inside_condition`, `SingleLineConditionsOnly` - # will only register an offense for assignment to a condition that has - # at least one multiline branch. - SingleLineConditionsOnly: true - -# Checks that you have put a copyright in a comment before any code. -# -# You can override the default Notice in your .rubocop.yml file. -# -# In order to use autocorrect, you must supply a value for the -# AutocorrectNotice key that matches the regexp Notice. A blank -# AutocorrectNotice will cause an error during autocorrect. -# -# Autocorrect will add a copyright notice in a comment at the top -# of the file immediately after any shebang or encoding comments. -# -# Example rubocop.yml: -# -# Style/Copyright: -# Enabled: true -# Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc' -# AutocorrectNotice: "# Copyright (c) 2015 Yahoo! Inc." -# -Style/Copyright: - Notice: '^Copyright (\(c\) )?2[0-9]{3} .+' - AutocorrectNotice: "" - -Style/DocumentationMethod: - RequireForNonPublicMethods: false - -# Multi-line method chaining should be done with leading dots. -Layout/DotPosition: - EnforcedStyle: leading - SupportedStyles: - - leading - - trailing - -# Warn on empty else statements -# empty - warn only on empty else -# nil - warn on else with nil in it -# both - warn on empty else and else with nil in it -Style/EmptyElse: - EnforcedStyle: both - SupportedStyles: - - empty - - nil - - both - -# Use empty lines between defs. -Layout/EmptyLineBetweenDefs: - # If true, this parameter means that single line method definitions don't - # need an empty line between them. - AllowAdjacentOneLineDefs: false - -Layout/EmptyLinesAroundBlockBody: - EnforcedStyle: no_empty_lines - SupportedStyles: - - empty_lines - - no_empty_lines - -Layout/EmptyLinesAroundClassBody: - EnforcedStyle: no_empty_lines - SupportedStyles: - - empty_lines - - no_empty_lines - -Layout/EmptyLinesAroundModuleBody: - EnforcedStyle: no_empty_lines - SupportedStyles: - - empty_lines - - no_empty_lines - -# Checks whether the source file has a utf-8 encoding comment or not -# AutoCorrectEncodingComment must match the regex -# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/ -Style/Encoding: - Enabled: true - -Layout/ExtraSpacing: - # When true, allows most uses of extra spacing if the intent is to align - # things with the previous or next line, not counting empty lines or comment - # lines. - AllowForAlignment: false - # When true, forces the alignment of = in assignments on consecutive lines. - ForceEqualSignAlignment: false - -Naming/FileName: - Exclude: - - "**/Gemfile" - - "**/Rakefile" - - "**/*.gemspec" - # When true, requires that each source file should define a class or module - # with a name which matches the file name (converted to ... case). - # It further expects it to be nested inside modules which match the names - # of subdirectories in its path. - ExpectMatchingDefinition: false - # If non-nil, expect all source file names to match the following regex. - # Only the file name itself is matched, not the entire file path. - # Use anchors as necessary if you want to match the entire name rather than - # just a part of it. - Regex: ~ - # With `IgnoreExecutableScripts` set to `true`, this cop does not - # report offending filenames for executable scripts (i.e. source - # files with a shebang in the first line). - IgnoreExecutableScripts: true - -Layout/IndentFirstArgument: - EnforcedStyle: special_for_inner_method_call_in_parentheses - SupportedStyles: - # The first parameter should always be indented one step more than the - # preceding line. - - consistent - # The first parameter should normally be indented one step more than the - # preceding line, but if it's a parameter for a method call that is itself - # a parameter in a method call, then the inner parameter should be indented - # relative to the inner method. - - special_for_inner_method_call - # Same as special_for_inner_method_call except that the special rule only - # applies if the outer method call encloses its arguments in parentheses. - - special_for_inner_method_call_in_parentheses - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -# Checks use of for or each in multiline loops. -Style/For: - EnforcedStyle: each - SupportedStyles: - - for - - each - -# Enforce the method used for string formatting. -Style/FormatString: - EnforcedStyle: format - SupportedStyles: - - format - - sprintf - - percent - -Style/FormatStringToken: - EnforcedStyle: template - -Style/FrozenStringLiteralComment: - EnforcedStyle: always - SupportedStyles: - - never - # `always` will always add the frozen string literal comment to a file - # regardless of the Ruby version or if `freeze` or `<<` are called on a - # string literal. If you run code against multiple versions of Ruby, it is - # possible that this will create errors in Ruby 2.3.0+. - - always - -# Built-in global variables are allowed by default. -Style/GlobalVars: - AllowedVariables: [] - -# `MinBodyLength` defines the number of lines of the a body of an if / unless -# needs to have to trigger this cop -Style/GuardClause: - MinBodyLength: 6 - -Style/HashSyntax: - EnforcedStyle: ruby19 - SupportedStyles: - # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys - - ruby19 - # checks for hash rocket syntax for all hashes - - hash_rockets - # forbids mixed key syntaxes (e.g. {a: 1, :b => 2}) - - no_mixed_keys - # enforces both ruby19 and no_mixed_keys styles - - ruby19_no_mixed_keys - # Force hashes that have a symbol value to use hash rockets - UseHashRocketsWithSymbolValues: false - # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style - PreferHashRocketsForNonAlnumEndingSymbols: false - -Layout/IndentationConsistency: - # The difference between `rails` and `normal` is that the `rails` style - # prescribes that in classes and modules the `protected` and `private` - # modifier keywords shall be indented the same as public methods and that - # protected and private members shall be indented one step more than the - # modifiers. Other than that, both styles mean that entities on the same - # logical depth shall have the same indentation. - EnforcedStyle: normal - SupportedStyles: - - normal - - rails - -Layout/IndentationWidth: - # Number of spaces for each indentation level. - Width: 2 - -# Checks the indentation of the first element in an array literal. -Layout/IndentFirstArrayElement: - # The value `special_inside_parentheses` means that array literals with - # brackets that have their opening bracket on the same line as a surrounding - # opening round parenthesis, shall have their first element indented relative - # to the first position inside the parenthesis. - # - # The value `consistent` means that the indentation of the first element shall - # always be relative to the first position of the line where the opening - # bracket is. - # - # The value `align_brackets` means that the indentation of the first element - # shall always be relative to the position of the opening bracket. - EnforcedStyle: special_inside_parentheses - SupportedStyles: - - special_inside_parentheses - - consistent - - align_brackets - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -# Checks the indentation of assignment RHS, when on a different line from LHS -Layout/IndentAssignment: - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -# Checks the indentation of the first key in a hash literal. -Layout/IndentFirstHashElement: - # The value `special_inside_parentheses` means that hash literals with braces - # that have their opening brace on the same line as a surrounding opening - # round parenthesis, shall have their first key indented relative to the - # first position inside the parenthesis. - # - # The value `consistent` means that the indentation of the first key shall - # always be relative to the first position of the line where the opening - # brace is. - # - # The value `align_braces` means that the indentation of the first key shall - # always be relative to the position of the opening brace. - EnforcedStyle: special_inside_parentheses - SupportedStyles: - - special_inside_parentheses - - consistent - - align_braces - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -Style/Lambda: - EnforcedStyle: line_count_dependent - SupportedStyles: - - line_count_dependent - - lambda - - literal - Exclude: - - "**/types/**/*" - - "**/*_interface.rb" - -Style/LambdaCall: - EnforcedStyle: call - SupportedStyles: - - call - - braces - -Style/Next: - # With `always` all conditions at the end of an iteration needs to be - # replaced by next - with `skip_modifier_ifs` the modifier if like this one - # are ignored: [1, 2].each { |a| return "yes" if a == 1 } - EnforcedStyle: skip_modifier_ifs - # `MinBodyLength` defines the number of lines of the a body of an if / unless - # needs to have to trigger this cop - MinBodyLength: 3 - SupportedStyles: - - skip_modifier_ifs - - always - -Style/NonNilCheck: - # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for - # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is - # **usually** OK, but might change behavior. - # - # With `IncludeSemanticChanges` set to `false`, this cop does not report - # offenses for `!x.nil?` and does no changes that might change behavior. - IncludeSemanticChanges: false - -Style/NumericPredicate: - EnforcedStyle: predicate - SupportedStyles: - - predicate - - comparison - -Style/MethodDefParentheses: - EnforcedStyle: require_parentheses - SupportedStyles: - - require_parentheses - - require_no_parentheses - - require_no_parentheses_except_multiline - -Naming/MethodName: - EnforcedStyle: snake_case - SupportedStyles: - - snake_case - - camelCase - -Style/ModuleFunction: - EnforcedStyle: module_function - SupportedStyles: - - module_function - - extend_self - -Layout/MultilineArrayBraceLayout: - EnforcedStyle: symmetrical - SupportedStyles: - # symmetrical: closing brace is positioned in same way as opening brace - # new_line: closing brace is always on a new line - # same_line: closing brace is always on the same line as last element - - symmetrical - - new_line - - same_line - -Layout/MultilineAssignmentLayout: - # The types of assignments which are subject to this rule. - SupportedTypes: - - block - - case - - class - - if - - kwbegin - - module - EnforcedStyle: new_line - SupportedStyles: - # Ensures that the assignment operator and the rhs are on the same line for - # the set of supported types. - - same_line - # Ensures that the assignment operator and the rhs are on separate lines - # for the set of supported types. - - new_line - -Layout/MultilineHashBraceLayout: - EnforcedStyle: symmetrical - SupportedStyles: - # symmetrical: closing brace is positioned in same way as opening brace - # new_line: closing brace is always on a new line - # same_line: closing brace is always on same line as last element - - symmetrical - - new_line - - same_line - -Layout/MultilineMethodCallBraceLayout: - EnforcedStyle: symmetrical - SupportedStyles: - # symmetrical: closing brace is positioned in same way as opening brace - # new_line: closing brace is always on a new line - # same_line: closing brace is always on the same line as last argument - - symmetrical - - new_line - - same_line - -Layout/MultilineMethodCallIndentation: - EnforcedStyle: aligned - SupportedStyles: - - aligned - - indented - - indented_relative_to_receiver - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -Layout/MultilineMethodDefinitionBraceLayout: - EnforcedStyle: symmetrical - SupportedStyles: - # symmetrical: closing brace is positioned in same way as opening brace - # new_line: closing brace is always on a new line - # same_line: closing brace is always on the same line as last parameter - - symmetrical - - new_line - - same_line - -Layout/MultilineOperationIndentation: - EnforcedStyle: aligned - SupportedStyles: - - aligned - - indented - # By default, the indentation width from Style/IndentationWidth is used - # But it can be overridden by setting this parameter - IndentationWidth: ~ - -Style/NumericLiterals: - MinDigits: 5 - -Style/NumericLiteralPrefix: - EnforcedOctalStyle: zero_with_o - SupportedOctalStyles: - - zero_with_o - - zero_only - -Style/OptionHash: - # A list of parameter names that will be flagged by this cop. - SuspiciousParamNames: - - options - - opts - - args - - params - - parameters - -# Allow safe assignment in conditions. -Style/ParenthesesAroundCondition: - AllowSafeAssignment: true - -Style/PercentLiteralDelimiters: - PreferredDelimiters: - "%": () - "%i": () - "%q": () - "%Q": () - "%r": "{}" - "%s": () - "%w": () - "%W": () - "%x": () - -Style/PercentQLiterals: - EnforcedStyle: lower_case_q - SupportedStyles: - - lower_case_q # Use %q when possible, %Q when necessary - - upper_case_q # Always use %Q - -Naming/PredicateName: - # Predicate name prefixes. - NamePrefix: - - is_ - - has_ - - have_ - # Predicate name prefixes that should be removed. - NamePrefixBlacklist: - - is_ - - have_ - # Predicate names which, despite having a blacklisted prefix, or no ?, - # should still be accepted - NameWhitelist: - - is_a? - # Exclude Rspec specs because there is a strong convetion to write spec - # helpers in the form of `have_something` or `be_something`. - Exclude: - - "**/spec/**/*" - - "**/test/**/*" - -Style/PreferredHashMethods: - Enabled: true - EnforcedStyle: verbose - -Style/DateTime: - Enabled: true - -Style/Documentation: - Enabled: false - -Style/RaiseArgs: - EnforcedStyle: exploded - SupportedStyles: - - compact # raise Exception.new(msg) - - exploded # raise Exception, msg - -Style/RedundantReturn: - # When true allows code like `return x, y`. - AllowMultipleReturnValues: false - -# Use / or %r around regular expressions. -Style/RegexpLiteral: - EnforcedStyle: slashes - # slashes: Always use slashes. - # percent_r: Always use %r. - # mixed: Use slashes on single-line regexes, and %r on multi-line regexes. - SupportedStyles: - - slashes - - percent_r - - mixed - # If false, the cop will always recommend using %r if one or more slashes - # are found in the regexp string. - AllowInnerSlashes: false - -Style/SafeNavigation: - Enabled: false - -Style/Semicolon: - # Allow ; to separate several expressions on the same line. - AllowAsExpressionSeparator: false - -Style/SignalException: - EnforcedStyle: only_raise - SupportedStyles: - - only_raise - - only_fail - - semantic - -Style/SingleLineBlockParams: - Methods: - - reduce: - - a - - e - - inject: - - a - - e - -Style/SingleLineMethods: - AllowIfMethodIsEmpty: true - -Layout/SpaceBeforeFirstArg: - # When true, allows most uses of extra spacing if the intent is to align - # things with the previous or next line, not counting empty lines or comment - # lines. - AllowForAlignment: true - -Style/SpecialGlobalVars: - EnforcedStyle: use_english_names - SupportedStyles: - - use_perl_names - - use_english_names - -Style/StabbyLambdaParentheses: - EnforcedStyle: require_parentheses - SupportedStyles: - - require_parentheses - - require_no_parentheses - -Style/StringLiterals: - EnforcedStyle: double_quotes - SupportedStyles: - - single_quotes - - double_quotes - # If true, strings which span multiple lines using \ for continuation must - # use the same type of quotes on each line. - ConsistentQuotesInMultiline: false - -Style/StringLiteralsInInterpolation: - EnforcedStyle: double_quotes - SupportedStyles: - - single_quotes - - double_quotes - -Style/StringMethods: - # Mapping from undesired method to desired_method - # e.g. to use `to_sym` over `intern`: - # - # StringMethods: - # PreferredMethods: - # intern: to_sym - PreferredMethods: - intern: to_sym - -Layout/SpaceAroundBlockParameters: - EnforcedStyleInsidePipes: no_space - -Layout/SpaceAroundEqualsInParameterDefault: - EnforcedStyle: space - SupportedStyles: - - space - - no_space - -Layout/SpaceAroundOperators: - # When true, allows most uses of extra spacing if the intent is to align - # with an operator on the previous or next line, not counting empty lines - # or comment lines. - AllowForAlignment: true - -Layout/SpaceBeforeBlockBraces: - EnforcedStyle: space - SupportedStyles: - - space - - no_space - -Layout/SpaceInsideBlockBraces: - EnforcedStyle: space - SupportedStyles: - - space - - no_space - # Valid values are: space, no_space - EnforcedStyleForEmptyBraces: no_space - # Space between { and |. Overrides EnforcedStyle if there is a conflict. - SpaceBeforeBlockParameters: true - -Layout/SpaceInsideHashLiteralBraces: - EnforcedStyle: space - EnforcedStyleForEmptyBraces: no_space - SupportedStyles: - - space - - no_space - # "compact" normally requires a space inside hash braces, with the exception - # that successive left braces or right braces are collapsed together - - compact - -Layout/SpaceInsideStringInterpolation: - EnforcedStyle: no_space - SupportedStyles: - - space - - no_space - -Style/AccessModifierDeclarations: - Enabled: false - -Style/SymbolArray: - EnforcedStyle: brackets - SupportedStyles: - - percent - - brackets - -Style/SymbolProc: - # A list of method names to be ignored by the check. - # The names should be fairly unique, otherwise you'll end up ignoring lots of code. - IgnoredMethods: - - respond_to - - define_method - -Style/TernaryParentheses: - EnforcedStyle: require_no_parentheses - SupportedStyles: - - require_parentheses - - require_no_parentheses - AllowSafeAssignment: true - -Layout/TrailingBlankLines: - EnforcedStyle: final_newline - SupportedStyles: - - final_newline - - final_blank_line - -Style/TrailingCommaInArguments: - # If `comma`, the cop requires a comma after the last argument, but only for - # parenthesized method calls where each argument is on its own line. - # If `consistent_comma`, the cop requires a comma after the last argument, - # for all parenthesized method calls with arguments. - EnforcedStyleForMultiline: no_comma - -Style/TrailingCommaInArrayLiteral: - # If `comma`, the cop requires a comma after the last item in an array or - # hash, but only when each item is on its own line. - # If `consistent_comma`, the cop requires a comma after the last item of all - # non-empty array and hash literals. - EnforcedStyleForMultiline: no_comma - -Style/TrailingCommaInHashLiteral: - # If `comma`, the cop requires a comma after the last item in an array or - # hash, but only when each item is on its own line. - # If `consistent_comma`, the cop requires a comma after the last item of all - # non-empty array and hash literals. - EnforcedStyleForMultiline: no_comma - -# TrivialAccessors requires exact name matches and doesn't allow -# predicated methods by default. -Style/TrivialAccessors: - # When set to false the cop will suggest the use of accessor methods - # in situations like: - # - # def name - # @other_name - # end - # - # This way you can uncover "hidden" attributes in your code. - ExactNameMatch: true - AllowPredicates: true - # Allows trivial writers that don't end in an equal sign. e.g. - # - # def on_exception(action) - # @on_exception=action - # end - # on_exception :restart - # - # Commonly used in DSLs - AllowDSLWriters: false - IgnoreClassMethods: false - Whitelist: - - to_ary - - to_a - - to_c - - to_enum - - to_h - - to_hash - - to_i - - to_int - - to_io - - to_open - - to_path - - to_proc - - to_r - - to_regexp - - to_str - - to_s - - to_sym - -Naming/VariableName: - EnforcedStyle: snake_case - SupportedStyles: - - snake_case - - camelCase - -Naming/VariableNumber: - EnforcedStyle: normalcase - SupportedStyles: - - snake_case - - normalcase - - non_integer - -# WordArray enforces how array literals of word-like strings should be expressed. -Style/WordArray: - EnforcedStyle: percent - SupportedStyles: - # percent style: %w(word1 word2) - - percent - # bracket style: ["word1", "word2"] - - brackets - # The MinSize option causes the WordArray rule to be ignored for arrays - # smaller than a certain size. The rule is only applied to arrays - # whose element count is greater than or equal to MinSize. - MinSize: 2 - # The regular expression WordRegex decides what is considered a word. - WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/' - -##################### Metrics ################################## - -Metrics/AbcSize: - # The ABC size is a calculated magnitude, so this number can be an Integer or - # a Float. - Max: 15 - Enabled: false - -Metrics/BlockNesting: - Max: 3 - -Metrics/ClassLength: - CountComments: false # count full line comments? - Max: 100 - Enabled: false - -Metrics/ModuleLength: - CountComments: false # count full line comments? - Max: 100 - Enabled: false - -# Avoid complex methods. -Metrics/CyclomaticComplexity: - Max: 9 - Exclude: - - "**/*/permissions.rb" - -Metrics/LineLength: - Max: 180 - # To make it possible to copy or click on URIs in the code, we allow lines - # containing a URI to be longer than Max. - AllowHeredoc: true - AllowURI: true - URISchemes: - - http - - https - Exclude: - - "**/spec/**/*" - -Metrics/MethodLength: - CountComments: false # count full line comments? - Max: 15 - Enabled: false - -Metrics/ParameterLists: - Max: 5 - CountKeywordArgs: true - Exclude: - - "decidim-core/lib/decidim/filter_form_builder.rb" - -Metrics/PerceivedComplexity: - Max: 10 - Exclude: - - "**/*/permissions.rb" - -##################### Lint ################################## - -Lint/AmbiguousBlockAssociation: - Enabled: true - Exclude: - - "**/abilities/**/*" - -# Allow safe assignment in conditions. -Lint/AssignmentInCondition: - AllowSafeAssignment: true - -# checks whether the end keywords are aligned properly for `do` `end` blocks. -Layout/BlockAlignment: - # The value `start_of_block` means that the `end` should be aligned with line - # where the `do` keyword appears. - # The value `start_of_line` means it should be aligned with the whole - # expression's starting line. - # The value `either` means both are allowed. - EnforcedStyleAlignWith: either - -# Align ends correctly. -Layout/EndAlignment: - # The value `keyword` means that `end` should be aligned with the matching - # keyword (if, while, etc.). - # The value `variable` means that in assignments, `end` should be aligned - # with the start of the variable on the left hand side of `=`. In all other - # situations, `end` should still be aligned with the keyword. - # The value `start_of_line` means that `end` should be aligned with the start - # of the line which the matching keyword appears on. - EnforcedStyleAlignWith: keyword - AutoCorrect: false - -Layout/DefEndAlignment: - # The value `def` means that `end` should be aligned with the def keyword. - # The value `start_of_line` means that `end` should be aligned with method - # calls like `private`, `public`, etc, if present in front of the `def` - # keyword on the same line. - EnforcedStyleAlignWith: start_of_line - AutoCorrect: false - -Lint/InheritException: - # The default base class in favour of `Exception`. - EnforcedStyle: runtime_error - SupportedStyles: - - runtime_error - - standard_error - -# Checks for unused block arguments -Lint/UnusedBlockArgument: - IgnoreEmptyBlocks: true - AllowUnusedKeywordArguments: false - -# Checks for unused method arguments. -Lint/UnusedMethodArgument: - AllowUnusedKeywordArguments: false - IgnoreEmptyMethods: true - -##################### Performance ############################ - -Metrics/BlockLength: - Enabled: false - -RSpec/BeforeAfterAll: - Enabled: true - -RSpec/ContextWording: - Enabled: true - Prefixes: - - when - - with - - without - - and - -RSpec/DescribeClass: - Exclude: - - spec/gemfiles_spec.rb - - spec/js_bundles_spec.rb - - spec/i18n_spec.rb - - "**/*/spec/**/*_badge_spec.rb" - - decidim-core/spec/lib/global_engines_spec.rb - - "**/tasks/**/*" - -RSpec/EmptyExampleGroup: - Exclude: - - decidim-core/spec/lib/participatory_space_manifest_spec.rb - -RSpec/ExampleLength: - Max: 49 - -RSpec/ExpectInHook: - Enabled: false - -RSpec/IteratedExpectation: - Enabled: true - -RSpec/LetSetup: - Enabled: false - -RSpec/MessageSpies: - Enabled: false - -RSpec/MultipleExpectations: - Enabled: false - -RSpec/NestedGroups: - Max: 7 - -RSpec/NamedSubject: - Enabled: false - -RSpec/VerifiedDoubles: - Enabled: false - -RSpec/LeakyConstantDeclaration: - Enabled: false - -RSpec/DescribedClass: - Enabled: false - -inherit_from: .rubocop_rails.yml + - "spec/decidim_dummy_app*/**/*" diff --git a/.rubocop_rails.yml b/.rubocop_rails.yml deleted file mode 100644 index 19fe38f..0000000 --- a/.rubocop_rails.yml +++ /dev/null @@ -1,83 +0,0 @@ -require: rubocop-rails - -Rails: - Enabled: true - -Rails/ActionFilter: - Include: - - decidim-*/app/controllers/**/*.rb - -Rails/CreateTableWithTimestamps: - Enabled: false - -Rails/EnumUniqueness: - Include: - - decidim-*/app/models/**/*.rb - -Rails/Exit: - Include: - - decidim-*/app/**/*.rb - - decidim-*/config/**/*.rb - - decidim-*/lib/**/*.rb - Exclude: - - decidim-*/lib/**/*.rake - -Rails/FindBy: - Include: - - "**/*.rb" - -Rails/FindEach: - Include: - - decidim-*/app/models/**/*.rb - -Rails/HasAndBelongsToMany: - Include: - - decidim-*/app/models/**/*.rb - -Rails/HasManyOrHasOneDependent: - Include: - - decidim-*/app/models/**/*.rb - -Rails/InverseOf: - Enabled: false - -Rails/LexicallyScopedActionFilter: - Include: - - decidim-*/app/controllers/**/*.rb - -Rails/NotNullColumn: - Enabled: false - -Rails/Output: - Include: - - decidim-*/app/**/*.rb - - decidim-*/config/**/*.rb - - decidim-*/db/**/*.rb - - decidim-*/lib/**/*.rb - Exclude: - - decidim-core/db/seeds.rb - - decidim-core/lib/decidim/core.rb - - decidim-core/lib/decidim/component_manifest.rb - - decidim-core/lib/decidim/participatory_space_manifest.rb - - decidim-system/db/seeds.rb - -Rails/OutputSafety: - Enabled: false - -Rails/ReadWriteAttribute: - Include: - - decidim-*/app/models/**/*.rb - -Rails/ReversibleMigration: - Enabled: false - -Rails/ScopeArgs: - Include: - - decidim-*/app/models/**/*.rb - -Rails/SkipsModelValidations: - Enabled: true - -Rails/Validation: - Include: - - decidim-*/app/models/**/*.rb diff --git a/config/shakapacker.yml b/config/shakapacker.yml deleted file mode 100644 index a333ad2..0000000 --- a/config/shakapacker.yml +++ /dev/null @@ -1,89 +0,0 @@ -# File written by Decidim generator -# Note: You must restart bin/webpack-dev-server for changes to take effect - -default: &default - source_path: app/packs - source_entry_path: entrypoints - nested_entries: true - css_extract_ignore_order_warnings: false - - public_root_path: public - public_output_path: decidim-packs - cache_path: tmp/shakapacker - webpack_compile_output: true - extract_css: true - shakapacker_precompile: true - - additional_paths: - - node_modules - - app/packs - - # Reload manifest.json on all requests so we reload latest compiled packs - cache_manifest: false - - # Select loader to use, available options are 'babel' (default), 'swc' or 'esbuild' - webpack_loader: 'esbuild' - - # Set to true to enable check for matching versions of shakapacker gem and NPM package - will raise an error if there is a mismatch or wildcard versioning is used - ensure_consistent_versioning: true - - # Select whether the compiler will use SHA digest ('digest' option) or most recent modified timestamp ('mtime') to determine freshness - compiler_strategy: digest - - # Select whether the compiler will always use a content hash and not just in production - # Do not use contentHash except for production for performance - # https://webpack.js.org/guides/build-performance/#avoid-production-specific-tooling - useContentHash: false - -development: - <<: *default - compile: true - compiler_strategy: mtime - # Compile test packs to decidim decidim-packs folder - - # Reference: https://webpack.js.org/configuration/dev-server/ - dev_server: - https: false - host: localhost - # Notice that we use a different port (to prevent blocking the default one) as - # there will be at least two webpack servers running - port: 3035 - # Hot Module Replacement updates modules while the application is running without a full reload - hmr: false - # mini-css-extract-plugin is a required dependency in both cases. - inline_css: true - client: - # Should we show a full-screen overlay in the browser when there are compiler errors or warnings? - overlay: false - # May also be a string - # webSocketURL: - # hostname: "0.0.0.0" - # pathname: "/ws" - # port: 8080 - # Should we use gzip compression? - compress: true - # Note that apps that do not check the host are vulnerable to DNS rebinding attacks - allowed_hosts: "all" - pretty: true - headers: - 'Access-Control-Allow-Origin': '*' - static: - watch: - ignored: '**/node_modules/**' - -test: - <<: *default - compile: true - public_output_path: packs-test - -production: - <<: *default - - # Production depends on precompilation of packs prior to booting for performance. - compile: false - - # Use content hash for naming assets. Cannot be overridden by for production. - useContentHash: true - - # Cache manifest.json for performance - cache_manifest: true From 48a08817a7d377822d5a59bdf25cc903a219ae7b Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 15:13:22 +0100 Subject: [PATCH 3/9] add workflow files --- .github/lint.yml | 37 ++++++++ .github/test.yml | 75 +++++++++++++++ ...m-decidim-release-0-28-stable--rubocop-yml | 94 ------------------- 3 files changed, 112 insertions(+), 94 deletions(-) create mode 100644 .github/lint.yml create mode 100644 .github/test.yml delete mode 100644 .rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml diff --git a/.github/lint.yml b/.github/lint.yml new file mode 100644 index 0000000..919dbf8 --- /dev/null +++ b/.github/lint.yml @@ -0,0 +1,37 @@ +name: "[CI] Lint" + +on: + push: + branches: + - main + pull_request: + +env: + RUBY_VERSION: 3.2.6 + NODE_VERSION: 18.17.1 + +jobs: + lint-report: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + + - uses: actions/setup-node@master + with: + node-version: ${{ env.NODE_VERSION }} + + - run: npm ci + name: Install JS deps + + - run: bundle exec rubocop -P + name: Lint Ruby files + + - run: bundle exec erblint app/**/*.erb + name: Lint ERB files diff --git a/.github/test.yml b/.github/test.yml new file mode 100644 index 0000000..dd9ca2d --- /dev/null +++ b/.github/test.yml @@ -0,0 +1,75 @@ +name: "[CI] Test" + +on: + push: + branches: + - main + pull_request: + +env: + RUBY_VERSION: 3.2.6 + +jobs: + test-report: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:14 + ports: ["5432:5432"] + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + POSTGRES_PASSWORD: postgres + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Install additional tools + run: sudo apt-get update; sudo apt-get -f install wkhtmltopdf imagemagick + + - uses: nanasess/setup-chromedriver@v2 + with: + chromedriver-version: 119.0.6045.105 + + - name: List Chrome + run: apt list --installed | grep chrome + + - name: Remove Chrome + run: sudo apt remove google-chrome-stable + + - uses: browser-actions/setup-chrome@v1 + with: + chrome-version: 119.0.6045.105 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + + - name: Setup Database + run: bundle exec rake test_app + + - name: Run RSpec + run: bundle exec rspec + env: + SIMPLECOV: 1 + CODECOV: 1 + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots diff --git a/.rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml b/.rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml deleted file mode 100644 index 13bc55c..0000000 --- a/.rubocop-https---raw-githubusercontent-com-decidim-decidim-release-0-28-stable--rubocop-yml +++ /dev/null @@ -1,94 +0,0 @@ -inherit_gem: - decidim-dev: rubocop-decidim.yml - -inherit_mode: - merge: - - Exclude - -AllCops: - Exclude: - - "decidim-initiatives/lib/gem_overrides/origami/date.rb" - -Naming/FileName: - Exclude: - - "decidim-dev/lib/decidim-dev.rb" - -Metrics/CyclomaticComplexity: - Exclude: - - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb" - -Metrics/ParameterLists: - Exclude: - - "decidim-core/lib/decidim/filter_form_builder.rb" - -Metrics/PerceivedComplexity: - Exclude: - - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb" - -RSpec/DescribeClass: - Exclude: - - decidim-core/spec/lib/global_engines_spec.rb - -RSpec/EmptyExampleGroup: - Exclude: - - decidim-core/spec/lib/participatory_space_manifest_spec.rb - -RSpec/MultipleMemoizedHelpers: - Exclude: - - decidim-assemblies/spec/forms/assembly_form_spec.rb - -Rails/Output: - Exclude: - - lib/decidim/git_backport_manager.rb - - lib/decidim/github_manager/poster.rb - - decidim-core/lib/decidim/core.rb - - decidim-core/lib/decidim/component_manifest.rb - - decidim-core/lib/decidim/participatory_space_manifest.rb - -Rails/Exit: - Exclude: - - lib/decidim/git_backport_manager.rb - -RSpec/NoExpectationExample: - Exclude: - - decidim-admin/spec/system/participatory_space_private_user_spec.rb - - decidim-comments/spec/services/decidim/comments/comment_creation_spec.rb - - decidim-conferences/spec/cells/decidim/conferences/conference_speaker_cell_spec.rb - - decidim-core/spec/cells/decidim/date_range_cell_spec.rb - - decidim-core/spec/commands/decidim/unsubscribe_settings_spec.rb - - decidim-core/spec/controllers/registrations_controller_spec.rb - - decidim-core/spec/lib/importers/import_manifest_spec.rb - - decidim-core/spec/lib/map/geocoding_spec.rb - - decidim-core/spec/lib/participatory_space_manifest_spec.rb - - decidim-core/spec/services/decidim/events_manager_spec.rb - - decidim-core/spec/services/decidim/settings_change_spec.rb - - decidim-core/spec/services/decidim/zip_stream/zip_stream_writer_spec.rb - - decidim-core/spec/tasks/decidim_tasks_right_to_be_forgotten_spec.rb - - decidim-elections/spec/lib/tasks/decidim_election_generate_identification_keys_spec.rb - - decidim-elections/spec/lib/tasks/decidim_election_scheduled_tasks_spec.rb - - decidim-elections/spec/shared/vote_examples.rb - - decidim-elections/spec/system/key_ceremony_spec.rb - - decidim-elections/spec/system/vote_online_inside_a_voting_spec.rb - - decidim-initiatives/spec/system/admin/update_initiative_spec.rb - - decidim-initiatives/spec/system/initiative_signing_spec.rb - - decidim-meetings/spec/commands/admin/export_meeting_registrations_spec.rb - - decidim-meetings/spec/system/explore_meeting_directory_spec.rb - - decidim-meetings/spec/system/explore_meetings_spec.rb - - decidim-proposals/spec/lib/decidim/proposals/markdown_to_proposals_spec.rb - - decidim-proposals/spec/shared/import_proposals_examples.rb - - decidim-proposals/spec/shared/proposals_wizards_examples.rb - - decidim-proposals/spec/system/admin/admin_manages_participatory_texts_spec.rb - - decidim-proposals/spec/system/participatory_texts_spec.rb - - decidim-participatory_processes/spec/system/participatory_processes_spec.rb - -# fix these rules later -Capybara/SpecificFinders: - Enabled: false - -RSpec/IndexedLet: - Enabled: false - -Rails/HelperInstanceVariable: - Enabled: false - -# EOF fix these rules later From cd0eebd24a82b8b6ea51ae134183c8dacce18b4c Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 15:32:49 +0100 Subject: [PATCH 4/9] remove spring gem --- .gitignore | 3 +++ Gemfile.lock | 7 +------ .../anonymous_behavior_commands_concern.rb | 4 +++- .../create_proposal_command_overrides.rb | 2 +- .../update_proposal_command_overrides.rb | 4 ++-- .../decidim/anonymous_proposals/user_group_helper.rb | 8 ++++---- .../decidim/anonymous_proposals/coauthorable_overrides.rb | 7 ++++--- .../decidim/anonymous_proposals/permissions_overrides.rb | 6 +++--- lib/decidim/anonymous_proposals/test/factories.rb | 2 +- lib/tasks/anonymous_proposals.rake | 6 +++--- 10 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 49649c5..6b233c3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ # rspec failure tracking .rspec-failures +# rubocop +.rubocop-https* + # default test application spec/decidim_dummy_app diff --git a/Gemfile.lock b/Gemfile.lock index f4d9242..3596863 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -134,8 +134,6 @@ GIT selenium-webdriver (~> 4.9) simplecov (~> 0.22.0) simplecov-cobertura (~> 2.1.0) - spring (~> 4.0) - spring-watcher-listen (~> 2.0) w3c_rspec_validators (~> 0.3.0) webmock (~> 3.18) wisper-rspec (~> 1.0) @@ -757,11 +755,8 @@ GEM smart_properties (1.17.0) snaky_hash (2.0.1) hashie - version_gem (~> 1.1, >= 1.1.1) - spring (4.3.0) - spring-watcher-listen (2.1.0) listen (>= 2.7, < 4.0) - spring (>= 4) + version_gem (~> 1.1, >= 1.1.1) stringio (3.1.5) temple (0.10.3) terminal-table (4.0.0) diff --git a/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb b/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb index e0b1cb2..817df69 100644 --- a/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb +++ b/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Decidim module AnonymousProposals module AnonymousBehaviorCommandsConcern @@ -8,7 +10,7 @@ def is_anonymous? end def anonymous_group - Decidim::UserGroup.where(organization: organization).anonymous.first + Decidim::UserGroup.where(organization:).anonymous.first end def set_current_user(user) diff --git a/app/commands/decidim/anonymous_proposals/create_proposal_command_overrides.rb b/app/commands/decidim/anonymous_proposals/create_proposal_command_overrides.rb index 5a8d4ee..f495d36 100644 --- a/app/commands/decidim/anonymous_proposals/create_proposal_command_overrides.rb +++ b/app/commands/decidim/anonymous_proposals/create_proposal_command_overrides.rb @@ -10,7 +10,7 @@ module CreateProposalCommandOverrides def initialize(form, current_user, coauthorships = nil) @form = form - @selected_user_group = Decidim::UserGroup.find_by(organization: organization, id: form.user_group_id) + @selected_user_group = Decidim::UserGroup.find_by(organization:, id: form.user_group_id) @is_anonymous = allow_anonymous_proposals? && (current_user.blank? || @selected_user_group == anonymous_group) set_current_user(current_user) diff --git a/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb b/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb index 7d282ee..adef859 100644 --- a/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb +++ b/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb @@ -10,10 +10,10 @@ module UpdateProposalCommandOverrides def initialize(form, current_user, proposal) @form = form - @selected_user_group = Decidim::UserGroup.find_by(organization: organization, id: form.user_group_id) + @selected_user_group = Decidim::UserGroup.find_by(organization:, id: form.user_group_id) @proposal = proposal @attached_to = proposal - @editable = allow_anonymous_proposals? && proposal.authored_by?(anonymous_group) || proposal.editable_by?(current_user) + @editable = (allow_anonymous_proposals? && proposal.authored_by?(anonymous_group)) || proposal.editable_by?(current_user) @is_anonymous = allow_anonymous_proposals? && (current_user.blank? || (proposal.published? ? proposal.authored_by?(anonymous_group) : @selected_user_group == anonymous_group)) set_current_user(current_user) end diff --git a/app/helpers/decidim/anonymous_proposals/user_group_helper.rb b/app/helpers/decidim/anonymous_proposals/user_group_helper.rb index 3df094a..e35c8d8 100644 --- a/app/helpers/decidim/anonymous_proposals/user_group_helper.rb +++ b/app/helpers/decidim/anonymous_proposals/user_group_helper.rb @@ -19,7 +19,7 @@ def user_group_with_anonymous_select_field(form, name, options = {}) if allow_anonymous_proposals? anonymous_group_extension = anonymous_group.present? ? [[t("anonymous_user", scope: "decidim.proposals.proposals.new"), anonymous_group.id]] : [] - selected_group_id = (@form.user_group_id || options[:select_anonymous] && anonymous_group&.id).presence + selected_group_id = (@form.user_group_id || (options[:select_anonymous] && anonymous_group&.id)).presence form.select( name, @@ -28,9 +28,9 @@ def user_group_with_anonymous_select_field(form, name, options = {}) include_blank: current_user.name, label: options.has_key?(:label) ? options[:label] : true ) - else - return user_group_select_field(form, name, options) if current_organization.user_groups_enabled? && user_groups.any? - end + elsif current_organization.user_groups_enabled? && user_groups.any? + user_group_select_field(form, name, options) +end end end end diff --git a/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb b/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb index bfaf55f..2693fa2 100644 --- a/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb +++ b/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb @@ -8,6 +8,7 @@ module CoauthorableOverrides included do def add_coauthor(author, extra_attributes = {}) return if author.blank? && persisted? + user_group = extra_attributes[:user_group] if allow_anonymous_proposals? && (author.blank? || user_group == anonymous_group) @@ -17,9 +18,9 @@ def add_coauthor(author, extra_attributes = {}) end return if coauthorships.exists?(decidim_author_id: author.id, decidim_author_type: author.class.base_class.name) && user_group.blank? - return if user_group && coauthorships.exists?(user_group: user_group) + return if user_group && coauthorships.exists?(user_group:) - coauthorship_attributes = extra_attributes.merge(author: author) + coauthorship_attributes = extra_attributes.merge(author:) if persisted? coauthorships.create!(coauthorship_attributes) @@ -37,7 +38,7 @@ def allow_anonymous_proposals? end def anonymous_group - Decidim::UserGroup.where(organization: organization).anonymous.first + Decidim::UserGroup.where(organization:).anonymous.first end end end diff --git a/app/permissions/decidim/anonymous_proposals/permissions_overrides.rb b/app/permissions/decidim/anonymous_proposals/permissions_overrides.rb index 3f23ffb..fb569a2 100644 --- a/app/permissions/decidim/anonymous_proposals/permissions_overrides.rb +++ b/app/permissions/decidim/anonymous_proposals/permissions_overrides.rb @@ -28,11 +28,11 @@ def permissions private def user_or_anonymous_action?(permission_action) - user || [:create, :edit].include?(permission_action.action) && allow_anonymous_proposals? + user || ([:create, :edit].include?(permission_action.action) && allow_anonymous_proposals?) end def allow_anonymous_proposals? - Decidim::UserGroup.where(organization: organization).anonymous.exists? && component_settings.anonymous_proposals_enabled? + Decidim::UserGroup.where(organization:).anonymous.exists? && component_settings.anonymous_proposals_enabled? end def organization @@ -44,7 +44,7 @@ def can_edit_proposal? end def anonymously_editable? - allow_anonymous_proposals? && proposal.draft? && proposal.editable_by?(Decidim::UserGroup.where(organization: organization).anonymous.first) + allow_anonymous_proposals? && proposal.draft? && proposal.editable_by?(Decidim::UserGroup.where(organization:).anonymous.first) end end end diff --git a/lib/decidim/anonymous_proposals/test/factories.rb b/lib/decidim/anonymous_proposals/test/factories.rb index e4688d3..8bdf8cb 100644 --- a/lib/decidim/anonymous_proposals/test/factories.rb +++ b/lib/decidim/anonymous_proposals/test/factories.rb @@ -5,7 +5,7 @@ FactoryBot.define do factory :anonymous_proposals_component, parent: :component do name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :anonymous_proposals).i18n_name } - manifest_name :anonymous_proposals + manifest_name { :anonymous_proposals } participatory_space { create(:participatory_process, :with_steps) } end diff --git a/lib/tasks/anonymous_proposals.rake b/lib/tasks/anonymous_proposals.rake index befe5c1..e09e546 100644 --- a/lib/tasks/anonymous_proposals.rake +++ b/lib/tasks/anonymous_proposals.rake @@ -6,10 +6,10 @@ namespace :decidim_anonymous_proposals do organizations = args.organization_id.present? ? Decidim::Organization.where(id: args.organization_id) : Decidim::Organization.all organizations.each do |organization| - if Decidim::UserGroup.where(organization: organization).anonymous.exists? && (update_args = args.to_h.slice(:name, :nickname, :email)).present? - Decidim::UserGroup.where(organization: organization).anonymous.first.update(update_args) + if Decidim::UserGroup.where(organization:).anonymous.exists? && (update_args = args.to_h.slice(:name, :nickname, :email)).present? + Decidim::UserGroup.where(organization:).anonymous.first.update(update_args) else - Decidim::UserGroup.where(organization: organization).create!( + Decidim::UserGroup.where(organization:).create!( name: args.name || "Anonymous", nickname: args.nickname || "anonymous", email: args.email || "anonymous@example.org", From 9d6e78173ade5b00d844e8577e234dae65f250b3 Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 15:56:19 +0100 Subject: [PATCH 5/9] add overrides spec --- .circleci/config.yml | 47 -------------------------------------- spec/lib/overrides_spec.rb | 35 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 47 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 spec/lib/overrides_spec.rb diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 21661d4..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- - -version: 2 - -jobs: - build: - docker: - - image: decidim/decidim@sha256:348fb1faa49cfe76ba7cbeafc67ca09002cf95f0ffa7a76eefa9d5b3774e0ee9 - environment: - DATABASE_USERNAME: postgres - - - image: postgres - environment: - POSTGRES_USER: postgres - - working_directory: /app - - steps: - - checkout - - - restore_cache: - keys: - - bundler-dependencies-{{ checksum "Gemfile.lock" }} - - - run: - name: Install dependencies - command: bundle install - - - save_cache: - key: bundler-dependencies-{{ checksum "Gemfile.lock" }} - paths: - - /usr/local/bundle - - - run: - name: Wait for db - command: dockerize -wait tcp://localhost:5432 -timeout 1m - - - run: - name: Generate test app - command: bundle exec rake decidim:generate_external_test_app - - - run: - name: Run RSpec tests - command: bundle exec rspec - - - store_artifacts: - path: /app/spec/decidim_dummy_app/tmp/screenshots diff --git a/spec/lib/overrides_spec.rb b/spec/lib/overrides_spec.rb new file mode 100644 index 0000000..a3a8f54 --- /dev/null +++ b/spec/lib/overrides_spec.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +require "spec_helper" + +# We make sure that the checksum of the file overriden is the same +# as the expected. If this test fails, it means that the overriden +# file should be updated to match any change/bug fix introduced in the core +checksums = [ + { + package: "decidim-proposals", + files: { + "/app/views/decidim/proposals/proposals/new.html.erb" => "ba8c88bdf07061fda1962c54868c9131", + "/app/views/decidim/proposals/proposals/index.html.erb" => "e7a4c4d9f000d17c68ae9eeddde69094", + "/app/views/decidim/proposals/proposals/edit_draft.html.erb" => "3e51c7a14d250a1abef0753a1db7661b", + "/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb" => "5907a92b0adf9a0cd5f1e5241317cd48" + } + } +] + +describe "Overriden files", type: :view do + checksums.each do |item| + spec = Gem::Specification.find_by_name(item[:package]) + item[:files].each do |file, signature| + it "#{spec.gem_dir}#{file} matches checksum" do + expect(md5("#{spec.gem_dir}#{file}")).to eq(signature) + end + end + end + + private + + def md5(file) + Digest::MD5.hexdigest(File.read(file)) + end +end From dacc5571b10ae836d182ec8bcb0cf7e481135ec6 Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 16:27:24 +0100 Subject: [PATCH 6/9] move files --- .github/{ => workflows}/lint.yml | 0 .github/{ => workflows}/test.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/lint.yml (100%) rename .github/{ => workflows}/test.yml (100%) diff --git a/.github/lint.yml b/.github/workflows/lint.yml similarity index 100% rename from .github/lint.yml rename to .github/workflows/lint.yml diff --git a/.github/test.yml b/.github/workflows/test.yml similarity index 100% rename from .github/test.yml rename to .github/workflows/test.yml From 78e3e79adc49a61f5a119c772e368aaea5c121d4 Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 16:36:41 +0100 Subject: [PATCH 7/9] add ruby version --- .ruby-version | 1 + Gemfile.lock | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..34cde56 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.6 diff --git a/Gemfile.lock b/Gemfile.lock index 3596863..f4d9242 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -134,6 +134,8 @@ GIT selenium-webdriver (~> 4.9) simplecov (~> 0.22.0) simplecov-cobertura (~> 2.1.0) + spring (~> 4.0) + spring-watcher-listen (~> 2.0) w3c_rspec_validators (~> 0.3.0) webmock (~> 3.18) wisper-rspec (~> 1.0) @@ -755,8 +757,11 @@ GEM smart_properties (1.17.0) snaky_hash (2.0.1) hashie - listen (>= 2.7, < 4.0) version_gem (~> 1.1, >= 1.1.1) + spring (4.3.0) + spring-watcher-listen (2.1.0) + listen (>= 2.7, < 4.0) + spring (>= 4) stringio (3.1.5) temple (0.10.3) terminal-table (4.0.0) From 826a8deca281a12db291d5657440586dbdf718b9 Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 16:44:46 +0100 Subject: [PATCH 8/9] add homepage spec --- spec/system/homepage_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/system/homepage_spec.rb diff --git a/spec/system/homepage_spec.rb b/spec/system/homepage_spec.rb new file mode 100644 index 0000000..f880634 --- /dev/null +++ b/spec/system/homepage_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe "Homepage", perform_enqueued: true do + let(:organization) { create(:organization) } + let!(:content_block) { create(:content_block, organization:, manifest_name: :hero) } + + before do + switch_to_host(organization.host) + end + + it "renders the home page" do + visit decidim.root_path + expect(page).to have_content("Welcome") + end +end From 7460c53c151e1ea128fefbca2507d0c078a8b0c3 Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 18 Mar 2025 17:25:02 +0100 Subject: [PATCH 9/9] run rubocop --- .github/workflows/lint.yml | 3 -- .../anonymous_behavior_commands_concern.rb | 8 ++-- .../update_proposal_command_overrides.rb | 4 +- .../proposals_controller_additions.rb | 4 +- .../anonymous_proposals/user_group_helper.rb | 30 ++++++------- .../coauthorable_overrides.rb | 44 +++++++++++++------ .../update_group_select.html.erb.deface | 4 +- 7 files changed, 57 insertions(+), 40 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 919dbf8..7e12604 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,9 +27,6 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - - run: npm ci - name: Install JS deps - - run: bundle exec rubocop -P name: Lint Ruby files diff --git a/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb b/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb index 817df69..0c3695a 100644 --- a/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb +++ b/app/commands/decidim/anonymous_proposals/anonymous_behavior_commands_concern.rb @@ -5,7 +5,7 @@ module AnonymousProposals module AnonymousBehaviorCommandsConcern private - def is_anonymous? + def anonymous? @is_anonymous end @@ -13,12 +13,12 @@ def anonymous_group Decidim::UserGroup.where(organization:).anonymous.first end - def set_current_user(user) - @current_user = is_anonymous? ? anonymous_group : user + def current_user(user) + @current_user = anonymous? ? anonymous_group : user end def user_group - return if is_anonymous? + return if anonymous? @selected_user_group end diff --git a/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb b/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb index adef859..6de703d 100644 --- a/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb +++ b/app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb @@ -14,8 +14,10 @@ def initialize(form, current_user, proposal) @proposal = proposal @attached_to = proposal @editable = (allow_anonymous_proposals? && proposal.authored_by?(anonymous_group)) || proposal.editable_by?(current_user) + # rubocop:disable Layout/LineLength @is_anonymous = allow_anonymous_proposals? && (current_user.blank? || (proposal.published? ? proposal.authored_by?(anonymous_group) : @selected_user_group == anonymous_group)) - set_current_user(current_user) + # rubocop:enable Layout/LineLength + current_user(current_user) end private diff --git a/app/controllers/decidim/anonymous_proposals/proposals_controller_additions.rb b/app/controllers/decidim/anonymous_proposals/proposals_controller_additions.rb index a504bb7..5dfd8cb 100644 --- a/app/controllers/decidim/anonymous_proposals/proposals_controller_additions.rb +++ b/app/controllers/decidim/anonymous_proposals/proposals_controller_additions.rb @@ -7,7 +7,7 @@ module ProposalsControllerAdditions extend ActiveSupport::Concern included do - helper_method :allow_anonymous_proposals?, :is_anonymous?, :anonymous_group + helper_method :allow_anonymous_proposals?, :anonymous?, :anonymous_group skip_before_action :authenticate_user!, if: :allow_anonymous_proposals? end @@ -18,7 +18,7 @@ def allow_anonymous_proposals? anonymous_group.present? && component_settings.anonymous_proposals_enabled? end - def is_anonymous? + def anonymous? allow_anonymous_proposals? && (current_user.blank? || @proposal&.authored_by?(anonymous_group)) end diff --git a/app/helpers/decidim/anonymous_proposals/user_group_helper.rb b/app/helpers/decidim/anonymous_proposals/user_group_helper.rb index e35c8d8..5fa5f8c 100644 --- a/app/helpers/decidim/anonymous_proposals/user_group_helper.rb +++ b/app/helpers/decidim/anonymous_proposals/user_group_helper.rb @@ -13,24 +13,24 @@ module UserGroupHelper # # Returns nothing. def user_group_with_anonymous_select_field(form, name, options = {}) - return unless user_signed_in? + return form.select(name, [], options) if skip_user_group_selection? - user_groups = Decidim::UserGroups::ManageableUserGroups.for(current_user).verified + select_options = build_user_group_options + form.select(name, select_options, options) + end - if allow_anonymous_proposals? - anonymous_group_extension = anonymous_group.present? ? [[t("anonymous_user", scope: "decidim.proposals.proposals.new"), anonymous_group.id]] : [] - selected_group_id = (@form.user_group_id || (options[:select_anonymous] && anonymous_group&.id)).presence + private - form.select( - name, - user_groups.map { |g| [g.name, g.id] } + anonymous_group_extension, - selected: selected_group_id, - include_blank: current_user.name, - label: options.has_key?(:label) ? options[:label] : true - ) - elsif current_organization.user_groups_enabled? && user_groups.any? - user_group_select_field(form, name, options) -end + def skip_user_group_selection? + current_user.blank? || user_groups_with_anonymous.empty? + end + + def build_user_group_options + user_groups_with_anonymous.map { |group| [group.name, group.id] } + end + + def user_groups_with_anonymous + @user_groups_with_anonymous ||= UserGroup.available_for(current_user) + [anonymous_group] end end end diff --git a/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb b/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb index 2693fa2..3a0a00f 100644 --- a/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb +++ b/app/models/concerns/decidim/anonymous_proposals/coauthorable_overrides.rb @@ -7,20 +7,9 @@ module CoauthorableOverrides included do def add_coauthor(author, extra_attributes = {}) - return if author.blank? && persisted? + return if should_skip_addition?(author, extra_attributes) - user_group = extra_attributes[:user_group] - - if allow_anonymous_proposals? && (author.blank? || user_group == anonymous_group) - author = anonymous_group - user_group = nil - extra_attributes.delete(:user_group) - end - - return if coauthorships.exists?(decidim_author_id: author.id, decidim_author_type: author.class.base_class.name) && user_group.blank? - return if user_group && coauthorships.exists?(user_group:) - - coauthorship_attributes = extra_attributes.merge(author:) + coauthorship_attributes = prepare_coauthorship_attributes(author, extra_attributes) if persisted? coauthorships.create!(coauthorship_attributes) @@ -40,6 +29,35 @@ def allow_anonymous_proposals? def anonymous_group Decidim::UserGroup.where(organization:).anonymous.first end + + def should_skip_addition?(author, extra_attributes) + return true if author.blank? && persisted? + + user_group = extra_attributes[:user_group] + + if allow_anonymous_proposals? && (author.blank? || user_group == anonymous_group) + handle_anonymous_proposals(author, extra_attributes) + return true + end + + coauthor_exists?(author, user_group) + end + + def handle_anonymous_proposals(_author, extra_attributes) + anonymous_group + extra_attributes.delete(:user_group) + end + + def coauthor_exists?(author, user_group) + return true if coauthorships.exists?(decidim_author_id: author.id, decidim_author_type: author.class.base_class.name) && user_group.blank? + return true if user_group && coauthorships.exists?(user_group:) + + false + end + + def prepare_coauthorship_attributes(author, extra_attributes) + extra_attributes.merge(author:) + end end end end diff --git a/app/overrides/decidim/proposals/proposals/_edit_form_fields/update_group_select.html.erb.deface b/app/overrides/decidim/proposals/proposals/_edit_form_fields/update_group_select.html.erb.deface index 119871a..a6b98d6 100644 --- a/app/overrides/decidim/proposals/proposals/_edit_form_fields/update_group_select.html.erb.deface +++ b/app/overrides/decidim/proposals/proposals/_edit_form_fields/update_group_select.html.erb.deface @@ -3,10 +3,10 @@ <% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %> <% if @proposal.draft? %>
- <%= user_group_with_anonymous_select_field form, :user_group_id, select_anonymous: @proposal.persisted? && is_anonymous? %> + <%= user_group_with_anonymous_select_field form, :user_group_id, select_anonymous: @proposal.persisted? && anonymous? %>
<% else %> - <% if !is_anonymous? %> + <% if !anonymous? %>
<%= user_group_select_field form, :user_group_id %>