diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 858340b64..3608c94c9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ env: jobs: lint: name: Lint code - runs-on: ubuntu-latest + runs-on: ubuntu:22.04 env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1aa98c1a3..7a216af1a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ env: jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu:22.04 services: postgres: image: postgres:11 diff --git a/.github/workflows/test_census_sms.yml b/.github/workflows/test_census_sms.yml index 700b6a936..3156d4f79 100644 --- a/.github/workflows/test_census_sms.yml +++ b/.github/workflows/test_census_sms.yml @@ -8,7 +8,7 @@ env: jobs: test: name: Test Census SMS - runs-on: ubuntu-latest + runs-on: ubuntu:22-04 services: postgres: image: postgres:11 diff --git a/.github/workflows/test_stats.yml b/.github/workflows/test_stats.yml index a4254bc6d..fe33e7c72 100644 --- a/.github/workflows/test_stats.yml +++ b/.github/workflows/test_stats.yml @@ -8,7 +8,7 @@ env: jobs: test: name: Test Stats - runs-on: ubuntu-latest + runs-on: ubuntu:22.04 services: postgres: image: postgres:11 diff --git a/.github/workflows/test_valid_auth.yml b/.github/workflows/test_valid_auth.yml index 1c302645d..b47187070 100644 --- a/.github/workflows/test_valid_auth.yml +++ b/.github/workflows/test_valid_auth.yml @@ -8,7 +8,7 @@ env: jobs: test: name: Test Valid Auth - runs-on: ubuntu-latest + runs-on: ubuntu:22-04 services: postgres: image: postgres:11 diff --git a/Gemfile b/Gemfile index 7486bcf9d..b518f8f55 100644 --- a/Gemfile +++ b/Gemfile @@ -2,13 +2,16 @@ source "https://rubygems.org" -DECIDIM_VERSION = "0.28.3" +DECIDIM_VERSION = "0.28.4" ruby RUBY_VERSION -gem "decidim", DECIDIM_VERSION +# gem "decidim", DECIDIM_VERSION +gem "decidim", github: "ajuntamentdeBarcelona/decidim", branch: "bcn/0.28-branch" gem "decidim-initiatives", DECIDIM_VERSION +gem "decidim-internal_evaluation", github: "AjuntamentdeBarcelona/decidim-internal-evaluation-module", branch: "release/0.28-stable" gem "decidim-sortitions", DECIDIM_VERSION +gem "decidim-templates", DECIDIM_VERSION gem "decidim-census_sms", path: "decidim-census_sms" gem "decidim-dataviz", path: "decidim-dataviz" diff --git a/Gemfile.lock b/Gemfile.lock index 056c28f41..0136fecf8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,14 @@ +GIT + remote: https://github.com/AjuntamentdeBarcelona/decidim-internal-evaluation-module.git + revision: cf5eb7f00f957881ade8360a69655e92d95ceff0 + branch: release/0.28-stable + specs: + decidim-internal_evaluation (0.0.1) + decidim-core (~> 0.28.0) + decidim-proposals (~> 0.28.0) + decidim-templates (~> 0.28.0) + deface (~> 1.9) + GIT remote: https://github.com/AjuntamentdeBarcelona/decidim-module-kids revision: df16cf4de13c306348761d850d19815c8221874e @@ -16,6 +27,141 @@ GIT decidim-admin (>= 0.28, < 0.29) decidim-core (>= 0.28, < 0.29) +GIT + remote: https://github.com/ajuntamentdeBarcelona/decidim.git + revision: 9c78c1c36bb6c44a855c02acd6f58c70345853c4 + branch: bcn/0.28-branch + specs: + decidim (0.28.4) + decidim-accountability (= 0.28.4) + decidim-admin (= 0.28.4) + decidim-api (= 0.28.4) + decidim-assemblies (= 0.28.4) + decidim-blogs (= 0.28.4) + decidim-budgets (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-debates (= 0.28.4) + decidim-forms (= 0.28.4) + decidim-generators (= 0.28.4) + decidim-meetings (= 0.28.4) + decidim-pages (= 0.28.4) + decidim-participatory_processes (= 0.28.4) + decidim-proposals (= 0.28.4) + decidim-sortitions (= 0.28.4) + decidim-surveys (= 0.28.4) + decidim-system (= 0.28.4) + decidim-verifications (= 0.28.4) + decidim-accountability (0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-admin (0.28.4) + active_link_to (~> 1.0) + decidim-core (= 0.28.4) + devise (~> 4.7) + devise-i18n (~> 1.2) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-api (0.28.4) + commonmarker (~> 0.23.0, >= 0.23.9) + decidim-core (= 0.28.4) + graphql (~> 2.0.0) + graphql-docs (~> 3.0.1) + rack-cors (~> 1.0) + decidim-assemblies (0.28.4) + decidim-core (= 0.28.4) + decidim-blogs (0.28.4) + decidim-admin (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-budgets (0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-comments (0.28.4) + decidim-core (= 0.28.4) + redcarpet (~> 3.5, >= 3.5.1) + decidim-core (0.28.4) + active_link_to (~> 1.0) + acts_as_list (~> 1.0) + batch-loader (~> 1.2) + browser (~> 2.7) + carrierwave (~> 2.2.5, >= 2.2.5) + cells-erb (~> 0.1.0) + cells-rails (~> 0.1.3) + charlock_holmes (~> 0.7) + date_validator (~> 0.12.0) + 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) + 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) + 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.6.4) + rack-attack (~> 6.0) + rails (~> 6.1.7, >= 6.1.7.4) + rails-i18n (~> 6.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.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-forms (0.28.4) + decidim-core (= 0.28.4) + wicked_pdf (~> 2.1) + wkhtmltopdf-binary (~> 0.12) + decidim-generators (0.28.4) + decidim-core (= 0.28.4) + decidim-meetings (0.28.4) + decidim-core (= 0.28.4) + decidim-forms (= 0.28.4) + icalendar (~> 2.5) + decidim-pages (0.28.4) + decidim-core (= 0.28.4) + decidim-participatory_processes (0.28.4) + decidim-core (= 0.28.4) + decidim-proposals (0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + doc2text (~> 0.4.6) + redcarpet (~> 3.5, >= 3.5.1) + decidim-surveys (0.28.4) + decidim-core (= 0.28.4) + decidim-forms (= 0.28.4) + decidim-system (0.28.4) + active_link_to (~> 1.0) + decidim-core (= 0.28.4) + devise (~> 4.7) + devise-i18n (~> 1.2) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-verifications (0.28.4) + decidim-core (= 0.28.4) + GIT remote: https://github.com/decidim-ice/decidim-module-decidim_awesome revision: 84374037d34a3ac80dc18406834169c65869f11b @@ -69,40 +215,40 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.8) - actionpack (= 6.1.7.8) - activesupport (= 6.1.7.8) + actioncable (6.1.7.9) + actionpack (= 6.1.7.9) + activesupport (= 6.1.7.9) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.8) - actionpack (= 6.1.7.8) - activejob (= 6.1.7.8) - activerecord (= 6.1.7.8) - activestorage (= 6.1.7.8) - activesupport (= 6.1.7.8) + actionmailbox (6.1.7.9) + actionpack (= 6.1.7.9) + activejob (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) mail (>= 2.7.1) - actionmailer (6.1.7.8) - actionpack (= 6.1.7.8) - actionview (= 6.1.7.8) - activejob (= 6.1.7.8) - activesupport (= 6.1.7.8) + actionmailer (6.1.7.9) + actionpack (= 6.1.7.9) + actionview (= 6.1.7.9) + activejob (= 6.1.7.9) + activesupport (= 6.1.7.9) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.7.8) - actionview (= 6.1.7.8) - activesupport (= 6.1.7.8) + actionpack (6.1.7.9) + actionview (= 6.1.7.9) + activesupport (= 6.1.7.9) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.8) - actionpack (= 6.1.7.8) - activerecord (= 6.1.7.8) - activestorage (= 6.1.7.8) - activesupport (= 6.1.7.8) + actiontext (6.1.7.9) + actionpack (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) nokogiri (>= 1.8.5) - actionview (6.1.7.8) - activesupport (= 6.1.7.8) + actionview (6.1.7.9) + activesupport (= 6.1.7.9) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -110,31 +256,32 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.7.8) - activesupport (= 6.1.7.8) + activejob (6.1.7.9) + activesupport (= 6.1.7.9) globalid (>= 0.3.6) - activemodel (6.1.7.8) - activesupport (= 6.1.7.8) - activerecord (6.1.7.8) - activemodel (= 6.1.7.8) - activesupport (= 6.1.7.8) - activestorage (6.1.7.8) - actionpack (= 6.1.7.8) - activejob (= 6.1.7.8) - activerecord (= 6.1.7.8) - activesupport (= 6.1.7.8) + activemodel (6.1.7.9) + activesupport (= 6.1.7.9) + activerecord (6.1.7.9) + activemodel (= 6.1.7.9) + activesupport (= 6.1.7.9) + activestorage (6.1.7.9) + actionpack (= 6.1.7.9) + activejob (= 6.1.7.9) + activerecord (= 6.1.7.9) + activesupport (= 6.1.7.9) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.8) + activesupport (6.1.7.9) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - acts_as_list (1.1.0) - activerecord (>= 4.2) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + acts_as_list (1.2.3) + activerecord (>= 6.1) + activesupport (>= 6.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) aws-eventstream (1.3.0) aws-partitions (1.896.0) @@ -158,20 +305,20 @@ GEM base64 (0.2.0) batch-loader (1.5.0) bcrypt (3.1.20) - better_html (2.0.2) + better_html (2.1.1) actionview (>= 6.0) activesupport (>= 6.0) ast (~> 2.0) erubi (~> 1.4) parser (>= 2.4) smart_properties - bigdecimal (3.1.6) + bigdecimal (3.1.8) bindex (0.8.1) bootsnap (1.18.3) msgpack (~> 1.2) browser (2.7.1) - builder (3.2.4) - bullet (7.1.6) + builder (3.3.0) + bullet (7.2.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) @@ -184,7 +331,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.5) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -203,7 +350,7 @@ GEM cells-rails (0.1.5) actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) - charlock_holmes (0.7.7) + charlock_holmes (0.7.9) chef-utils (18.1.0) concurrent-ruby cmdparse (3.0.7) @@ -212,14 +359,15 @@ GEM simplecov colorize (0.8.1) commonmarker (0.23.10) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crack (1.0.0) bigdecimal rexml crass (1.0.6) - css_parser (1.16.0) + css_parser (1.19.1) addressable + csv (3.3.0) dalli (3.2.8) database_cleaner (2.0.2) database_cleaner-active_record (>= 2, < 3) @@ -231,110 +379,11 @@ GEM date_validator (0.12.0) activemodel (>= 3) activesupport (>= 3) - decidim (0.28.3) - decidim-accountability (= 0.28.3) - decidim-admin (= 0.28.3) - decidim-api (= 0.28.3) - decidim-assemblies (= 0.28.3) - decidim-blogs (= 0.28.3) - decidim-budgets (= 0.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - decidim-debates (= 0.28.3) - decidim-forms (= 0.28.3) - decidim-generators (= 0.28.3) - decidim-meetings (= 0.28.3) - decidim-pages (= 0.28.3) - decidim-participatory_processes (= 0.28.3) - decidim-proposals (= 0.28.3) - decidim-sortitions (= 0.28.3) - decidim-surveys (= 0.28.3) - decidim-system (= 0.28.3) - decidim-verifications (= 0.28.3) - decidim-accountability (0.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - decidim-admin (0.28.3) - active_link_to (~> 1.0) - decidim-core (= 0.28.3) - devise (~> 4.7) - devise-i18n (~> 1.2) - devise_invitable (~> 2.0, >= 2.0.9) - decidim-api (0.28.3) - commonmarker (~> 0.23.0, >= 0.23.9) - decidim-core (= 0.28.3) - graphql (~> 2.0.0) - graphql-docs (~> 3.0.1) - rack-cors (~> 1.0) - decidim-assemblies (0.28.3) - decidim-core (= 0.28.3) - decidim-blogs (0.28.3) - decidim-admin (= 0.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - decidim-budgets (0.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - decidim-comments (0.28.3) - decidim-core (= 0.28.3) - redcarpet (~> 3.5, >= 3.5.1) - decidim-core (0.28.3) - active_link_to (~> 1.0) - acts_as_list (~> 1.0) - batch-loader (~> 1.2) - browser (~> 2.7) - carrierwave (~> 2.2.5, >= 2.2.5) - cells-erb (~> 0.1.0) - cells-rails (~> 0.1.3) - charlock_holmes (~> 0.7) - date_validator (~> 0.12.0) - 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) - 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) - 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.6.4) - rack-attack (~> 6.0) - rails (~> 6.1.7, >= 6.1.7.4) - rails-i18n (~> 6.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.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - decidim-dev (0.28.3) + decidim-dev (0.28.4) bullet (~> 7.0) byebug (~> 11.0) capybara (~> 3.39) - decidim (= 0.28.3) + decidim (= 0.28.4) erb_lint (~> 0.4.0) factory_bot_rails (~> 6.2) faker (~> 3.2) @@ -361,49 +410,23 @@ GEM w3c_rspec_validators (~> 0.3.0) webmock (~> 3.18) wisper-rspec (~> 1.0) - decidim-forms (0.28.3) - decidim-core (= 0.28.3) - wicked_pdf (~> 2.1) - wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.28.3) - decidim-core (= 0.28.3) - decidim-initiatives (0.28.3) - decidim-admin (= 0.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - decidim-verifications (= 0.28.3) + decidim-initiatives (0.28.4) + decidim-admin (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-verifications (= 0.28.4) hexapdf (~> 0.32.0) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-meetings (0.28.3) - decidim-core (= 0.28.3) - decidim-forms (= 0.28.3) - icalendar (~> 2.5) - decidim-pages (0.28.3) - decidim-core (= 0.28.3) - decidim-participatory_processes (0.28.3) - decidim-core (= 0.28.3) - decidim-proposals (0.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - doc2text (~> 0.4.6) - redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.28.3) - decidim-admin (= 0.28.3) - decidim-comments (= 0.28.3) - decidim-core (= 0.28.3) - decidim-proposals (= 0.28.3) - decidim-surveys (0.28.3) - decidim-core (= 0.28.3) - decidim-forms (= 0.28.3) - decidim-system (0.28.3) - active_link_to (~> 1.0) - decidim-core (= 0.28.3) - devise (~> 4.7) - devise-i18n (~> 1.2) - devise_invitable (~> 2.0, >= 2.0.9) - decidim-verifications (0.28.3) - decidim-core (= 0.28.3) + decidim-sortitions (0.28.4) + decidim-admin (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-proposals (= 0.28.4) + decidim-templates (0.28.4) + decidim-core (= 0.28.4) + decidim-forms (= 0.28.4) + decidim-proposals (= 0.28.4) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) @@ -430,7 +453,7 @@ GEM nokogiri (>= 1.13.2, < 1.17.0) rubyzip (~> 2.3.0) docile (1.4.0) - doorkeeper (5.6.9) + doorkeeper (5.7.1) railties (>= 5) doorkeeper-i18n (4.0.1) dotenv (3.1.0) @@ -446,27 +469,29 @@ GEM smart_properties erbse (0.1.4) temple - erubi (1.12.0) + erubi (1.13.0) escape_utils (1.2.2) - excon (0.109.0) + excon (0.112.0) extended-markdown-filter (0.7.0) html-pipeline (~> 2.9) - factory_bot (6.4.6) + factory_bot (6.5.0) activesupport (>= 5.0.0) factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) faker (3.2.3) i18n (>= 1.8.11, < 2) - faraday (2.9.0) - faraday-net_http (>= 2.0, < 3.2) - faraday-net_http (3.1.0) + faraday (2.12.0) + faraday-net_http (>= 2.0, < 3.4) + json + logger + faraday-net_http (3.3.0) net-http ffi (1.16.3) file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-core (2.4.0) + fog-core (2.5.0) builder excon (~> 0.71) formatador (>= 0.2, < 2.0) @@ -481,13 +506,15 @@ GEM activesupport (>= 4.1, < 7.1) railties (>= 4.1, < 7.1) gemoji (3.0.1) - geocoder (1.8.2) + geocoder (1.8.3) + base64 (>= 0.1.0) + csv (>= 3.0.0) geom2d (0.4.1) get_process_mem (0.2.7) ffi (~> 1.0) globalid (1.2.1) activesupport (>= 6.1) - graphql (2.0.29) + graphql (2.0.31) base64 graphql-docs (3.0.1) commonmarker (~> 0.16) @@ -497,23 +524,23 @@ GEM graphql (~> 2.0) html-pipeline (~> 2.9) sass (~> 3.4) - hashdiff (1.1.0) + hashdiff (1.1.1) hashie (5.0.0) hexapdf (0.32.2) cmdparse (~> 3.0, >= 3.0.3) geom2d (~> 0.3) openssl (>= 2.2.1) - highline (3.0.1) + highline (3.1.1) + reline html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) htmlentities (4.3.4) - i18n (1.14.4) + i18n (1.14.6) concurrent-ruby (~> 1.0) - i18n-tasks (1.0.13) + i18n-tasks (1.0.14) activesupport (>= 4.0.2) ast (>= 2.1.0) - better_html (>= 1.0, < 3.0) erubi highline (>= 2.0.0) i18n @@ -521,17 +548,19 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.10.1) + icalendar (2.10.3) ice_cube (~> 0.16) - ice_cube (0.16.4) - image_processing (1.12.2) + ostruct + ice_cube (0.17.0) + image_processing (1.13.0) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) + io-console (0.7.2) jmespath (1.6.2) - json (2.7.1) - jwt (2.8.1) + json (2.7.2) + jwt (2.9.3) base64 kaminari (1.2.2) activesupport (>= 4.1.0) @@ -561,6 +590,7 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.1) lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) @@ -582,13 +612,14 @@ GEM mixlib-cli (~> 2.1, >= 2.1.1) mixlib-config (>= 2.2.1, < 4) mixlib-shellout - method_source (1.0.0) - mime-types (3.5.2) + method_source (1.1.0) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2024.0305) - mini_magick (4.12.0) + mime-types-data (3.2024.1001) + mini_magick (4.13.2) mini_mime (1.1.5) - minitest (5.22.3) + minitest (5.25.1) mixlib-cli (2.1.8) mixlib-config (3.0.27) tomlrb @@ -599,7 +630,7 @@ GEM multi_xml (0.6.0) net-http (0.4.1) uri - net-imap (0.4.10) + net-imap (0.4.17) date net-protocol net-pop (0.1.2) @@ -608,12 +639,12 @@ GEM timeout net-smtp (0.3.4) net-protocol - nio4r (2.7.0) - nokogiri (1.16.2-aarch64-linux) + nio4r (2.7.3) + nokogiri (1.16.7-aarch64-linux) racc (~> 1.4) - nokogiri (1.16.2-arm64-darwin) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.2-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) @@ -634,18 +665,19 @@ GEM rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.1.1) - jwt (>= 2.0) - oauth2 (~> 2.0.6) + omniauth-google-oauth2 (1.2.0) + jwt (>= 2.9) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) - omniauth-oauth (1.2.0) + omniauth-oauth2 (~> 1.8) + omniauth-oauth (1.2.1) oauth omniauth (>= 1.0, < 3) + rack (>= 1.6.2, < 4) omniauth-oauth2 (1.8.0) oauth2 (>= 1.4, < 3) omniauth (~> 2.0) - omniauth-rails_csrf_protection (1.0.1) + omniauth-rails_csrf_protection (1.0.2) actionpack (>= 4.2) omniauth (~> 2.0) omniauth-twitter (1.4.0) @@ -655,23 +687,24 @@ GEM origami (2.1.0) colorize (~> 0.7) orm_adapter (0.5.0) + ostruct (0.6.0) paper_trail (12.3.0) activerecord (>= 5.2) request_store (~> 1.1) - parallel (1.24.0) - parallel_tests (4.5.2) + parallel (1.26.3) + parallel_tests (4.7.2) parallel - parser (3.3.0.5) + parser (3.3.5.0) ast (~> 2.4.1) racc pg (1.4.6) - pg_search (2.3.6) - activerecord (>= 5.2) - activesupport (>= 5.2) + pg_search (2.3.7) + activerecord (>= 6.1) + activesupport (>= 6.1) polyglot (0.3.5) - premailer (1.23.0) + premailer (1.27.0) addressable - css_parser (>= 1.12.0) + css_parser (>= 1.19.0) htmlentities (>= 4.0.0) premailer-rails (1.12.0) actionmailer (>= 3) @@ -680,14 +713,14 @@ GEM progressbar (1.13.0) psych (4.0.6) stringio - public_suffix (5.0.4) + public_suffix (6.0.1) puma (6.4.2) nio4r (~> 2.0) puma_worker_killer (0.3.1) get_process_mem (~> 0.2) puma (>= 2.7) - racc (1.7.3) - rack (2.2.8.1) + racc (1.8.1) + rack (2.2.10) rack-attack (6.7.0) rack (>= 1.0, < 4) rack-cors (1.1.1) @@ -702,20 +735,20 @@ GEM rack (>= 1.3) rack-timeout (0.6.3) rack_password (1.3) - rails (6.1.7.8) - actioncable (= 6.1.7.8) - actionmailbox (= 6.1.7.8) - actionmailer (= 6.1.7.8) - actionpack (= 6.1.7.8) - actiontext (= 6.1.7.8) - actionview (= 6.1.7.8) - activejob (= 6.1.7.8) - activemodel (= 6.1.7.8) - activerecord (= 6.1.7.8) - activestorage (= 6.1.7.8) - activesupport (= 6.1.7.8) + rails (6.1.7.9) + actioncable (= 6.1.7.9) + actionmailbox (= 6.1.7.9) + actionmailer (= 6.1.7.9) + actionpack (= 6.1.7.9) + actiontext (= 6.1.7.9) + actionview (= 6.1.7.9) + activejob (= 6.1.7.9) + activemodel (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) bundler (>= 1.15.0) - railties (= 6.1.7.8) + railties (= 6.1.7.9) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -737,32 +770,34 @@ GEM rails_autoscale_agent (0.12.0) rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (6.1.7.8) - actionpack (= 6.1.7.8) - activesupport (= 6.1.7.8) + railties (6.1.7.9) + actionpack (= 6.1.7.9) + activesupport (= 6.1.7.9) method_source rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) ransack (3.2.1) activerecord (>= 6.1.5) activesupport (>= 6.1.5) i18n rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) redcarpet (3.6.0) redis (4.8.1) redis-client (0.21.0) connection_pool - regexp_parser (2.9.0) + regexp_parser (2.9.2) + reline (0.5.10) + io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.6) + rexml (3.3.8) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -781,14 +816,14 @@ GEM rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.1) + rspec-rails (6.1.5) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) - rspec-core (~> 3.12) - rspec-expectations (~> 3.12) - rspec-mocks (~> 3.12) - rspec-support (~> 3.12) + 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.13.1) @@ -804,28 +839,26 @@ GEM rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.2) - parser (>= 3.3.0.4) - rubocop-capybara (2.20.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.25.1) + rubocop-ast (1.32.3) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) rubocop (~> 1.41) rubocop-faker (1.1.0) faker (>= 2.12.0) rubocop (>= 0.82.0) - rubocop-rails (2.24.0) + rubocop-rails (2.25.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (2.27.1) - rubocop (~> 1.40) + rubocop-rspec (2.20.0) + rubocop (~> 1.33) rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) - ruby-vips (2.2.1) + ruby-vips (2.2.2) ffi (~> 1.12) - rubyXL (3.4.25) + logger + rubyXL (3.4.27) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) @@ -838,8 +871,9 @@ GEM ffi (~> 1.9) scout_apm (5.3.7) parser - selenium-webdriver (4.18.1) + selenium-webdriver (4.25.0) base64 (~> 0.2) + logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -882,31 +916,31 @@ GEM sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) ssrf_filter (1.1.2) stackprof (0.2.26) statsd-ruby (1.5.0) - stringio (3.1.0) + stringio (3.1.1) temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - thor (1.3.1) - tilt (2.3.0) + thor (1.3.2) + tilt (2.4.0) timeout (0.4.1) tomlrb (2.0.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) uniform_notifier (1.16.0) - uri (0.13.0) + uri (0.13.1) valid_email2 (4.0.6) activemodel (>= 3.2) mail (~> 2.5) - version_gem (1.1.3) + version_gem (1.1.4) w3c_rspec_validators (0.3.0) rails rspec @@ -925,11 +959,11 @@ GEM web-push (3.0.1) jwt (~> 2.0) openssl (~> 3.0) - webmock (3.23.0) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket (1.2.10) + websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -940,7 +974,7 @@ GEM wkhtmltopdf-binary (0.12.6.6) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.13) + zeitwerk (2.6.18) PLATFORMS aarch64-linux @@ -956,17 +990,19 @@ DEPENDENCIES codecov dalli database_cleaner - decidim (= 0.28.3) + decidim! decidim-census_sms! decidim-dataviz! decidim-decidim_awesome! - decidim-dev (= 0.28.3) + decidim-dev (= 0.28.4) decidim-ephemeral_participation! - decidim-initiatives (= 0.28.3) + decidim-initiatives (= 0.28.4) + decidim-internal_evaluation! decidim-kids! decidim-navigation_maps! - decidim-sortitions (= 0.28.3) + decidim-sortitions (= 0.28.4) decidim-stats! + decidim-templates (= 0.28.4) decidim-term_customizer! decidim-valid_auth! dotenv-rails diff --git a/app/views/static/api/docs/object/proposal/index.html b/app/views/static/api/docs/object/proposal/index.html index 185c6c11b..bfab716f0 100644 --- a/app/views/static/api/docs/object/proposal/index.html +++ b/app/views/static/api/docs/object/proposal/index.html @@ -107,6 +107,18 @@

If the proposal comes from a meeting, the related meeting

+
+ withdrawnAt (DateTime) +
+

The date and time this proposal was withdrawn

+
+
+
+ withdrawn (Boolean) +
+

Whether this proposal has been withdrawn or not

+
+
voteCount (Int)
diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 0d0eaa798..e5ae8e13e 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -154,6 +154,44 @@ ca: postal_code: Codi postal time_and_date: Data i hora timestamp: Segell + filters: + proposals: + evaluated_by_user: + label: Avaluació + values: + "false": No avaluat + "true": Avaluat + internal_evaluation: + admin: + internal_evaluations: + create: + error: "Hi ha hagut un problema en crear l'avaluació interna: %{message}" + success: Avaluació interna creada correctament. + form: + save: Desar + status: Estat + title: Avaluació per a %{title} + index: + actions: Accions + counter: "%{count} de %{total} avaluacions" + edit_evaluation: Edita l'avaluació + evaluation: Avaluació + status: Estat + title: Avaluacions internes + updated: Actualitzat + update: + error: "Hi ha hagut un problema en actualitzar l'avaluació interna: %{message}" + success: Avaluació interna actualitzada correctament. + valuation_assignments_evaluations: + edit_evaluation: Edita l'avaluació + proposals: + admin: + exports: + internal_evaluations: Avaluacions internes + models: + proposal: + fields: + valuators: Estat de l'avaluació authorization_handlers: census16_authorization_handler: explanation: Verifica't amb el padró diff --git a/config/locales/es.yml b/config/locales/es.yml index 9754fc782..eee379b22 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -154,6 +154,44 @@ es: postal_code: Código postal time_and_date: Fecha y hora timestamp: Sello + filters: + proposals: + evaluated_by_user: + label: Evaluación + values: + "false": No evaluado + "true": Evaluado + internal_evaluation: + admin: + internal_evaluations: + create: + error: "Hubo un problema al crear la evaluación interna: %{message}" + success: Evaluación interna creada correctamente. + form: + save: Guardar + status: Estado + title: Evaluación para %{title} + index: + actions: Acciones + counter: "%{count} de %{total} evaluaciones" + edit_evaluation: Editar evaluación + evaluation: Evaluación + status: Estado + title: Evaluaciones internas + updated: Actualizado + update: + error: "Hubo un problema al actualizar la evaluación interna: %{message}" + success: Evaluación interna actualizada correctamente. + valuation_assignments_evaluations: + edit_evaluation: Editar evaluación + proposals: + admin: + exports: + internal_evaluations: Evaluaciones internas + models: + proposal: + fields: + valuators: Estado de la evaluación authorization_handlers: census16_authorization_handler: explanation: Verifícate con el padrón diff --git a/db/migrate/20241014151251_add_withdrawn_at_field_to_proposals.decidim_proposals.rb b/db/migrate/20241014151251_add_withdrawn_at_field_to_proposals.decidim_proposals.rb new file mode 100644 index 000000000..53d023700 --- /dev/null +++ b/db/migrate/20241014151251_add_withdrawn_at_field_to_proposals.decidim_proposals.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20240110203500) + +class AddWithdrawnAtFieldToProposals < ActiveRecord::Migration[6.1] + class CustomProposal < Decidim::Proposals::ApplicationRecord + self.table_name = "decidim_proposals_proposals" + STATES = { not_answered: 0, evaluating: 10, accepted: 20, rejected: -10, withdrawn: -20 }.freeze + enum state: STATES, _default: "not_answered" + end + + def up + add_column :decidim_proposals_proposals, :withdrawn_at, :datetime + + CustomProposal.withdrawn.find_each do |proposal| + proposal.withdrawn_at = proposal.updated_at + proposal.save! + end + end + + def down + CustomProposal.where.not(withdrawn_at: null).find_each do |proposal| + proposal.state = :withdrawn + proposal.save! + end + + remove_column :decidim_proposals_proposals, :withdrawn_at + end +end diff --git a/db/migrate/20241014151252_create_decidim_proposals_proposal_state.decidim_proposals.rb b/db/migrate/20241014151252_create_decidim_proposals_proposal_state.decidim_proposals.rb new file mode 100644 index 000000000..8721f6935 --- /dev/null +++ b/db/migrate/20241014151252_create_decidim_proposals_proposal_state.decidim_proposals.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20240110203501) + +class CreateDecidimProposalsProposalState < ActiveRecord::Migration[6.1] + def change + create_table :decidim_proposals_proposal_states do |t| + t.jsonb :title + t.jsonb :announcement_title + t.string :token, null: false + t.references :decidim_component, index: true, null: false + t.integer :proposals_count, default: 0, null: false + t.string :bg_color, default: "#F6F8FA", null: false + t.string :text_color, default: "#4B5058", null: false + end + end +end diff --git a/db/migrate/20241014151253_add_state_id_to_decidim_proposals_proposals.decidim_proposals.rb b/db/migrate/20241014151253_add_state_id_to_decidim_proposals_proposals.decidim_proposals.rb new file mode 100644 index 000000000..c1bc21c6a --- /dev/null +++ b/db/migrate/20241014151253_add_state_id_to_decidim_proposals_proposals.decidim_proposals.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20240110203502) + +class AddStateIdToDecidimProposalsProposals < ActiveRecord::Migration[6.1] + def up + add_column :decidim_proposals_proposals, :decidim_proposals_proposal_state_id, :integer, index: true + add_foreign_key :decidim_proposals_proposals, :decidim_proposals_proposal_states, column: :decidim_proposals_proposal_state_id + end + + def down + remove_foreign_key :decidim_proposals_proposals, column: :decidim_proposals_proposal_state_id + remove_column :decidim_proposals_proposals, :decidim_proposals_proposal_state_id + end +end diff --git a/db/migrate/20241014151254_remove_state_from_decidim_proposals_proposals.decidim_proposals.rb b/db/migrate/20241014151254_remove_state_from_decidim_proposals_proposals.decidim_proposals.rb new file mode 100644 index 000000000..0503308e3 --- /dev/null +++ b/db/migrate/20241014151254_remove_state_from_decidim_proposals_proposals.decidim_proposals.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20240110203503) + +class RemoveStateFromDecidimProposalsProposals < ActiveRecord::Migration[6.1] + def up + rename_column :decidim_proposals_proposals, :state, :old_state + end + + def down + rename_column :decidim_proposals_proposals, :old_state, :state + end +end diff --git a/db/migrate/20241014151255_create_default_proposal_states.decidim_proposals.rb b/db/migrate/20241014151255_create_default_proposal_states.decidim_proposals.rb new file mode 100644 index 000000000..f7b802dd9 --- /dev/null +++ b/db/migrate/20241014151255_create_default_proposal_states.decidim_proposals.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20240110203504) + +class CreateDefaultProposalStates < ActiveRecord::Migration[6.1] + class CustomProposal < ApplicationRecord + belongs_to :proposal_state, + class_name: "Decidim::Proposals::ProposalState", + foreign_key: "decidim_proposals_proposal_state_id", + inverse_of: :proposals, + optional: true + + self.table_name = :decidim_proposals_proposals + STATES = { not_answered: 0, evaluating: 10, accepted: 20, rejected: -10 }.freeze + enum old_state: STATES, _default: "not_answered" + end + + def up + CustomProposal.reset_column_information + Decidim::Proposals::ProposalState.reset_column_information + Decidim::Component.where(manifest_name: "proposals").find_each do |component| + admin_user = component.organization.admins.first + Decidim::Proposals.create_default_states!(component, admin_user) + + CustomProposal.where(decidim_component_id: component.id).find_each do |proposal| + next if proposal.old_state == "not_answered" + next if proposal.old_state.nil? + + token = I18n.t("decidim.proposals.answers.#{proposal.old_state}").downcase.tr(" ", "_").tr("ó", "o") + proposal.update!(proposal_state: Decidim::Proposals::ProposalState.where(component:, token:).first!) + end + end + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20241014151256_change_color_fields_on_proposals_states.decidim_proposals.rb b/db/migrate/20241014151256_change_color_fields_on_proposals_states.decidim_proposals.rb new file mode 100644 index 000000000..b35233688 --- /dev/null +++ b/db/migrate/20241014151256_change_color_fields_on_proposals_states.decidim_proposals.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20240209092404) + +class ChangeColorFieldsOnProposalsStates < ActiveRecord::Migration[6.1] + class ProposalState < ApplicationRecord + self.table_name = :decidim_proposals_proposal_states + + def self.colors + { + gray: { + background: "#F6F8FA", + foreground: "#4B5058" + }, + green: { + background: "#E3FCE9", + foreground: "#15602C" + }, + orange: { + background: "#FFF1E5", + foreground: "#BC4C00" + }, + red: { + background: "#FFEBE9", + foreground: "#D1242F" + } + } + end + end + + def up + colors = ProposalState.colors + + # rubocop:disable Rails/SkipsModelValidations + ProposalState.where(token: :accepted).update_all( + bg_color: colors[:green][:background], text_color: colors[:green][:foreground] + ) + ProposalState.where(token: :evaluating).update_all( + bg_color: colors[:orange][:background], text_color: colors[:orange][:foreground] + ) + ProposalState.where(token: :rejected).update_all( + bg_color: colors[:red][:background], text_color: colors[:red][:foreground] + ) + # rubocop:enable Rails/SkipsModelValidations + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20241015093724_create_decidim_internal_evaluation_internal_evaluations.decidim_internal_evaluation.rb b/db/migrate/20241015093724_create_decidim_internal_evaluation_internal_evaluations.decidim_internal_evaluation.rb new file mode 100644 index 000000000..f4f05ef2e --- /dev/null +++ b/db/migrate/20241015093724_create_decidim_internal_evaluation_internal_evaluations.decidim_internal_evaluation.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true +# This migration comes from decidim_internal_evaluation (originally 20240625151452) + +class CreateDecidimInternalEvaluationInternalEvaluations < ActiveRecord::Migration[6.1] + def change + create_table :decidim_internal_evaluation_internal_evaluations do |t| + t.references :decidim_proposal, null: false, index: { name: "index_decidim_internal_evaluations_on_proposal" } + t.references :decidim_proposal_state, index: { name: "index_decidim_internal_evaluations_on_proposal_state" } + t.references :decidim_author, null: false, index: { name: "index_decidim_internal_evaluations_on_author" } + t.jsonb :body + + t.timestamps + end + end +end diff --git a/db/migrate/20241015093725_change_internal_evaluations_body_to_text.decidim_internal_evaluation.rb b/db/migrate/20241015093725_change_internal_evaluations_body_to_text.decidim_internal_evaluation.rb new file mode 100644 index 000000000..ae4e35795 --- /dev/null +++ b/db/migrate/20241015093725_change_internal_evaluations_body_to_text.decidim_internal_evaluation.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +# This migration comes from decidim_internal_evaluation (originally 20240715150021) + +class ChangeInternalEvaluationsBodyToText < ActiveRecord::Migration[6.1] + def up + change_column :decidim_internal_evaluation_internal_evaluations, :body, :text + end + + def down + change_column :decidim_internal_evaluation_internal_evaluations, :body, :jsonb + end +end diff --git a/db/schema.rb b/db/schema.rb index 463b5dce8..86d8e8a7e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_08_13_060359) do +ActiveRecord::Schema.define(version: 2024_10_15_093725) do # These are extensions that must be enabled in order to support this database enable_extension "ltree" @@ -848,6 +848,18 @@ t.index ["hash_id"], name: "index_decidim_initiatives_votes_on_hash_id" end + create_table "decidim_internal_evaluation_internal_evaluations", force: :cascade do |t| + t.bigint "decidim_proposal_id", null: false + t.bigint "decidim_proposal_state_id" + t.bigint "decidim_author_id", null: false + t.text "body" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["decidim_author_id"], name: "index_decidim_internal_evaluations_on_author" + t.index ["decidim_proposal_id"], name: "index_decidim_internal_evaluations_on_proposal" + t.index ["decidim_proposal_state_id"], name: "index_decidim_internal_evaluations_on_proposal_state" + end + create_table "decidim_kids_impersonation_minor_logs", force: :cascade do |t| t.bigint "decidim_tutor_id" t.bigint "decidim_minor_id" @@ -1446,6 +1458,17 @@ t.index ["decidim_proposal_id"], name: "decidim_proposals_proposal_note_proposal" end + create_table "decidim_proposals_proposal_states", force: :cascade do |t| + t.jsonb "title" + t.jsonb "announcement_title" + t.string "token", null: false + t.bigint "decidim_component_id", null: false + t.integer "proposals_count", default: 0, null: false + t.string "bg_color", default: "#F6F8FA", null: false + t.string "text_color", default: "#4B5058", null: false + t.index ["decidim_component_id"], name: "index_decidim_proposals_proposal_states_on_decidim_component_id" + end + create_table "decidim_proposals_proposal_votes", id: :serial, force: :cascade do |t| t.integer "decidim_proposal_id", null: false t.integer "decidim_author_id", null: false @@ -1485,8 +1508,10 @@ t.jsonb "title" t.jsonb "body" t.integer "follows_count", default: 0, null: false - t.integer "state", default: 0, null: false + t.integer "old_state", default: 0, null: false t.integer "valuation_assignments_count", default: 0 + t.datetime "withdrawn_at" + t.integer "decidim_proposals_proposal_state_id" t.index "md5((body)::text)", name: "decidim_proposals_proposal_body_search" t.index "md5((title)::text)", name: "decidim_proposals_proposal_title_search" t.index ["created_at"], name: "index_decidim_proposals_proposals_on_created_at" @@ -1986,6 +2011,7 @@ add_foreign_key "decidim_participatory_processes", "decidim_organizations" add_foreign_key "decidim_participatory_processes", "decidim_participatory_process_types" add_foreign_key "decidim_participatory_processes", "decidim_scope_types" + add_foreign_key "decidim_proposals_proposals", "decidim_proposals_proposal_states" add_foreign_key "decidim_reminder_deliveries", "decidim_reminders" add_foreign_key "decidim_reminder_records", "decidim_reminders" add_foreign_key "decidim_reminders", "decidim_components" diff --git a/decidim-ephemeral_participation/lib/tasks/purge_unused_verifications.rake b/decidim-ephemeral_participation/lib/tasks/purge_unused_verifications.rake index 8c0c3385a..348de453f 100644 --- a/decidim-ephemeral_participation/lib/tasks/purge_unused_verifications.rake +++ b/decidim-ephemeral_participation/lib/tasks/purge_unused_verifications.rake @@ -19,7 +19,7 @@ namespace :decidim do end def lost_ephemeral_users - Decidim::User.ephemeral_participant.where("updated_at < ?", 12.hours.ago).where("id NOT IN (SELECT decidim_user_id FROM decidim_budgets_orders)") + Decidim::User.ephemeral_participant.where(updated_at: ...12.hours.ago).where("id NOT IN (SELECT decidim_user_id FROM decidim_budgets_orders)") end def conflicts_for(user)