diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index d6a768b152..334193224e 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -19,10 +19,10 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get -yqq install libpq-dev postgresql-client
- - name: Set up Ruby 2.7
+ - name: Set up Ruby 3.0.6
uses: ruby/setup-ruby@v1
with:
- ruby-version: 2.7
+ ruby-version: 3.0.6
bundler-cache: true
- name: Lint by RuboCop
run: |
diff --git a/.github/workflows/rails-test.yml b/.github/workflows/rails-test.yml
index 041358e74e..2c4a5ce274 100644
--- a/.github/workflows/rails-test.yml
+++ b/.github/workflows/rails-test.yml
@@ -54,20 +54,20 @@ jobs:
which convert
convert -version
- - name: Set up Ruby 2.7
+ - name: Set up Ruby 3.0.6
uses: ruby/setup-ruby@v1
with:
- ruby-version: 2.7
+ ruby-version: 3.0.6
bundler-cache: true
- name: setup Node
uses: actions/setup-node@v3
with:
- node-version: 16.9.1
+ node-version: 16.13.0
cache: 'yarn'
- name: install yarn
run: |
- npm i -g yarn@1.22.5
+ npm i -g yarn@1.22.15
yarn install --frozen-lockfile
- name: create assets precompile cache key
diff --git a/.gitignore b/.gitignore
index 5de35d5017..9329e29983 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,3 +52,6 @@ pgadmin
/yarn-error.log
yarn-debug.log*
.yarn-integrity
+public/sw.js
+public/sw.js.map
+app/views/static/api/*
diff --git a/.rubocop_rails.yml b/.rubocop_rails.yml
index 1d1371e800..03ed9bb139 100644
--- a/.rubocop_rails.yml
+++ b/.rubocop_rails.yml
@@ -91,3 +91,9 @@ Rails/SkipsModelValidations:
Rails/Validation:
Include:
- decidim-*/app/models/**/*.rb
+
+Rails/I18nLocaleAssignment:
+ Enabled: false
+
+Lint/EmptyBlock:
+ Enabled: false
diff --git a/.rubocop_ruby.yml b/.rubocop_ruby.yml
index 72438d4f83..c913a76768 100644
--- a/.rubocop_ruby.yml
+++ b/.rubocop_ruby.yml
@@ -19,6 +19,8 @@ AllCops:
- "node_modules/**/*"
- "bin/setup"
- "bin/update"
+ - "bin/webpack"
+ - "bin/webpack-dev-server"
- "db/migrate/*"
- "db/schema.rb"
- "decidim-comments/**/*"
@@ -73,7 +75,7 @@ AllCops:
# 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.7
+ TargetRubyVersion: 3.0.6
RSpec:
Patterns:
diff --git a/.ruby-version b/.ruby-version
index 74500cee16..818bd47abf 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.7.4
\ No newline at end of file
+3.0.6
diff --git a/Dockerfile b/Dockerfile
index f41f8ec3d7..87c1c8ab96 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,22 +1,38 @@
-FROM node:16.9.1-alpine as node
-
-FROM ruby:2.7.4-alpine
-
-RUN apk update \
- && apk add --no-cache --virtual build-dependencies \
- build-base \
- curl-dev \
+FROM node:16.13.0-bullseye-slim as node
+
+FROM ruby:3.0.6-slim-bullseye
+
+# for build-dep
+RUN echo "deb-src http://deb.debian.org/debian bullseye main" >> /etc/apt/sources.list
+RUN echo "deb-src http://deb.debian.org/debian-security bullseye-security main" >> /etc/apt/sources.list
+RUN echo "deb-src http://deb.debian.org/debian bullseye-updates main" >> /etc/apt/sources.list
+
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends \
+ build-essential \
+ libpq-dev \
+ postgresql-client \
+ libicu-dev \
+ libwebp-dev \
+ libopenjp2-7-dev \
+ librsvg2-dev \
+ libde265-dev \
git \
- && apk add --no-cache \
- imagemagick \
- postgresql-dev \
- tzdata \
- zip \
curl \
- gcompat\
- && cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
+ wget && \
+ apt-get clean && \
+ apt-get autoremove
+
+RUN apt build-dep -y imagemagick && \
+ wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-15.tar.gz && \
+ tar xf 7.1.1-15.tar.gz && \
+ cd ImageMagick-7* && \
+ ./configure && \
+ make && \
+ make install && \
+ ldconfig
-ENV YARN_VERSION=v1.22.5
+ENV YARN_VERSION=v1.22.15
# node install
COPY --from=node /usr/local/bin/node /usr/local/bin/node
@@ -32,7 +48,7 @@ ARG RAILS_ENV="production"
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
BUNDLER_JOBS=4 \
- BUNDLER_VERSION=2.2.18 \
+ BUNDLER_VERSION=2.2.33 \
APP_HOME=/app \
RAILS_ENV=${RAILS_ENV} \
RAILS_LOG_TO_STDOUT=true \
@@ -53,7 +69,6 @@ RUN gem install bundler:${BUNDLER_VERSION} \
&& bundle config --global jobs ${BUNDLER_JOBS} \
&& if [ "${RAILS_ENV}" = "production" ];then \
bundle install --without development test \
- && apk del --purge build-dependencies \
;else \
bundle install \
;fi
diff --git a/Gemfile b/Gemfile
index a8704f9b55..54a8df2d0e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,24 +4,24 @@ source "https://rubygems.org"
ruby RUBY_VERSION
-gem "decidim", "0.26.5"
+gem "decidim", "0.27.4"
gem "decidim-comments", path: "decidim-comments"
-gem "decidim-decidim_awesome", git: "https://github.com/codeforjapan/decidim-module-decidim_awesome.git", branch: "v0.9.0-2023-03-30"
+gem "decidim-decidim_awesome", git: "https://github.com/codeforjapan/decidim-module-decidim_awesome.git", branch: "v0.9.3-2023-08-31"
-gem "decidim-term_customizer", git: "https://github.com/codeforjapan/decidim-module-term_customizer.git", branch: "026-ja"
+gem "decidim-term_customizer", git: "https://github.com/codeforjapan/decidim-module-term_customizer.git", branch: "027-ja"
-gem "decidim-polis", git: "https://github.com/takahashim/decidim-polis.git", branch: "update-0-26-5"
+gem "decidim-polis", git: "https://github.com/codeforjapan/decidim-polis.git", branch: "update-0-27-4"
gem "bootsnap"
-gem "puma", ">= 5.0.0"
+gem "puma", ">= 5.6.2"
gem "puma_worker_killer"
gem "uglifier", "~> 4.1"
-gem "faker", "~> 2.14"
+gem "faker", "~> 3.2"
gem "wicked_pdf", "~> 2.1"
@@ -40,26 +40,26 @@ group :development, :test do
gem "byebug", "~> 11.0", platform: :mri
gem "figaro"
- gem "decidim-dev", "0.26.5"
+ gem "decidim-dev", "0.27.4"
gem "dotenv-rails"
gem "factory_bot_rails"
gem "rspec-rails"
end
group :development do
- gem "letter_opener_web", "~> 1.3"
+ gem "letter_opener_web", "~> 2.0"
gem "listen", "~> 3.1"
gem "rubocop-faker"
gem "spring", "~> 2.0"
gem "spring-watcher-listen", "~> 2.0"
- gem "web-console", "~> 3.5"
+ gem "web-console", "~> 4.2"
end
group :production do
gem "aws-sdk-s3", require: false
- gem "aws-xray-sdk", require: ["aws-xray-sdk/facets/rails/railtie"]
+ # gem "aws-xray-sdk", require: ["aws-xray-sdk/facets/rails/railtie"]
gem "fog-aws"
- gem "oj", platform: :mri
+ # gem "oj", platform: :mri
gem "sidekiq", "6.4.2"
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 2aa4d6e893..b5876f389e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,41 +1,41 @@
GIT
remote: https://github.com/codeforjapan/decidim-module-decidim_awesome.git
- revision: ca8785be4ed648878e9c6208512fc81cf1a042ec
- branch: v0.9.0-2023-03-30
+ revision: 30f39e79c65c6de3e9c569d8233e586113bff020
+ branch: v0.9.3-2023-08-31
specs:
- decidim-decidim_awesome (0.9.1)
+ decidim-decidim_awesome (0.9.3)
decidim-admin (>= 0.26.0, < 0.28)
decidim-core (>= 0.26.0, < 0.28)
sassc (~> 2.3)
GIT
remote: https://github.com/codeforjapan/decidim-module-term_customizer.git
- revision: e865c58b790fed27c1653a243303216d2e8955b8
- branch: 026-ja
+ revision: b54c2f2daeab5b371717f706515982629b3cd0dd
+ branch: 027-ja
specs:
- decidim-term_customizer (0.26.0)
- decidim-admin (~> 0.26.0)
- decidim-core (~> 0.26.0)
+ decidim-term_customizer (0.27.0)
+ decidim-admin (~> 0.27.0)
+ decidim-core (~> 0.27.0)
GIT
- remote: https://github.com/takahashim/decidim-polis.git
- revision: af644a8004555134370fc56bb510d78ab76c8c12
- branch: update-0-26-5
+ remote: https://github.com/codeforjapan/decidim-polis.git
+ revision: 381361dca6919d71fb76c2d0244afb78a2c3bd7d
+ branch: update-0-27-4
specs:
- decidim-polis (0.26.5)
- decidim-core (= 0.26.5)
+ decidim-polis (0.27.4)
+ decidim-core (= 0.27.4)
PATH
remote: decidim-comments
specs:
- decidim-comments (0.26.5)
- decidim-core (= 0.26.5)
+ decidim-comments (0.27.4)
+ decidim-core (= 0.27.4)
redcarpet (~> 3.5, >= 3.5.1)
PATH
remote: decidim-user_extension
specs:
- decidim-user_extension (0.3.0)
+ decidim-user_extension (0.4.0)
decidim-admin
decidim-core
rails
@@ -49,38 +49,40 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actioncable (6.0.6.1)
- actionpack (= 6.0.6.1)
+ actioncable (6.1.7.4)
+ actionpack (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (6.0.6.1)
- actionpack (= 6.0.6.1)
- activejob (= 6.0.6.1)
- activerecord (= 6.0.6.1)
- activestorage (= 6.0.6.1)
- activesupport (= 6.0.6.1)
+ actionmailbox (6.1.7.4)
+ actionpack (= 6.1.7.4)
+ activejob (= 6.1.7.4)
+ activerecord (= 6.1.7.4)
+ activestorage (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
mail (>= 2.7.1)
- actionmailer (6.0.6.1)
- actionpack (= 6.0.6.1)
- actionview (= 6.0.6.1)
- activejob (= 6.0.6.1)
+ actionmailer (6.1.7.4)
+ actionpack (= 6.1.7.4)
+ actionview (= 6.1.7.4)
+ activejob (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (6.0.6.1)
- actionview (= 6.0.6.1)
- activesupport (= 6.0.6.1)
- rack (~> 2.0, >= 2.0.8)
+ actionpack (6.1.7.4)
+ actionview (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
+ 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.0.6.1)
- actionpack (= 6.0.6.1)
- activerecord (= 6.0.6.1)
- activestorage (= 6.0.6.1)
- activesupport (= 6.0.6.1)
+ actiontext (6.1.7.4)
+ actionpack (= 6.1.7.4)
+ activerecord (= 6.1.7.4)
+ activestorage (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
nokogiri (>= 1.8.5)
- actionview (6.0.6.1)
- activesupport (= 6.0.6.1)
+ actionview (6.1.7.4)
+ activesupport (= 6.1.7.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
@@ -88,53 +90,49 @@ GEM
active_link_to (1.0.5)
actionpack
addressable
- activejob (6.0.6.1)
- activesupport (= 6.0.6.1)
+ activejob (6.1.7.4)
+ activesupport (= 6.1.7.4)
globalid (>= 0.3.6)
- activemodel (6.0.6.1)
- activesupport (= 6.0.6.1)
- activerecord (6.0.6.1)
- activemodel (= 6.0.6.1)
- activesupport (= 6.0.6.1)
- activestorage (6.0.6.1)
- actionpack (= 6.0.6.1)
- activejob (= 6.0.6.1)
- activerecord (= 6.0.6.1)
+ activemodel (6.1.7.4)
+ activesupport (= 6.1.7.4)
+ activerecord (6.1.7.4)
+ activemodel (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
+ activestorage (6.1.7.4)
+ actionpack (= 6.1.7.4)
+ activejob (= 6.1.7.4)
+ activerecord (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
marcel (~> 1.0)
- activesupport (6.0.6.1)
+ mini_mime (>= 1.1.0)
+ activesupport (6.1.7.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
- i18n (>= 0.7, < 2)
- minitest (~> 5.1)
- tzinfo (~> 1.1)
- zeitwerk (~> 2.2, >= 2.2.2)
+ i18n (>= 1.6, < 2)
+ minitest (>= 5.1)
+ tzinfo (~> 2.0)
+ zeitwerk (~> 2.3)
acts_as_list (0.9.19)
activerecord (>= 3.0)
- addressable (2.8.4)
+ addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
aws-eventstream (1.2.0)
- aws-partitions (1.602.0)
- aws-sdk-core (3.131.2)
+ aws-partitions (1.787.0)
+ aws-sdk-core (3.178.0)
aws-eventstream (~> 1, >= 1.0.2)
- aws-partitions (~> 1, >= 1.525.0)
- aws-sigv4 (~> 1.1)
+ aws-partitions (~> 1, >= 1.651.0)
+ aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
- aws-sdk-kms (1.57.0)
- aws-sdk-core (~> 3, >= 3.127.0)
+ aws-sdk-kms (1.71.0)
+ aws-sdk-core (~> 3, >= 3.177.0)
aws-sigv4 (~> 1.1)
- aws-sdk-s3 (1.114.0)
- aws-sdk-core (~> 3, >= 3.127.0)
+ aws-sdk-s3 (1.130.0)
+ aws-sdk-core (~> 3, >= 3.177.0)
aws-sdk-kms (~> 1)
- aws-sigv4 (~> 1.4)
- aws-sdk-xray (1.4.0)
- aws-sdk-core (~> 3)
- aws-sigv4 (~> 1.0)
- aws-sigv4 (1.5.0)
+ aws-sigv4 (~> 1.6)
+ aws-sigv4 (1.6.0)
aws-eventstream (~> 1, >= 1.0.2)
- aws-xray-sdk (0.14.0)
- aws-sdk-xray (~> 1.4.0)
- multi_json (~> 1)
- axe-core-api (4.6.0)
+ axe-core-api (4.7.0)
dumb_delegator
virtus
axe-core-rspec (4.1.0)
@@ -146,7 +144,7 @@ GEM
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
batch-loader (1.5.0)
- bcrypt (3.1.18)
+ bcrypt (3.1.19)
better_html (1.0.16)
actionview (>= 4.0)
activesupport (>= 4.0)
@@ -156,12 +154,12 @@ GEM
parser (>= 2.4)
smart_properties
bindex (0.8.1)
- bootsnap (1.11.1)
+ bootsnap (1.16.0)
msgpack (~> 1.2)
browser (2.7.1)
builder (3.2.4)
byebug (11.1.3)
- capybara (3.38.0)
+ capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
@@ -170,7 +168,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
- carrierwave (2.2.3)
+ carrierwave (2.2.4)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
addressable (~> 2.6)
@@ -190,9 +188,9 @@ GEM
actionpack (>= 5.0)
cells (>= 4.1.6, < 5.0.0)
charlock_holmes (0.7.7)
- chef-utils (18.1.29)
+ chef-utils (18.2.7)
concurrent-ruby
- childprocess (3.0.0)
+ childprocess (4.1.0)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
coffee-rails (5.0.0)
@@ -202,64 +200,65 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
+ commonmarker (0.23.10)
concurrent-ruby (1.2.2)
- connection_pool (2.2.5)
+ connection_pool (2.4.1)
crack (0.4.5)
rexml
crass (1.0.6)
css_parser (1.14.0)
addressable
date (3.3.3)
- date_validator (0.9.0)
- activemodel
- activesupport
+ date_validator (0.12.0)
+ activemodel (>= 3)
+ activesupport (>= 3)
db-query-matchers (0.10.0)
activesupport (>= 4.0, < 7)
rspec (~> 3.0)
- decidim (0.26.5)
- decidim-accountability (= 0.26.5)
- decidim-admin (= 0.26.5)
- decidim-api (= 0.26.5)
- decidim-assemblies (= 0.26.5)
- decidim-blogs (= 0.26.5)
- decidim-budgets (= 0.26.5)
- decidim-comments (= 0.26.5)
- decidim-core (= 0.26.5)
- decidim-debates (= 0.26.5)
- decidim-forms (= 0.26.5)
- decidim-generators (= 0.26.5)
- decidim-meetings (= 0.26.5)
- decidim-pages (= 0.26.5)
- decidim-participatory_processes (= 0.26.5)
- decidim-proposals (= 0.26.5)
- decidim-sortitions (= 0.26.5)
- decidim-surveys (= 0.26.5)
- decidim-system (= 0.26.5)
- decidim-templates (= 0.26.5)
- decidim-verifications (= 0.26.5)
- decidim-accountability (0.26.5)
- decidim-comments (= 0.26.5)
- decidim-core (= 0.26.5)
- decidim-admin (0.26.5)
+ decidim (0.27.4)
+ decidim-accountability (= 0.27.4)
+ decidim-admin (= 0.27.4)
+ decidim-api (= 0.27.4)
+ decidim-assemblies (= 0.27.4)
+ decidim-blogs (= 0.27.4)
+ decidim-budgets (= 0.27.4)
+ decidim-comments (= 0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-debates (= 0.27.4)
+ decidim-forms (= 0.27.4)
+ decidim-generators (= 0.27.4)
+ decidim-meetings (= 0.27.4)
+ decidim-pages (= 0.27.4)
+ decidim-participatory_processes (= 0.27.4)
+ decidim-proposals (= 0.27.4)
+ decidim-sortitions (= 0.27.4)
+ decidim-surveys (= 0.27.4)
+ decidim-system (= 0.27.4)
+ decidim-templates (= 0.27.4)
+ decidim-verifications (= 0.27.4)
+ decidim-accountability (0.27.4)
+ decidim-comments (= 0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-admin (0.27.4)
active_link_to (~> 1.0)
- decidim-core (= 0.26.5)
+ decidim-core (= 0.27.4)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0)
- decidim-api (0.26.5)
+ decidim-api (0.27.4)
graphql (~> 1.12, < 1.13)
+ graphql-docs (~> 2.1.0)
rack-cors (~> 1.0)
- redcarpet (~> 3.5, >= 3.5.1)
- decidim-assemblies (0.26.5)
- decidim-core (= 0.26.5)
- decidim-blogs (0.26.5)
- decidim-admin (= 0.26.5)
- decidim-comments (= 0.26.5)
- decidim-core (= 0.26.5)
- decidim-budgets (0.26.5)
- decidim-comments (= 0.26.5)
- decidim-core (= 0.26.5)
- decidim-core (0.26.5)
+ decidim-assemblies (0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-blogs (0.27.4)
+ decidim-admin (= 0.27.4)
+ decidim-comments (= 0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-budgets (0.27.4)
+ decidim-comments (= 0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-core (0.27.4)
active_link_to (~> 1.0)
acts_as_list (~> 0.9)
batch-loader (~> 1.2)
@@ -268,21 +267,21 @@ GEM
cells-erb (~> 0.1.0)
cells-rails (~> 0.1.3)
charlock_holmes (~> 0.7)
- date_validator (~> 0.9.0)
- decidim-api (= 0.26.5)
+ date_validator (~> 0.12.0)
+ decidim-api (= 0.27.4)
devise (~> 4.7)
devise-i18n (~> 1.2)
diffy (~> 3.3)
doorkeeper (~> 5.1)
doorkeeper-i18n (~> 4.0)
- file_validators (~> 2.1)
+ file_validators (~> 3.0)
fog-local (~> 0.6)
- foundation_rails_helper
- geocoder (~> 1.7.5)
+ 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.3.1)
+ loofah (~> 2.19.0)
mime-types (>= 1.16, < 4.0)
mini_magick (~> 4.9)
mustache (~> 1.1.0)
@@ -297,90 +296,89 @@ GEM
premailer-rails (~> 1.10)
rack (~> 2.2, >= 2.2.3)
rack-attack (~> 6.0)
- rails (~> 6.0.4)
+ rails (~> 6.1.0)
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)
valid_email2 (~> 2.1)
webpacker (= 6.0.0.rc.5)
+ webpush (~> 1.1)
wisper (~> 2.0)
- decidim-debates (0.26.5)
- decidim-comments (= 0.26.5)
- decidim-core (= 0.26.5)
- decidim-dev (0.26.5)
+ decidim-debates (0.27.4)
+ decidim-comments (= 0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-dev (0.27.4)
axe-core-rspec (~> 4.1.0)
byebug (~> 11.0)
capybara (~> 3.24)
db-query-matchers (~> 0.10.0)
- decidim (= 0.26.5)
+ decidim (= 0.27.4)
erb_lint (~> 0.0.35)
factory_bot_rails (~> 4.8)
i18n-tasks (~> 0.9.18)
mdl (~> 0.5)
- nokogiri (~> 1.12)
+ nokogiri (~> 1.13)
+ parallel_tests (~> 3.7)
puma (~> 5.0)
rails-controller-testing (~> 1.0)
- rspec-cells (~> 0.3.4)
+ rspec-cells (~> 0.3.7)
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)
+ rubocop (~> 1.28.0)
+ rubocop-rails (~> 2.14)
+ rubocop-rspec (~> 2.10)
+ selenium-webdriver (~> 4.1.0)
+ simplecov (~> 0.21.0)
+ simplecov-cobertura (~> 2.1.0)
w3c_rspec_validators (~> 0.3.0)
webmock (~> 3.6)
wisper-rspec (~> 1.0)
- decidim-forms (0.26.5)
- decidim-core (= 0.26.5)
+ decidim-forms (0.27.4)
+ decidim-core (= 0.27.4)
wicked_pdf (~> 2.1)
wkhtmltopdf-binary (~> 0.12)
- decidim-generators (0.26.5)
- decidim-core (= 0.26.5)
- decidim-meetings (0.26.5)
- decidim-core (= 0.26.5)
- decidim-forms (= 0.26.5)
+ decidim-generators (0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-meetings (0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-forms (= 0.27.4)
icalendar (~> 2.5)
- decidim-pages (0.26.5)
- decidim-core (= 0.26.5)
- decidim-participatory_processes (0.26.5)
- decidim-core (= 0.26.5)
- decidim-proposals (0.26.5)
- decidim-comments (= 0.26.5)
- decidim-core (= 0.26.5)
- doc2text (~> 0.4.4)
+ decidim-pages (0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-participatory_processes (0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-proposals (0.27.4)
+ decidim-comments (= 0.27.4)
+ decidim-core (= 0.27.4)
+ doc2text (~> 0.4.5)
redcarpet (~> 3.5, >= 3.5.1)
- decidim-sortitions (0.26.5)
- decidim-admin (= 0.26.5)
- decidim-comments (= 0.26.5)
- decidim-core (= 0.26.5)
- decidim-proposals (= 0.26.5)
- decidim-surveys (0.26.5)
- decidim-core (= 0.26.5)
- decidim-forms (= 0.26.5)
- decidim-templates (= 0.26.5)
- decidim-system (0.26.5)
+ decidim-sortitions (0.27.4)
+ decidim-admin (= 0.27.4)
+ decidim-comments (= 0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-proposals (= 0.27.4)
+ decidim-surveys (0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-forms (= 0.27.4)
+ decidim-templates (= 0.27.4)
+ decidim-system (0.27.4)
active_link_to (~> 1.0)
- decidim-core (= 0.26.5)
+ decidim-core (= 0.27.4)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0)
- decidim-templates (0.26.5)
- decidim-core (= 0.26.5)
- decidim-forms (= 0.26.5)
- decidim-verifications (0.26.5)
- decidim-core (= 0.26.5)
+ decidim-templates (0.27.4)
+ decidim-core (= 0.27.4)
+ decidim-forms (= 0.27.4)
+ decidim-verifications (0.27.4)
+ decidim-core (= 0.27.4)
declarative-builder (0.1.0)
declarative-option (< 0.2.0)
declarative-option (0.1.0)
@@ -400,24 +398,23 @@ GEM
warden (~> 1.2.3)
devise-i18n (1.11.0)
devise (>= 4.9.0)
- devise_invitable (2.0.7)
+ devise_invitable (2.0.8)
actionmailer (>= 5.0)
devise (>= 4.6)
diff-lcs (1.5.0)
diffy (3.4.2)
- doc2text (0.4.5)
- nokogiri (>= 1.13.2, < 1.14.0)
+ doc2text (0.4.6)
+ nokogiri (>= 1.13.2, < 1.15.0)
rubyzip (~> 2.3.0)
docile (1.4.0)
doorkeeper (5.6.6)
railties (>= 5)
doorkeeper-i18n (4.0.1)
- dotenv (2.7.6)
- dotenv-rails (2.7.6)
- dotenv (= 2.7.6)
+ dotenv (2.8.1)
+ dotenv-rails (2.8.1)
+ dotenv (= 2.8.1)
railties (>= 3.2)
dumb_delegator (1.0.0)
- equalizer (0.0.11)
erb_lint (0.0.37)
activesupport
better_html (~> 1.0.7)
@@ -429,16 +426,19 @@ GEM
erbse (0.1.4)
temple
erubi (1.12.0)
- excon (0.99.0)
+ escape_utils (1.3.0)
+ excon (0.100.0)
execjs (2.8.1)
+ extended-markdown-filter (0.7.0)
+ html-pipeline (~> 2.9)
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 (2.20.0)
+ faker (3.2.0)
i18n (>= 1.8.11, < 2)
- faraday (2.7.4)
+ faraday (2.7.10)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-mashify (0.1.1)
@@ -450,10 +450,10 @@ GEM
ffi (1.15.5)
figaro (1.2.0)
thor (>= 0.14.0, < 2)
- file_validators (2.3.0)
+ file_validators (3.0.0)
activemodel (>= 3.2)
mime-types (>= 1.0)
- fog-aws (3.13.0)
+ fog-aws (3.19.0)
fog-core (~> 2.1)
fog-json (~> 1.1)
fog-xml (~> 0.1)
@@ -476,19 +476,32 @@ GEM
activemodel (>= 4.1, < 7.1)
activesupport (>= 4.1, < 7.1)
railties (>= 4.1, < 7.1)
- geocoder (1.7.5)
+ gemoji (3.0.1)
+ geocoder (1.8.2)
get_process_mem (0.2.7)
ffi (~> 1.0)
gli (2.21.0)
globalid (1.1.0)
activesupport (>= 5.0)
graphql (1.12.24)
+ graphql-docs (2.1.0)
+ commonmarker (~> 0.16)
+ escape_utils (~> 1.2)
+ extended-markdown-filter (~> 0.4)
+ gemoji (~> 3.0)
+ graphql (~> 1.12)
+ html-pipeline (~> 2.9)
+ sass (~> 3.4)
hashdiff (1.0.1)
hashie (5.0.0)
highline (2.1.0)
+ hkdf (0.3.0)
+ html-pipeline (2.14.3)
+ activesupport (>= 2)
+ nokogiri (>= 1.4)
html_tokenizer (0.0.7)
htmlentities (4.3.4)
- i18n (1.13.0)
+ i18n (1.14.1)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.37)
activesupport (>= 4.0.2)
@@ -509,9 +522,9 @@ GEM
ruby-vips (>= 2.0.17, < 3)
invisible_captcha (0.13.0)
rails (>= 3.2.0)
- jmespath (1.6.1)
+ jmespath (1.6.2)
json (2.6.3)
- jwt (2.7.0)
+ jwt (2.7.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
@@ -528,18 +541,19 @@ GEM
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
- launchy (2.5.0)
- addressable (~> 2.7)
+ launchy (2.5.2)
+ addressable (~> 2.8)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
- letter_opener_web (1.4.1)
- actionmailer (>= 3.2)
- letter_opener (~> 1.0)
- railties (>= 3.2)
- listen (3.7.1)
+ letter_opener_web (2.0.0)
+ actionmailer (>= 5.2)
+ letter_opener (~> 1.7)
+ railties (>= 5.2)
+ rexml
+ listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
- loofah (2.3.1)
+ loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.1)
@@ -556,24 +570,24 @@ GEM
mixlib-config (>= 2.2.1, < 4)
mixlib-shellout
method_source (1.0.0)
- mime-types (3.4.1)
+ mime-types (3.5.0)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_magick (4.12.0)
mini_mime (1.1.2)
- mini_portile2 (2.8.1)
- minitest (5.18.0)
+ mini_portile2 (2.8.4)
+ minitest (5.19.0)
mixlib-cli (2.1.8)
mixlib-config (3.0.27)
tomlrb
mixlib-shellout (3.2.7)
chef-utils
- msgpack (1.5.1)
+ msgpack (1.7.1)
multi_json (1.15.0)
multi_xml (0.6.0)
- multipart-post (2.2.3)
+ multipart-post (2.3.0)
mustache (1.1.1)
- net-imap (0.3.4)
+ net-imap (0.3.7)
date
net-protocol
net-pop (0.1.2)
@@ -582,9 +596,9 @@ GEM
timeout
net-smtp (0.3.3)
net-protocol
- newrelic_rpm (9.1.0)
+ newrelic_rpm (9.3.1)
nio4r (2.5.9)
- nokogiri (1.13.10)
+ nokogiri (1.14.5)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oauth (1.1.0)
@@ -600,7 +614,6 @@ GEM
rack (>= 1.2, < 4)
snaky_hash (~> 2.0)
version_gem (~> 1.1)
- oj (3.14.3)
omniauth (2.1.1)
hashie (>= 3.4.6)
rack (>= 2.2.3)
@@ -628,9 +641,12 @@ GEM
paper_trail (12.3.0)
activerecord (>= 5.2)
request_store (~> 1.1)
- parallel (1.22.1)
- parser (3.1.2.0)
+ parallel (1.23.0)
+ parallel_tests (3.13.0)
+ parallel
+ parser (3.2.2.3)
ast (~> 2.4.1)
+ racc
pg (1.1.4)
pg_search (2.3.6)
activerecord (>= 5.2)
@@ -644,99 +660,94 @@ GEM
actionmailer (>= 3)
net-smtp
premailer (~> 1.7, >= 1.7.9)
- public_suffix (5.0.1)
- puma (5.6.4)
+ public_suffix (5.0.3)
+ puma (5.6.6)
nio4r (~> 2.0)
puma_worker_killer (0.3.1)
get_process_mem (~> 0.2)
puma (>= 2.7)
- racc (1.6.2)
- rack (2.2.7)
- rack-attack (6.6.1)
- rack (>= 1.0, < 3)
+ racc (1.7.1)
+ rack (2.2.8)
+ rack-attack (6.7.0)
+ rack (>= 1.0, < 4)
rack-cors (1.1.1)
rack (>= 2.0.0)
- rack-protection (3.0.6)
- rack
+ rack-protection (3.1.0)
+ rack (~> 2.2, >= 2.2.4)
rack-proxy (0.7.6)
rack
rack-test (2.1.0)
rack (>= 1.3)
- rails (6.0.6.1)
- actioncable (= 6.0.6.1)
- actionmailbox (= 6.0.6.1)
- actionmailer (= 6.0.6.1)
- actionpack (= 6.0.6.1)
- actiontext (= 6.0.6.1)
- actionview (= 6.0.6.1)
- activejob (= 6.0.6.1)
- activemodel (= 6.0.6.1)
- activerecord (= 6.0.6.1)
- activestorage (= 6.0.6.1)
- activesupport (= 6.0.6.1)
- bundler (>= 1.3.0)
- railties (= 6.0.6.1)
+ rails (6.1.7.4)
+ actioncable (= 6.1.7.4)
+ actionmailbox (= 6.1.7.4)
+ actionmailer (= 6.1.7.4)
+ actionpack (= 6.1.7.4)
+ actiontext (= 6.1.7.4)
+ actionview (= 6.1.7.4)
+ activejob (= 6.1.7.4)
+ activemodel (= 6.1.7.4)
+ activerecord (= 6.1.7.4)
+ activestorage (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
+ bundler (>= 1.15.0)
+ railties (= 6.1.7.4)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
- rails-dom-testing (2.0.3)
- activesupport (>= 4.2.0)
+ rails-dom-testing (2.2.0)
+ activesupport (>= 5.0.0)
+ minitest
nokogiri (>= 1.6)
- rails-html-sanitizer (1.4.3)
- loofah (~> 2.3)
+ rails-html-sanitizer (1.5.0)
+ loofah (~> 2.19, >= 2.19.1)
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
- railties (6.0.6.1)
- actionpack (= 6.0.6.1)
- activesupport (= 6.0.6.1)
+ railties (6.1.7.4)
+ actionpack (= 6.1.7.4)
+ activesupport (= 6.1.7.4)
method_source
- rake (>= 0.8.7)
- thor (>= 0.20.3, < 2.0)
+ rake (>= 12.2)
+ thor (~> 1.0)
rainbow (3.1.1)
rake (13.0.6)
ransack (2.4.2)
activerecord (>= 5.2.4)
activesupport (>= 5.2.4)
i18n
- rb-fsevent (0.11.1)
+ rb-fsevent (0.11.2)
rb-inotify (0.10.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.6.0)
redis (4.8.1)
- regexp_parser (2.3.1)
+ regexp_parser (2.8.1)
request_store (1.5.1)
rack (>= 1.4)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.5)
- rspec (3.11.0)
- rspec-core (~> 3.11.0)
- rspec-expectations (~> 3.11.0)
- rspec-mocks (~> 3.11.0)
+ rspec (3.12.0)
+ rspec-core (~> 3.12.0)
+ rspec-expectations (~> 3.12.0)
+ rspec-mocks (~> 3.12.0)
rspec-cells (0.3.8)
cells (>= 4.0.0, < 6.0.0)
rspec-rails (>= 3.0.0, < 6.1.0)
- rspec-core (3.11.0)
- rspec-support (~> 3.11.0)
- rspec-expectations (3.11.0)
+ rspec-core (3.12.2)
+ rspec-support (~> 3.12.0)
+ rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.11.0)
+ rspec-support (~> 3.12.0)
rspec-html-matchers (0.9.4)
nokogiri (~> 1)
rspec (>= 3.0.0.a, < 4)
- rspec-mocks (3.11.1)
+ rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.11.0)
+ rspec-support (~> 3.12.0)
rspec-rails (4.1.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
@@ -747,30 +758,30 @@ GEM
rspec-support (~> 3.10)
rspec-retry (0.6.2)
rspec-core (> 3.3)
- rspec-support (3.11.0)
+ rspec-support (3.12.1)
rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0)
- rubocop (0.92.0)
+ rubocop (1.28.2)
parallel (~> 1.10)
- parser (>= 2.7.1.5)
+ parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
- regexp_parser (>= 1.7)
+ regexp_parser (>= 1.8, < 3.0)
rexml
- rubocop-ast (>= 0.5.0)
+ rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
- unicode-display_width (>= 1.4.0, < 2.0)
- rubocop-ast (1.17.0)
- parser (>= 3.1.1.0)
+ unicode-display_width (>= 1.4.0, < 3.0)
+ rubocop-ast (1.29.0)
+ parser (>= 3.2.1.0)
rubocop-faker (1.1.0)
faker (>= 2.12.0)
rubocop (>= 0.82.0)
- rubocop-rails (2.9.1)
+ rubocop-rails (2.15.2)
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)
+ rubocop (>= 1.7.0, < 2.0)
+ rubocop-rspec (2.11.1)
+ rubocop (~> 1.19)
+ ruby-progressbar (1.13.0)
ruby-vips (2.1.4)
ffi (~> 1.12)
ruby2_keywords (0.0.5)
@@ -778,11 +789,16 @@ GEM
nokogiri (>= 1.10.8)
rubyzip (>= 1.3.0)
rubyzip (2.3.2)
+ sass (3.7.4)
+ sass-listen (~> 4.0.0)
+ sass-listen (4.0.0)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
- searchlight (4.1.0)
- selenium-webdriver (3.142.7)
- childprocess (>= 0.5, < 4.0)
+ selenium-webdriver (4.1.0)
+ childprocess (>= 0.5, < 5.0)
+ rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
seven_zip_ruby (1.3.0)
@@ -790,19 +806,21 @@ GEM
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
- simplecov (0.19.1)
+ simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
- simplecov-cobertura (1.3.1)
- simplecov (~> 0.8)
+ simplecov_json_formatter (~> 0.1)
+ simplecov-cobertura (2.1.0)
+ rexml
+ simplecov (~> 0.19)
simplecov-html (0.12.3)
- slack-ruby-client (2.0.0)
+ simplecov_json_formatter (0.1.4)
+ slack-ruby-client (2.1.0)
faraday (>= 2.0)
faraday-mashify
faraday-multipart
gli
hashie
- websocket-driver
smart_properties (1.17.0)
snaky_hash (2.0.1)
hashie
@@ -821,31 +839,28 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
ssrf_filter (1.1.1)
- system_test_html_screenshots (0.2.0)
- actionpack (>= 5.2, < 6.1.a)
- temple (0.10.0)
+ temple (0.10.2)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
- thor (1.2.1)
+ thor (1.2.2)
thread_safe (0.3.6)
- tilt (2.1.0)
- timeout (0.3.2)
+ tilt (2.2.0)
+ timeout (0.4.0)
tomlrb (2.0.3)
- tzinfo (1.2.11)
- thread_safe (~> 0.1)
+ tzinfo (2.0.6)
+ concurrent-ruby (~> 1.0)
uber (0.1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
- unicode-display_width (1.8.0)
+ unicode-display_width (2.4.2)
valid_email2 (2.3.1)
activemodel (>= 3.2)
mail (~> 2.5)
- version_gem (1.1.2)
- virtus (1.0.5)
+ version_gem (1.1.3)
+ virtus (2.0.0)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
- equalizer (~> 0.0, >= 0.0.9)
w3c_rspec_validators (0.3.0)
rails
rspec
@@ -856,11 +871,11 @@ GEM
rexml (~> 3.2)
warden (1.2.9)
rack (>= 2.0.9)
- web-console (3.7.0)
- actionview (>= 5.0)
- activemodel (>= 5.0)
+ web-console (4.2.0)
+ actionview (>= 6.0.0)
+ activemodel (>= 6.0.0)
bindex (>= 0.4.0)
- railties (>= 5.0)
+ railties (>= 6.0.0)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
@@ -870,7 +885,10 @@ GEM
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
- websocket-driver (0.7.5)
+ webpush (1.1.0)
+ hkdf (~> 0.2)
+ jwt (~> 2.0)
+ websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wicked_pdf (2.6.3)
@@ -880,7 +898,7 @@ GEM
wkhtmltopdf-binary (0.12.6.6)
xpath (3.2.0)
nokogiri (~> 1.8)
- zeitwerk (2.6.7)
+ zeitwerk (2.6.11)
zip-zip (0.3)
rubyzip (>= 1.0.0)
@@ -889,30 +907,28 @@ PLATFORMS
DEPENDENCIES
aws-sdk-s3
- aws-xray-sdk
bootsnap
byebug (~> 11.0)
- decidim (= 0.26.5)
+ decidim (= 0.27.4)
decidim-comments!
decidim-decidim_awesome!
- decidim-dev (= 0.26.5)
+ decidim-dev (= 0.27.4)
decidim-polis!
decidim-term_customizer!
decidim-user_extension!
deface
dotenv-rails
factory_bot_rails
- faker (~> 2.14)
+ faker (~> 3.2)
figaro
fog-aws
image_processing
- letter_opener_web (~> 1.3)
+ letter_opener_web (~> 2.0)
listen (~> 3.1)
newrelic_rpm
- oj
omniauth-line_login!
omniauth-rails_csrf_protection
- puma (>= 5.0.0)
+ puma (>= 5.6.2)
puma_worker_killer
rspec-rails
rubocop-faker
@@ -922,12 +938,12 @@ DEPENDENCIES
spring (~> 2.0)
spring-watcher-listen (~> 2.0)
uglifier (~> 4.1)
- web-console (~> 3.5)
+ web-console (~> 4.2)
wicked_pdf (~> 2.1)
zip-zip
RUBY VERSION
- ruby 2.7.4p191
+ ruby 3.0.6p216
BUNDLED WITH
- 2.2.18
+ 2.2.33
diff --git a/app/commands/decidim/accountability/destroy_all_results.rb b/app/commands/decidim/accountability/destroy_all_results.rb
index 3693c8cf70..4ca6771885 100644
--- a/app/commands/decidim/accountability/destroy_all_results.rb
+++ b/app/commands/decidim/accountability/destroy_all_results.rb
@@ -3,7 +3,7 @@
module Decidim
module Accountability
# A command with all the business logic when destroys all proposals.
- class DestroyAllResults < Rectify::Command
+ class DestroyAllResults < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all results.
diff --git a/app/commands/decidim/areas/destroy_all_areas.rb b/app/commands/decidim/areas/destroy_all_areas.rb
index 1dddc73871..30bbdfc851 100644
--- a/app/commands/decidim/areas/destroy_all_areas.rb
+++ b/app/commands/decidim/areas/destroy_all_areas.rb
@@ -3,7 +3,7 @@
module Decidim
module Areas
# A command with all the business logic when destroys all areas.
- class DestroyAllAreas < Rectify::Command
+ class DestroyAllAreas < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all areas.
diff --git a/app/commands/decidim/assemblies/destroy_all_assemblies.rb b/app/commands/decidim/assemblies/destroy_all_assemblies.rb
index df3f3a5502..199c6a70a2 100644
--- a/app/commands/decidim/assemblies/destroy_all_assemblies.rb
+++ b/app/commands/decidim/assemblies/destroy_all_assemblies.rb
@@ -3,7 +3,7 @@
module Decidim
module Assemblies
# A command with all the business logic when destroys all assemblies.
- class DestroyAllAssemblies < Rectify::Command
+ class DestroyAllAssemblies < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all assemblies.
diff --git a/app/commands/decidim/blogs/destroy_all_posts.rb b/app/commands/decidim/blogs/destroy_all_posts.rb
index cdb2f8197c..c26a86c07e 100644
--- a/app/commands/decidim/blogs/destroy_all_posts.rb
+++ b/app/commands/decidim/blogs/destroy_all_posts.rb
@@ -3,7 +3,7 @@
module Decidim
module Blogs
# A command with all the business logic when destroys all posts.
- class DestroyAllPosts < Rectify::Command
+ class DestroyAllPosts < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all posts.
diff --git a/app/commands/decidim/budgets/destroy_all_budgets.rb b/app/commands/decidim/budgets/destroy_all_budgets.rb
index 2d94ffc604..5ee3553880 100644
--- a/app/commands/decidim/budgets/destroy_all_budgets.rb
+++ b/app/commands/decidim/budgets/destroy_all_budgets.rb
@@ -3,7 +3,7 @@
module Decidim
module Budgets
# A command with all the business logic when destroys all budgets.
- class DestroyAllBudgets < Rectify::Command
+ class DestroyAllBudgets < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all budgets.
diff --git a/app/commands/decidim/comments/destroy_all_comments.rb b/app/commands/decidim/comments/destroy_all_comments.rb
index dc41fa5712..4535e18c0c 100644
--- a/app/commands/decidim/comments/destroy_all_comments.rb
+++ b/app/commands/decidim/comments/destroy_all_comments.rb
@@ -3,7 +3,7 @@
module Decidim
module Comments
# A command with all the business logic to destroy a comment
- class DestroyAllComments < Rectify::Command
+ class DestroyAllComments < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all comments.
diff --git a/app/commands/decidim/debates/destroy_all_debates.rb b/app/commands/decidim/debates/destroy_all_debates.rb
index b6fd4a2442..9350a06e54 100644
--- a/app/commands/decidim/debates/destroy_all_debates.rb
+++ b/app/commands/decidim/debates/destroy_all_debates.rb
@@ -3,7 +3,7 @@
module Decidim
module Debates
# A command with all the business logic when destroys all debates.
- class DestroyAllDebates < Rectify::Command
+ class DestroyAllDebates < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all debates.
diff --git a/app/commands/decidim/destroy_all_attachments.rb b/app/commands/decidim/destroy_all_attachments.rb
index 7d4530b949..1ed96e9bc7 100644
--- a/app/commands/decidim/destroy_all_attachments.rb
+++ b/app/commands/decidim/destroy_all_attachments.rb
@@ -2,7 +2,7 @@
module Decidim
# A command with all the business logic when destroys all proposals.
- class DestroyAllAttachments < Rectify::Command
+ class DestroyAllAttachments < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all results.
diff --git a/app/commands/decidim/gamifications/destroy_all_badges.rb b/app/commands/decidim/gamifications/destroy_all_badges.rb
index 71c4c2d811..051004c686 100644
--- a/app/commands/decidim/gamifications/destroy_all_badges.rb
+++ b/app/commands/decidim/gamifications/destroy_all_badges.rb
@@ -3,7 +3,7 @@
module Decidim
module Gamifications
# A command with all the business logic when destroys all meetings.
- class DestroyAllBadges < Rectify::Command
+ class DestroyAllBadges < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all meetings.
diff --git a/app/commands/decidim/meetings/destroy_all_meetings.rb b/app/commands/decidim/meetings/destroy_all_meetings.rb
index 09c984deac..ed090e7923 100644
--- a/app/commands/decidim/meetings/destroy_all_meetings.rb
+++ b/app/commands/decidim/meetings/destroy_all_meetings.rb
@@ -3,7 +3,7 @@
module Decidim
module Meetings
# A command with all the business logic when destroys all meetings.
- class DestroyAllMeetings < Rectify::Command
+ class DestroyAllMeetings < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all meetings.
diff --git a/app/commands/decidim/messaging/destroy_all_messages.rb b/app/commands/decidim/messaging/destroy_all_messages.rb
index 19025d8637..ab2707e077 100644
--- a/app/commands/decidim/messaging/destroy_all_messages.rb
+++ b/app/commands/decidim/messaging/destroy_all_messages.rb
@@ -3,7 +3,7 @@
module Decidim
module Messaging
# A command with all the business logic when destroys all meetings.
- class DestroyAllMessages < Rectify::Command
+ class DestroyAllMessages < Decidim::Command
# Executes the command. Broadcasts these events:
#
# - :ok when everything is valid and the message is deleted.
diff --git a/app/commands/decidim/organizations/destroy_organization.rb b/app/commands/decidim/organizations/destroy_organization.rb
index b2210eb871..7c5a981bd1 100644
--- a/app/commands/decidim/organizations/destroy_organization.rb
+++ b/app/commands/decidim/organizations/destroy_organization.rb
@@ -3,7 +3,7 @@
module Decidim
module Organizations
# A command with all the business logic when destroys organization.
- class DestroyOrganization < Rectify::Command
+ class DestroyOrganization < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy.
diff --git a/app/commands/decidim/pages/destroy_all_pages.rb b/app/commands/decidim/pages/destroy_all_pages.rb
index 66b8f42be7..e91e415f9c 100644
--- a/app/commands/decidim/pages/destroy_all_pages.rb
+++ b/app/commands/decidim/pages/destroy_all_pages.rb
@@ -3,7 +3,7 @@
module Decidim
module Pages
# A command with all the business logic when destroys all pages.
- class DestroyAllPages < Rectify::Command
+ class DestroyAllPages < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all pages.
diff --git a/app/commands/decidim/participatory_processes/destroy_all_participatory_processes.rb b/app/commands/decidim/participatory_processes/destroy_all_participatory_processes.rb
index 8234f19d4f..4fd9100ac3 100644
--- a/app/commands/decidim/participatory_processes/destroy_all_participatory_processes.rb
+++ b/app/commands/decidim/participatory_processes/destroy_all_participatory_processes.rb
@@ -3,7 +3,7 @@
module Decidim
module ParticipatoryProcesses
# A command with all the business logic when destroys all participatory_processes.
- class DestroyAllParticipatoryProcesses < Rectify::Command
+ class DestroyAllParticipatoryProcesses < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all participatory_processes.
diff --git a/app/commands/decidim/proposals/destroy_all_proposals.rb b/app/commands/decidim/proposals/destroy_all_proposals.rb
index 10cea88449..782594d450 100644
--- a/app/commands/decidim/proposals/destroy_all_proposals.rb
+++ b/app/commands/decidim/proposals/destroy_all_proposals.rb
@@ -3,7 +3,7 @@
module Decidim
module Proposals
# A command with all the business logic when destroys all proposals.
- class DestroyAllProposals < Rectify::Command
+ class DestroyAllProposals < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all proposals.
diff --git a/app/commands/decidim/surveys/destroy_all_surveys.rb b/app/commands/decidim/surveys/destroy_all_surveys.rb
index 3576ff7a74..b2875baa1f 100644
--- a/app/commands/decidim/surveys/destroy_all_surveys.rb
+++ b/app/commands/decidim/surveys/destroy_all_surveys.rb
@@ -3,7 +3,7 @@
module Decidim
module Surveys
# A command with all the business logic when destroys all surveys.
- class DestroyAllSurveys < Rectify::Command
+ class DestroyAllSurveys < Decidim::Command
# Public: Initializes the command.
#
# organization - The organization to destroy all surveys.
diff --git a/app/controllers/decidim/debates/versions_controller.rb b/app/controllers/decidim/debates/versions_controller.rb
index 9555f470af..e9c4514705 100644
--- a/app/controllers/decidim/debates/versions_controller.rb
+++ b/app/controllers/decidim/debates/versions_controller.rb
@@ -4,7 +4,7 @@ module Decidim
module Debates
# Exposes Debates versions so users can see how a Debate has been updated
# through time.
- class VersionsController < Decidim::Proposals::ApplicationController
+ class VersionsController < Decidim::Debates::ApplicationController
include Decidim::ApplicationHelper
include Decidim::ResourceVersionsConcern
diff --git a/app/forms/decidim/debates/close_debate_form.rb b/app/forms/decidim/debates/close_debate_form.rb
index 8e632772cf..0faf04b2fb 100644
--- a/app/forms/decidim/debates/close_debate_form.rb
+++ b/app/forms/decidim/debates/close_debate_form.rb
@@ -7,7 +7,6 @@ class CloseDebateForm < Decidim::Form
mimic :debate
attribute :conclusions, Decidim::Attributes::CleanString
- attribute :debate, Debate
validates :debate, presence: true
validates :conclusions, presence: true, length: { minimum: 10, maximum: 10_000 }
@@ -19,7 +18,6 @@ def closed_at
def map_model(debate)
super
- self.debate = debate
# Debates can be translated in different languages from the admin but
# the public form doesn't allow it. When a user closes a debate the
@@ -31,6 +29,10 @@ def map_model(debate)
end
end
+ def debate
+ @debate ||= Debate.find_by(id: id)
+ end
+
private
def user_can_close_debate
diff --git a/app/presenters/decidim/notification_to_mailer_presenter.rb b/app/presenters/decidim/notification_to_mailer_presenter.rb
new file mode 100644
index 0000000000..1e5342439e
--- /dev/null
+++ b/app/presenters/decidim/notification_to_mailer_presenter.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+module Decidim
+ #
+ # Decorator for notifications in mail digest
+ #
+ class NotificationToMailerPresenter < SimpleDelegator
+ include Decidim::TranslatableAttributes
+
+ delegate :url_helpers, to: "Decidim::Core::Engine.routes"
+ delegate :resource_title, to: :event
+ delegate :resource_url, to: :event
+ delegate :email_intro, to: :event
+ delegate :resource_path, to: :event
+
+ def date_time
+ created_at_in_time_zone = created_at.in_time_zone(resource.organization.time_zone)
+ if frequency == :daily
+ I18n.l(created_at_in_time_zone, format: :time_of_day)
+ else
+ I18n.l(created_at_in_time_zone, format: :decidim_short)
+ end
+ end
+
+ private
+
+ def event
+ @event ||= event_class.constantize.new(
+ resource: resource,
+ user: user,
+ user_role: user_role,
+ event_name: event_name,
+ extra: extra
+ )
+ end
+
+ def frequency
+ @frequency ||= user.notifications_sending_frequency
+ end
+ end
+end
diff --git a/app/views/decidim/blogs/posts/show.html.erb b/app/views/decidim/blogs/posts/show.html.erb
index 22e0d90978..1d5831dc89 100644
--- a/app/views/decidim/blogs/posts/show.html.erb
+++ b/app/views/decidim/blogs/posts/show.html.erb
@@ -2,10 +2,15 @@
<% add_decidim_meta_tags({
title: translated_attribute(post.title),
- description: translated_attribute(post.body),
+ description: translated_attribute(post.body).truncate(Rails.application.config.default_blog_ogp_description_limit),
url: post_url(post.id)
}) %>
+<%
+ doc = Nokogiri::HTML(translated_attribute(post.body))
+ img = doc.css('img')&.first
+ add_decidim_meta_image_url(img['src']) if img
+ %>
<%
edit_link(
resource_locator(post).edit,
@@ -16,42 +21,47 @@
%>
- <%= link_to :posts, class: "small hollow" do %>
- <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
- <%= t(".back") %>
- <% end %>
+
+ <%= link_to :posts, class: "small hollow" do %>
+ <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
+ <%= t(".back") %>
+ <% end %>
+
<%= translated_attribute post.title %>
- <%= cell "decidim/author", present(post.author), from: post %>
+
+ <% post_presenter = Decidim::Blogs::PostPresenter.new(post) %>
+ <%= cell "decidim/author", post_presenter.author, from: post %>
-
- <% if show_endorsements_card? %>
-
-
-
- <%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
+ <%= form.translated :editor, :description %>
diff --git a/app/views/static/api/docs/index.html b/app/views/static/api/docs/index.html
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/babel.config.json b/babel.config.json
index e5811e1aec..551d4bec5e 100644
--- a/babel.config.json
+++ b/babel.config.json
@@ -20,11 +20,9 @@
"corejs": false
}
],
- [
- "@babel/plugin-transform-regenerator",
- {
- "async": false
- }
- ]
+ [ "@babel/plugin-transform-regenerator", { "async": false }],
+ [ "@babel/plugin-proposal-private-property-in-object", { "loose": true }],
+ ["@babel/plugin-proposal-private-methods", { "loose": true }],
+ ["@babel/plugin-proposal-class-properties", { "loose": true }]
]
}
diff --git a/config/boot.rb b/config/boot.rb
index c154378b5c..8a216e821e 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -5,7 +5,7 @@
require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap"
-env = ENV["RAILS_ENV"] || "development"
+env = ENV.fetch("RAILS_ENV", nil) || "development"
Bootsnap.setup(
cache_dir: File.expand_path(File.join("..", "tmp", "cache"), __dir__),
diff --git a/config/initializers/decidim.rb b/config/initializers/decidim.rb
index f296c634e5..687b466c17 100644
--- a/config/initializers/decidim.rb
+++ b/config/initializers/decidim.rb
@@ -2,30 +2,31 @@
Decidim.configure do |config|
# The name of the application
- config.application_name = "Code for Japan Decidim"
+ config.application_name = Rails.application.secrets.decidim[:application_name]
# The email that will be used as sender in all emails from Decidim
- config.mailer_sender = "info@diycities.jp"
+ config.mailer_sender = Rails.application.secrets.decidim[:mailer_sender]
# Sets the list of available locales for the whole application.
#
# When an organization is created through the System area, system admins will
# be able to choose the available languages for that organization. That list
# of languages will be equal or a subset of the list in this file.
+ # config.available_locales = Rails.application.secrets.decidim[:available_locales].presence || [:en]
+ # Or block set it up manually and prevent ENV manipulation:
+ # config.available_locales = %w(en ca es)
config.available_locales = [:ja, :en]
- # Enable machine translations
- config.enable_machine_translations = false
+ # Sets the default locale for new organizations. When creating a new
+ # organization from the System area, system admins will be able to overwrite
+ # this value for that specific organization.
+ # config.default_locale = Rails.application.secrets.decidim[:default_locale].presence || :en
+ config.default_locale = Rails.application.secrets.decidim[:default_locale].presence || :ja
# Restrict access to the system part with an authorized ip list.
# You can use a single ip like ("1.2.3.4"), or an ip subnet like ("1.2.3.4/24")
# You may specify multiple ip in an array ["1.2.3.4", "1.2.3.4/24"]
- # config.system_accesslist_ips = ["127.0.0.1"]
-
- # Sets the default locale for new organizations. When creating a new
- # organization from the System area, system admins will be able to overwrite
- # this value for that specific organization.
- config.default_locale = :ja
+ config.system_accesslist_ips = Rails.application.secrets.decidim[:system_accesslist_ips] if Rails.application.secrets.decidim[:system_accesslist_ips].present?
# Defines a list of custom content processors. They are used to parse and
# render specific tags inside some user-provided content. Check the docs for
@@ -33,30 +34,115 @@
# config.content_processors = []
# Whether SSL should be enabled or not.
+ # if this var is not defined, it is decided automatically per-rails-environment
+ config.force_ssl = Rails.application.secrets.decidim[:force_ssl].present? unless Rails.application.secrets.decidim[:force_ssl] == "auto"
+ # or set it up manually and prevent any ENV manipulation:
# config.force_ssl = true
- # Geocoder configuration
- config.maps = {
- provider: :osm,
- api_key: Rails.application.secrets.maps[:api_key],
- dynamic: {
- tile_layer: {
- url: "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
- api_key: true,
- attribution: %(
-
© OpenStreetMap contributors
- ).strip
- # Translatable attribution:
- # attribution: -> { I18n.t("tile_layer_attribution") }
+ # Enable the service worker. By default is disabled in development and enabled in the rest of environments
+ config.service_worker_enabled = Rails.application.secrets.decidim[:service_worker_enabled].present?
+
+ # Map and Geocoder configuration
+ #
+ # == HERE Maps ==
+ # config.maps = {
+ # provider: :here,
+ # api_key: Rails.application.secrets.maps[:api_key],
+ # static: { url: "https://image.maps.ls.hereapi.com/mia/1.6/mapview" }
+ # }
+ #
+ # == OpenStreetMap (OSM) services ==
+ # To use the OSM map service providers, you will need a service provider for
+ # the following map servers or host all of them yourself:
+ # - A tile server for the dynamic maps
+ # (https://wiki.openstreetmap.org/wiki/Tile_servers)
+ # - A Nominatim geocoding server for the geocoding functionality
+ # (https://wiki.openstreetmap.org/wiki/Nominatim)
+ # - A static map server for static map images
+ # (https://github.com/jperelli/osm-static-maps)
+ #
+ # When used, please read carefully the terms of service for your service
+ # provider.
+ #
+ # config.maps = {
+ # provider: :osm,
+ # api_key: Rails.application.secrets.maps[:api_key],
+ # dynamic: {
+ # tile_layer: {
+ # url: "https://tiles.example.org/{z}/{x}/{y}.png?key={apiKey}&{foo}",
+ # api_key: true,
+ # foo: "bar=baz",
+ # attribution: %(
+ #
© OpenStreetMap contributors
+ # ).strip
+ # # Translatable attribution:
+ # # attribution: -> { I18n.t("tile_layer_attribution") }
+ # }
+ # },
+ # static: { url: "https://staticmap.example.org/" },
+ # geocoding: { host: "nominatim.example.org", use_https: true }
+ # }
+ #
+ # == Combination (OpenStreetMap default + HERE Maps dynamic map tiles) ==
+ # config.maps = {
+ # provider: :osm,
+ # api_key: Rails.application.secrets.maps[:api_key],
+ # dynamic: {
+ # provider: :here,
+ # api_key: Rails.application.secrets.maps[:here_api_key]
+ # },
+ # static: { url: "https://staticmap.example.org/" },
+ # geocoding: { host: "nominatim.example.org", use_https: true }
+ # }
+
+ # Geocoder configurations if you want to customize the default geocoding
+ # settings. The maps configuration will manage which geocoding service to use,
+ # so that does not need any additional configuration here. Use this only for
+ # the global geocoder preferences.
+ # config.geocoder = {
+ # # geocoding service request timeout, in seconds (default 3):
+ # timeout: 5,
+ # # set default units to kilometers:
+ # units: :km,
+ # # caching (see https://github.com/alexreisner/geocoder#caching for details):
+ # cache: Redis.new,
+ # cache_prefix: "..."
+ # }
+ if Rails.application.secrets.maps.present? && Rails.application.secrets.maps[:static_provider].present?
+ provider = Rails.application.secrets.maps[:provider]
+ static_provider = Rails.application.secrets.maps[:static_provider]
+ dynamic_provider = Rails.application.secrets.maps[:dynamic_provider]
+ dynamic_url = Rails.application.secrets.maps[:dynamic_url]
+ static_url = Rails.application.secrets.maps[:static_url]
+ static_url = "https://image.maps.ls.hereapi.com/mia/1.6/mapview" if static_provider == "here" && static_url.blank?
+ config.maps = {
+ provider: provider,
+ api_key: Rails.application.secrets.maps[:static_api_key],
+ static: { provider: static_provider, url: static_url },
+ dynamic: {
+ provider: dynamic_provider,
+ api_key: Rails.application.secrets.maps[:dynamic_api_key]
}
- },
- static: {
- provider: :cfj_osm,
- url: "http://www.openstreetmap.org/"
- }, # use StaticMap::CfjOsm
- geocoding: { host: "nominatim.openstreetmap.org", use_https: true }
- # autocomplete: { url: "https://nominatim.openstreetmap.org/search" }
- }
+ }
+ config.maps[:geocoding] = { host: Rails.application.secrets.maps[:geocoding_host], use_https: true } if Rails.application.secrets.maps[:geocoding_host]
+ config.maps[:dynamic][:tile_layer] = {}
+ config.maps[:dynamic][:tile_layer][:url] = dynamic_url if dynamic_url
+ config.maps[:dynamic][:tile_layer][:attribution] = Rails.application.secrets.maps[:attribution] if Rails.application.secrets.maps[:attribution]
+ if Rails.application.secrets.maps[:extra_vars].present?
+ vars = URI.decode_www_form(Rails.application.secrets.maps[:extra_vars])
+ vars.each do |key, value|
+ # perform a naive type conversion
+ config.maps[:dynamic][:tile_layer][key] = case value
+ when /^true$|^false$/i
+ value.downcase == "true"
+ when /\A[-+]?\d+\z/
+ value.to_i
+ else
+ value
+ end
+ end
+ end
+ end
# Custom resource reference generator method. Check the docs for more info.
# config.reference_generator = lambda do |resource, component|
@@ -65,20 +151,21 @@
# end
# Currency unit
+ # config.currency_unit = Rails.application.secrets.decidim[:currency_unit] if Rails.application.secrets.decidim[:currency_unit].present?
config.currency_unit = "円"
+ # Workaround to enable SVG assets cors
+ config.cors_enabled = Rails.application.secrets.decidim[:cors_enabled].present?
+
# Defines the quality of image uploads after processing. Image uploads are
# processed by Decidim, this value helps reduce the size of the files.
- # config.image_uploader_quality = 80
-
- # The maximum file size of an attachment
- # config.maximum_attachment_size = 10.megabytes
+ config.image_uploader_quality = Rails.application.secrets.decidim[:image_uploader_quality].to_i
- # The maximum file size for a user avatar
- # config.maximum_avatar_size = 10.megabytes
+ config.maximum_attachment_size = Rails.application.secrets.decidim[:maximum_attachment_size].to_i.megabytes
+ config.maximum_avatar_size = Rails.application.secrets.decidim[:maximum_avatar_size].to_i.megabytes
# The number of reports which a resource can receive before hiding it
- # config.max_reports_before_hiding = 3
+ config.max_reports_before_hiding = Rails.application.secrets.decidim[:max_reports_before_hiding].to_i
# Custom HTML Header snippets
#
@@ -93,30 +180,22 @@
# that an organization's administrator injects malicious scripts to spy on or
# take over user accounts.
#
- config.enable_html_header_snippets = true
+ config.enable_html_header_snippets = Rails.application.secrets.decidim[:enable_html_header_snippets].present?
# Allow organizations admins to track newsletter links.
- # config.track_newsletter_links = true
+ config.track_newsletter_links = Rails.application.secrets.decidim[:track_newsletter_links].present? unless Rails.application.secrets.decidim[:track_newsletter_links] == "auto"
- # Amount of time that the data portability files will be available in the server.
- # config.data_portability_expiry_time = 7.days
+ # Amount of time that the download your data files will be available in the server.
+ config.download_your_data_expiry_time = Rails.application.secrets.decidim[:download_your_data_expiry_time].to_i.days
# Max requests in a time period to prevent DoS attacks. Only applied on production.
- # config.throttling_max_requests = 100
+ config.throttling_max_requests = Rails.application.secrets.decidim[:throttling_max_requests].to_i
# Time window in which the throttling is applied.
- # config.throttling_period = 1.minute
+ config.throttling_period = Rails.application.secrets.decidim[:throttling_period].to_i.minutes
# Time window were users can access the website even if their email is not confirmed.
- # config.unconfirmed_access_for = 2.days
- config.unconfirmed_access_for = 0.days
-
- # Etherpad configuration. Check the docs for more info.
- # config.etherpad = {
- # server:
,
- # api_key: ,
- # api_version:
- # }
+ config.unconfirmed_access_for = Rails.application.secrets.decidim[:unconfirmed_access_for].to_i.days
# A base path for the uploads. If set, make sure it ends in a slash.
# Uploads will be set to `/uploads/`. This can be useful if you
@@ -124,7 +203,7 @@
# environments, but in different folders.
#
# If not set, it will be ignored.
- # config.base_uploads_path = nil
+ config.base_uploads_path = Rails.application.secrets.decidim[:base_uploads_path] if Rails.application.secrets.decidim[:base_uploads_path].present?
# SMS gateway configuration
#
@@ -147,7 +226,7 @@
# end
# end
#
- # config.sms_gateway_service = "MySMSGatewayService"
+ config.sms_gateway_service = "Decidim::Verifications::Sms::ExampleGateway"
# Timestamp service configuration
#
@@ -171,7 +250,8 @@
# end
# end
#
- # config.timestamp_service = "MyTimestampService"
+ #
+ config.timestamp_service = "Decidim::Initiatives::DummyTimestamp"
# PDF signature service configuration
#
@@ -194,20 +274,23 @@
# end
# end
#
- # config.pdf_signature_service = "MyPDFSignatureService"
+ config.pdf_signature_service = "Decidim::Initiatives::PdfSignatureExample"
# Etherpad configuration
#
# Only needed if you want to have Etherpad integration with Decidim. See
- # Decidim docs at docs/services/etherpad.md in order to set it up.
+ # Decidim docs at https://docs.decidim.org/en/services/etherpad/ in order to set it up.
#
- # config.etherpad = {
- # server: Rails.application.secrets.etherpad[:server],
- # api_key: Rails.application.secrets.etherpad[:api_key],
- # api_version: Rails.application.secrets.etherpad[:api_version]
- # }
+ if Rails.application.secrets.etherpad.present? && Rails.application.secrets.etherpad[:server].present?
+ config.etherpad = {
+ server: Rails.application.secrets.etherpad[:server],
+ api_key: Rails.application.secrets.etherpad[:api_key],
+ api_version: Rails.application.secrets.etherpad[:api_version]
+ }
+ end
# Sets Decidim::Exporters::CSV's default column separator
+ # config.default_csv_col_sep = Rails.application.secrets.decidim[:default_csv_col_sep] if Rails.application.secrets.decidim[:default_csv_col_sep].present?
config.default_csv_col_sep = ","
# The list of roles a user can have, not considering the space-specific roles.
@@ -224,9 +307,19 @@
# Machine Translation Configuration
#
+ # See Decidim docs at https://docs.decidim.org/en/develop/machine_translations/
+ # for more information about how it works and how to set it up.
+ #
+ # Enable machine translations
+ config.enable_machine_translations = false
+ #
# If you want to enable machine translation you can create your own service
# to interact with third party service to translate the user content.
#
+ # If you still want to use "Decidim::Dev::DummyTranslator" as translator placeholder,
+ # add the follwing line at the beginning of this file:
+ # require "decidim/dev/dummy_translator"
+ #
# An example class would be something like:
#
# class MyTranslationService
@@ -243,23 +336,170 @@
# end
# end
#
- # config.machine_translation_service = "MyTranslationService"
+ config.machine_translation_service = "Decidim::Dev::DummyTranslator"
+
+ # Defines the name of the cookie used to check if the user allows Decidim to
+ # set cookies.
+ config.consent_cookie_name = Rails.application.secrets.decidim[:consent_cookie_name] if Rails.application.secrets.decidim[:consent_cookie_name].present?
+
+ # Defines data consent categories and the data stored in each category.
+ # config.consent_categories = [
+ # {
+ # slug: "essential",
+ # mandatory: true,
+ # items: [
+ # {
+ # type: "cookie",
+ # name: "_session_id"
+ # },
+ # {
+ # type: "cookie",
+ # name: Decidim.consent_cookie_name
+ # }
+ # ]
+ # },
+ # {
+ # slug: "preferences",
+ # mandatory: false
+ # },
+ # {
+ # slug: "analytics",
+ # mandatory: false
+ # },
+ # {
+ # slug: "marketing",
+ # mandatory: false
+ # }
+ # ]
+
+ # Admin admin password configurations
+ Rails.application.secrets.dig(:decidim, :admin_password, :strong).tap do |strong_pw|
+ # When the strong password is not configured, default to true
+ config.admin_password_strong = strong_pw.nil? ? true : strong_pw.present?
+ end
+ config.admin_password_expiration_days = Rails.application.secrets.dig(:decidim, :admin_password, :expiration_days).presence || 90
+ config.admin_password_min_length = Rails.application.secrets.dig(:decidim, :admin_password, :min_length).presence || 15
+ config.admin_password_repetition_times = Rails.application.secrets.dig(:decidim, :admin_password, :repetition_times).presence || 5
+
+ # Additional optional configurations (see decidim-core/lib/decidim/core.rb)
+ config.cache_key_separator = Rails.application.secrets.decidim[:cache_key_separator] if Rails.application.secrets.decidim[:cache_key_separator].present?
+ config.expire_session_after = Rails.application.secrets.decidim[:expire_session_after].to_i.minutes if Rails.application.secrets.decidim[:expire_session_after].present?
+ config.enable_remember_me = Rails.application.secrets.decidim[:enable_remember_me].present? unless Rails.application.secrets.decidim[:enable_remember_me] == "auto"
+ if Rails.application.secrets.decidim[:session_timeout_interval].present?
+ config.session_timeout_interval = Rails.application.secrets.decidim[:session_timeout_interval].to_i.seconds
+ end
+ config.follow_http_x_forwarded_host = Rails.application.secrets.decidim[:follow_http_x_forwarded_host].present?
+ config.maximum_conversation_message_length = Rails.application.secrets.decidim[:maximum_conversation_message_length].to_i
+ config.password_blacklist = Rails.application.secrets.decidim[:password_blacklist] if Rails.application.secrets.decidim[:password_blacklist].present?
+ config.allow_open_redirects = Rails.application.secrets.decidim[:allow_open_redirects] if Rails.application.secrets.decidim[:allow_open_redirects].present?
end
-require "decidim/map/provider/static_map/cfj_osm"
+if Decidim.module_installed? :api
+ Decidim::Api.configure do |config|
+ config.schema_max_per_page = Rails.application.secrets.dig(:decidim, :api, :schema_max_per_page).presence || 50
+ config.schema_max_complexity = Rails.application.secrets.dig(:decidim, :api, :schema_max_complexity).presence || 5000
+ config.schema_max_depth = Rails.application.secrets.dig(:decidim, :api, :schema_max_depth).presence || 15
+ end
+end
+
+if Decidim.module_installed? :proposals
+ Decidim::Proposals.configure do |config|
+ config.similarity_threshold = Rails.application.secrets.dig(:decidim, :proposals, :similarity_threshold).presence || 0.25
+ config.similarity_limit = Rails.application.secrets.dig(:decidim, :proposals, :similarity_limit).presence || 10
+ config.participatory_space_highlighted_proposals_limit = Rails.application.secrets.dig(:decidim, :proposals, :participatory_space_highlighted_proposals_limit).presence || 4
+ config.process_group_highlighted_proposals_limit = Rails.application.secrets.dig(:decidim, :proposals, :process_group_highlighted_proposals_limit).presence || 3
+ end
+end
+
+if Decidim.module_installed? :meetings
+ Decidim::Meetings.configure do |config|
+ config.upcoming_meeting_notification = Rails.application.secrets.dig(:decidim, :meetings, :upcoming_meeting_notification).to_i.days
+ if Rails.application.secrets.dig(:decidim, :meetings, :embeddable_services).present?
+ config.embeddable_services = Rails.application.secrets.dig(:decidim, :meetings, :embeddable_services)
+ end
+ unless Rails.application.secrets.dig(:decidim, :meetings, :enable_proposal_linking) == "auto"
+ config.enable_proposal_linking = Rails.application.secrets.dig(:decidim, :meetings, :enable_proposal_linking).present?
+ end
+ end
+end
+
+if Decidim.module_installed? :budgets
+ Decidim::Budgets.configure do |config|
+ unless Rails.application.secrets.dig(:decidim, :budgets, :enable_proposal_linking) == "auto"
+ config.enable_proposal_linking = Rails.application.secrets.dig(:decidim, :budgets, :enable_proposal_linking).present?
+ end
+ end
+end
+
+if Decidim.module_installed? :accountability
+ Decidim::Accountability.configure do |config|
+ unless Rails.application.secrets.dig(:decidim, :accountability, :enable_proposal_linking) == "auto"
+ config.enable_proposal_linking = Rails.application.secrets.dig(:decidim, :accountability, :enable_proposal_linking).present?
+ end
+ end
+end
+
+if Decidim.module_installed? :consultations
+ Decidim::Consultations.configure do |config|
+ config.stats_cache_expiration_time = Rails.application.secrets.dig(:decidim, :consultations, :stats_cache_expiration_time).to_i.minutes
+ end
+end
+
+if Decidim.module_installed? :initiatives
+ Decidim::Initiatives.configure do |config|
+ unless Rails.application.secrets.dig(:decidim, :initiatives, :creation_enabled) == "auto"
+ config.creation_enabled = Rails.application.secrets.dig(:decidim, :initiatives, :creation_enabled).present?
+ end
+ config.similarity_threshold = Rails.application.secrets.dig(:decidim, :initiatives, :similarity_threshold).presence || 0.25
+ config.similarity_limit = Rails.application.secrets.dig(:decidim, :initiatives, :similarity_limit).presence || 5
+ config.minimum_committee_members = Rails.application.secrets.dig(:decidim, :initiatives, :minimum_committee_members).presence || 2
+ config.default_signature_time_period_length = Rails.application.secrets.dig(:decidim, :initiatives, :default_signature_time_period_length).presence || 120
+ config.default_components = Rails.application.secrets.dig(:decidim, :initiatives, :default_components)
+ config.first_notification_percentage = Rails.application.secrets.dig(:decidim, :initiatives, :first_notification_percentage).presence || 33
+ config.second_notification_percentage = Rails.application.secrets.dig(:decidim, :initiatives, :second_notification_percentage).presence || 66
+ config.stats_cache_expiration_time = Rails.application.secrets.dig(:decidim, :initiatives, :stats_cache_expiration_time).to_i.minutes
+ config.max_time_in_validating_state = Rails.application.secrets.dig(:decidim, :initiatives, :max_time_in_validating_state).to_i.days
+ unless Rails.application.secrets.dig(:decidim, :initiatives, :print_enabled) == "auto"
+ config.print_enabled = Rails.application.secrets.dig(:decidim, :initiatives, :print_enabled).present?
+ end
+ config.do_not_require_authorization = Rails.application.secrets.dig(:decidim, :initiatives, :do_not_require_authorization).present?
+ end
+end
+
+if Decidim.module_installed? :elections
+ Decidim::Elections.configure do |config|
+ config.setup_minimum_hours_before_start = Rails.application.secrets.dig(:elections, :setup_minimum_hours_before_start).presence || 3
+ config.start_vote_maximum_hours_before_start = Rails.application.secrets.dig(:elections, :start_vote_maximum_hours_before_start).presence || 6
+ config.voter_token_expiration_minutes = Rails.application.secrets.dig(:elections, :voter_token_expiration_minutes).presence || 120
+ end
+
+ Decidim::Votings.configure do |config|
+ config.check_census_max_requests = Rails.application.secrets.dig(:elections, :votings, :check_census_max_requests).presence || 5
+ config.throttling_period = Rails.application.secrets.dig(:elections, :votings, :throttling_period).to_i.minutes
+ end
+
+ Decidim::Votings::Census.configure do |config|
+ config.census_access_codes_export_expiry_time = Rails.application.secrets.dig(:elections, :votings, :census, :access_codes_export_expiry_time).to_i.days
+ end
+end
Rails.application.config.i18n.available_locales = Decidim.available_locales
Rails.application.config.i18n.default_locale = Decidim.default_locale
+# Inform Decidim about the assets folder
+Decidim.register_assets_path File.expand_path("app/packs", Rails.application.root)
+
+require "decidim/map/provider/static_map/cfj_osm"
+
## Set default comments limit. It's used in Decidim::Comments component. Default value is 100.
Rails.application.config.default_comments_limit = ENV.fetch("DECIDIM_COMMENTS_LIMIT", 100).to_i
+## Set default OGP description length limit. It's used in Decidim::Blogs components
+Rails.application.config.default_blog_ogp_description_limit = ENV.fetch("DECIDIM_BLOG_OGP_DESCRIPTION_LIMIT", 150).to_i
+
# Overwrite Devise.allow_unconfirmed_access_for
Devise.allow_unconfirmed_access_for = Decidim.unconfirmed_access_for
-# Inform Decidim about the assets folder
-Decidim.register_assets_path File.expand_path("app/packs", Rails.application.root)
-
# Set max_complexity of GraphQL::Schema
Rails.application.config.to_prepare do
Decidim::Api::Schema.max_complexity = 100_000
diff --git a/config/initializers/decidim_override.rb b/config/initializers/decidim_override.rb
index 18de8367ff..8cd4cce1eb 100644
--- a/config/initializers/decidim_override.rb
+++ b/config/initializers/decidim_override.rb
@@ -5,7 +5,7 @@
#
# minimum title length should be 8
Decidim::Proposals::ProposalWizardCreateStepForm.validators.each do |validator|
- if validator.class == ProposalLengthValidator && # rubocop:disable Style/Next
+ if validator.instance_of?(ProposalLengthValidator) && # rubocop:disable Style/Next
validator.attributes.include?(:title)
fixed_options = validator.options.dup
@@ -20,7 +20,7 @@
#
# minimum title length should be 8
Decidim::Proposals::Admin::ProposalForm.validators.each do |validator|
- if validator.class == ActiveModel::Validations::LengthValidator && # rubocop:disable Style/Next
+ if validator.instance_of?(ActiveModel::Validations::LengthValidator) && # rubocop:disable Style/Next
validator.attributes.first.match?(/^title_/)
fixed_options = validator.options.dup
diff --git a/config/initializers/fileutils.rb b/config/initializers/fileutils.rb
deleted file mode 100644
index 1077050d4e..0000000000
--- a/config/initializers/fileutils.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "../../lib/monkey_patching_fileutils"
diff --git a/config/initializers/slack.rb b/config/initializers/slack.rb
index ddba991829..5e49c18f67 100644
--- a/config/initializers/slack.rb
+++ b/config/initializers/slack.rb
@@ -4,6 +4,6 @@
require_relative "../../lib/slack_chat_messenger"
Slack.configure do |config|
- config.token = ENV["SLACK_API_TOKEN"]
+ config.token = ENV.fetch("SLACK_API_TOKEN", nil)
Rails.logger.error "Missing ENV[SLACK_API_TOKEN]!" unless config.token
end
diff --git a/config/initializers/user_answers_serializer.rb b/config/initializers/user_answers_serializer.rb
new file mode 100644
index 0000000000..03a6a0da49
--- /dev/null
+++ b/config/initializers/user_answers_serializer.rb
@@ -0,0 +1,3 @@
+# frozen_string_literal: true
+
+require_relative "../../lib/monkey_patching_user_answers_serializer"
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index 126e307741..0c8182a37d 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -17,21 +17,20 @@ ja:
name: アカウントID
group:
nickname: アカウントID
+ participatory_process:
+ copy_steps: フェーズをコピー
+ import_steps: フェーズをインポート
question:
origin_title: 起案者
origin_url: 元のURL
user:
- name: 表示名
- nickname: アカウントID
+ avatar: アバター
user_extension:
address: 住所
birth_year: 生年(西暦)
gender: 性別
occupation: 職業
real_name: 本名
- organization:
- primary_color: プライマリ
- secondary_color: セカンダリ
minutes:
visible: 表示する
activerecord:
@@ -39,44 +38,21 @@ ja:
decidim/proposals/proposal:
title: タイトル
body: 本文
- date:
- formats:
- decidim_short: "%Y/%m/%d"
- decidim_short_with_month_name_short: "%Y %b %d"
- decidim_with_day_and_month_name: "%Y %b %d %A"
- decidim_with_month_name: "%Y %B %d"
- decidim_with_month_name_short: "%b %d"
decidim:
+ accountability:
+ results:
+ home_header:
+ global_status: 全体の実行状況
+ nav_breadcrumb:
+ global: 全体
admin:
- actions:
- duplicate: 複製
admin_terms_of_use:
actions:
refuse: 同意しない
- dashboard:
- show:
- welcome: Decidim 管理画面へようこそ。
filters:
- admin_accountability:
- admin_role_type:
- label: ロールの種別
- participatory_space_type_eq:
- label: 参加型スペース種別
- role:
- label: ロール
- role_type_eq:
- label: ロールの種別
- label:
- search_field_end_date: '終了日:'
- search_field_start_date: '開始日:'
officializations:
index:
nickname: アカウントID
- search_placeholder:
- user_name_or_user_email_cont: ユーザー名、メールアドレスで検索する
- name_or_nickname_or_email_cont: "%{collection} をメール、表示名、アカウントIDで検索します。"
- menu:
- admin_accountability: 管理者のアカウンタビリティ
officializations:
show_email_modal:
hidden: 非表示
@@ -86,35 +62,19 @@ ja:
last_month: 直近1ヶ月
last_week: 直近1週間
authorization_handlers:
- csv_census:
- name: 組織のセンサス
user_extension_authorization_handler:
explanation: 'ユーザー拡張属性保持用'
name: 'ユーザー拡張属性'
components:
- add_comment_form:
- account_message: ログイン または 新規登録 することでコメントできます。
- comment:
- deleted_user: 退会者
- report:
- reasons:
- does_not_belong: 違法行為、個人情報、または %{organization_name} に属していないと思われる内容が含まれています。
- offensive: 差別的な内容、誹謗中傷などの不適切な内容が含まれています。
- spam: 本来の内容に関係が無い広告、詐欺や悪意のある処理などが含まれています。
comment_order_selector:
order:
best_rated: 評価の高い順
most_discussed: 議論数の多い順
older: 古い順
recent: 新しい順
- down_vote_button:
- text: このコメントに同意しません
debates:
debates:
filters:
- activity: 参加したもの
- citizens: 一般参加者
- official: 事務局
origin: 起案者
versions:
too_large_changeset: 履歴のサイズが大きすぎるため表示できません
@@ -131,34 +91,11 @@ ja:
subtitle: 参加するにはユーザ登録をしてください。
terms: 利用規約
username_placeholder: 共創 歩
- doorkeeper:
- authorizations:
- new:
- connect_your_account_html: "%{organization} にログインしてアカウントに接続します"
- errors:
- not_found:
- content_doesnt_exist: このアドレスは正しくないか削除されています。
events:
comments:
- comment_by_followed_user:
- email_subject: "%{author_name} から %{resource_title} に対して新しいコメントがあります"
- comment_by_followed_user_group:
- email_subject: "%{author_name} から %{resource_title} に対して新しいコメントがあります"
comment_created:
email_intro: "%{resource_title} にコメントがありました。このページでコメントを読むことができます:"
- email_outro: '"%{resource_title}" 、またはその参加者をフォローしているためこの通知を受け取りました。前のリンクからフォローを解除することができます。'
- email_subject: "%{author_name} から %{resource_title} に対して新しいコメントがあります"
- notification_title: %{author_name} %{author_nickname} から %{resource_title} に対して新しいコメントがあります
- debates:
- debate_closed:
- follower:
- email_intro: '「%{resource_title}」のディベートは終了しました。そのページから結論を読むことができます。'
- email_outro: '%{resource_title} をフォローしているため、この通知を受け取りました。前のリンクから通知の受信を停止することができます。'
- email_subject: '「%{resource_title}」のディベートは終了しました'
- notification_title: %{resource_title} のディベートは終了しました。
gamification:
- badge_earned:
- email_outro: サイトでの活動によって、この通知を受け取りました。
level_up:
email_intro: おめでとうございます! あなたは %{badge_name} バッジ のレベル %{current_level} に到達しました!
email_outro: サイトでの活動によって、この通知を受け取りました。
@@ -187,17 +124,6 @@ ja:
email_outro: 検証の競合リスト を確認し、参加者に連絡して詳細を調査し、問題を解決してください。
email_subject: 管理対象参加者に対する検証の試みに失敗しました
notification_title: 参加者 %{resource_title} が管理対象参加者 %{managed_user_name}のデータで自身を検証しようとしました。
- filters:
- linked_classes:
- collaborative_draft: 共同草案
- fingerprint:
- check: フィンガープリントを確認
- following:
- non_public_followings: フォローしているリソースのいくつかは公開されていません。
- initiatives:
- initiatives:
- vote_cabin:
- votes_blocked: ログインが無効になっています
forms:
file_help:
image:
@@ -207,8 +133,11 @@ ja:
filters:
origin: 起案者
origin_values:
- citizens: 一般参加者
official: 事務局
+ user_groups: グループ
+ show:
+ edit_close_meeting: ミーティングレポートを編集
+ join: ミーティングに参加
messaging:
conversation_mailer:
comanagers_new_conversation:
@@ -248,10 +177,26 @@ ja:
refuse:
modal_button: 同意しない
participatory_processes:
+ pages:
+ home:
+ highlighted_processes:
+ active_processes: アクティブな参加型プロセス
+ see_all_processes: 全ての参加型プロセス
+ active_step: アクティブ・フェーズ
+ more_information: もっと見る
+ participate: 参加する
+ participate_in: 参加型プロセス %{resource_name} に参加する
+ processes_button_title: すべてのプロセスを表示する
participatory_processes:
filters:
explanations:
no_active_nor_upcoming_callout: アクティブな参加型プロセスも今後の参加型プロセスもありません。ここでは過去の参加型プロセスのリストを示します。
+ show:
+ local_area: 組織エリア
+ participatory_process_groups:
+ content_blocks:
+ metadata:
+ developer_group: 制作グループ
proposals:
application_helper:
filter_origin_values:
@@ -919,24 +864,17 @@ ja:
- 鳴り出した
- 黄いろ
- 黒く
- layouts:
- decidim:
- notifications_dashboard:
- mark_all_as_read: すべての通知を削除する
+ date:
+ formats:
+ decidim_short_with_month_name_short: "%Y年%-m月%-d日"
+ decidim_with_month_name: "%Y年%-m月%-d日"
+ decidim_with_month_name_short: "%-m月%-d日"
time:
formats:
- day_of_month: "%b %d"
- day_of_week: "%a"
- day_of_week_long: "%e %a"
- day_of_year: "%y.%m.%d"
- decidim_day_of_year: "%Y %B %d"
- decidim_short: "%Y/%m/%d %H:%M"
+ decidim_day_of_year: "%Y年%-m月%-d日"
default: "%Y %b %d (%a) %H:%M:%S %z"
devise:
mailer:
invitation_instructions:
accept_until_format: "%Y/%m/%d %I:%M %p"
long: "%Y/%m/%d %H:%M"
- long_dashed: "%Y-%m-%d %H:%M:%S"
- short: "%Y/%m/%d %H:%M"
- time_of_day: "%H:%M"
diff --git a/config/puma.rb b/config/puma.rb
index fa5f36b84c..0da73d3afa 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -30,7 +30,7 @@
config.rolling_restart_frequency = 24 * 60 * 60
config.reaper_status_logs = true
config.pre_term = lambda do |worker|
- SlackChatMessenger.notify(channel: ENV['SLACK_MESSAGE_CHANNEL'], message: "[#{Rails.env}] Worker #{worker.index}(#{worker.pid}) being killed") # rubocop:disable Style/StringLiterals
+ SlackChatMessenger.notify(channel: ENV.fetch('SLACK_MESSAGE_CHANNEL', nil), message: "[#{Rails.env}] Worker #{worker.index}(#{worker.pid}) being killed") # rubocop:disable Style/StringLiterals
puts "Worker #{worker.index}(#{worker.pid}) being killed"
end
end
@@ -43,7 +43,7 @@
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
-workers ENV.fetch("WEB_CONCURRENCY", 2)
+workers ENV.fetch("WEB_CONCURRENCY", 2) unless Rails.env.development?
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
diff --git a/config/secrets.yml b/config/secrets.yml
index 067423a027..9be0269077 100644
--- a/config/secrets.yml
+++ b/config/secrets.yml
@@ -4,23 +4,138 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
+# no regular words or you will be exposed to dictionary attacks.
# You can use `rails secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
-# if you're sharing your code publicly.
+# if you are sharing your code publicly.
+
+decidim_default: &decidim_default
+ application_name: <%= Decidim::Env.new("DECIDIM_APPLICATION_NAME", "Code for Japan Decidim").to_json %>
+ mailer_sender: <%= Decidim::Env.new("DECIDIM_MAILER_SENDER", "info@diycities.jp").to_s %>
+ available_locales: <%= Decidim::Env.new("DECIDIM_AVAILABLE_LOCALES", "ca,cs,de,en,es,eu,fi,fr,it,ja,nl,pl,pt,ro").to_array.to_json %>
+ default_locale: <%= Decidim::Env.new("DECIDIM_DEFAULT_LOCALE", "en").to_s %>
+ force_ssl: <%= Decidim::Env.new("DECIDIM_FORCE_SSL", "auto").default_or_present_if_exists.to_s %>
+ enable_html_header_snippets: <%= Decidim::Env.new("DECIDIM_ENABLE_HTML_HEADER_SNIPPETS").to_boolean_string %>
+ currency_unit: <%= Decidim::Env.new("DECIDIM_CURRENCY_UNIT", "€").to_s %>
+ cors_enabled: <%= Decidim::Env.new("DECIDIM_CORS_ENABLED").to_boolean_string %>
+ image_uploader_quality: <%= Decidim::Env.new("DECIDIM_IMAGE_UPLOADER_QUALITY", "80").to_i %>
+ maximum_attachment_size: <%= Decidim::Env.new("DECIDIM_MAXIMUM_ATTACHMENT_SIZE", "10").to_i %>
+ maximum_avatar_size: <%= Decidim::Env.new("DECIDIM_MAXIMUM_AVATAR_SIZE", "5").to_i %>
+ max_reports_before_hiding: <%= Decidim::Env.new("DECIDIM_MAX_REPORTS_BEFORE_HIDING", "3").to_i %>
+ track_newsletter_links: <%= Decidim::Env.new("DECIDIM_TRACK_NEWSLETTER_LINKS", "auto").default_or_present_if_exists.to_s %>
+ download_your_data_expiry_time: <%= Decidim::Env.new("DECIDIM_DOWNLOAD_YOUR_DATA_EXPIRY_TIME", "7").to_i %>
+ throttling_max_requests: <%= Decidim::Env.new("DECIDIM_THROTTLING_MAX_REQUESTS", "100").to_i %>
+ throttling_period: <%= Decidim::Env.new("DECIDIM_THROTTLING_PERIOD", "1").to_i %>
+ unconfirmed_access_for: <%= Decidim::Env.new("DECIDIM_UNCONFIRMED_ACCESS_FOR", "0").to_i %>
+ system_accesslist_ips: <%= Decidim::Env.new("DECIDIM_SYSTEM_ACCESSLIST_IPS").to_array.to_json %>
+ base_uploads_path: <%= Decidim::Env.new("DECIDIM_BASE_UPLOADS_PATH").to_json %>
+ default_csv_col_sep: <%= Decidim::Env.new("DECIDIM_DEFAULT_CSV_COL_SEP", ";").to_json %>
+ consent_cookie_name: <%= Decidim::Env.new("DECIDIM_CONSENT_COOKIE_NAME", "decidim-consent").to_json %>
+ cache_key_separator: <%= Decidim::Env.new("DECIDIM_CACHE_KEY_SEPARATOR", "/").to_json %>
+ expire_session_after: <%= Decidim::Env.new("DECIDIM_EXPIRE_SESSION_AFTER", "30").to_i %>
+ session_timeout_interval: <%= Decidim::Env.new("DECIDIM_SESSION_TIMEOUT_INTERVAL", "10").to_i %>
+ enable_remember_me: <%= Decidim::Env.new("DECIDIM_ENABLE_REMEMBER_ME", "auto").default_or_present_if_exists.to_s %>
+ follow_http_x_forwarded_host: <%= Decidim::Env.new("DECIDIM_FOLLOW_HTTP_X_FORWARDED_HOST").to_boolean_string %>
+ maximum_conversation_message_length: <%= Decidim::Env.new("DECIDIM_MAXIMUM_CONVERSATION_MESSAGE_LENGTH", "1000").to_i %>
+ password_similarity_length: <%= Decidim::Env.new("DECIDIM_PASSWORD_SIMILARITY_LENGTH", 4).to_i %>
+ denied_passwords: <%= Decidim::Env.new("DECIDIM_DENIED_PASSWORDS").to_array(separator: ", ").to_json %>
+ allow_open_redirects: <%= Decidim::Env.new("DECIDIM_ALLOW_OPEN_REDIRECTS").to_boolean_string %>
+ social_share_services: <%= Decidim::Env.new("DECIDIM_SOCIAL_SHARE_SERVICES", "Twitter, Facebook, WhatsApp, Telegram").to_array.to_json %>
+ service_worker_enabled: <%= Decidim::Env.new("DECIDIM_SERVICE_WORKER_ENABLED", Rails.env.exclude?("development")).to_boolean_string %>
+ page_blocks: <%= Decidim::Env.new("DECIDIM_PAGE_BLOCKS", "terms-of-service").to_array %>
+ admin_password:
+ expiration_days: <%= Decidim::Env.new("DECIDIM_ADMIN_PASSWORD_EXPIRATION_DAYS", 90).to_i %>
+ min_length: <%= Decidim::Env.new("DECIDIM_ADMIN_PASSWORD_MIN_LENGTH", 15).to_i %>
+ repetition_times: <%= Decidim::Env.new("DECIDIM_ADMIN_PASSWORD_REPETITION_TIMES", 5).to_i %>
+ strong: <%= Decidim::Env.new("DECIDIM_ADMIN_PASSWORD_STRONG", true).to_boolean_string %>
+ redesign_active: <%= Decidim::Env.new("DECIDIM_REDESIGN_ACTIVE").to_boolean_string %>
+ api:
+ schema_max_per_page: <%= Decidim::Env.new("API_SCHEMA_MAX_PER_PAGE", 50).to_i %>
+ schema_max_complexity: <%= Decidim::Env.new("API_SCHEMA_MAX_COMPLEXITY", 5000).to_i %>
+ schema_max_depth: <%= Decidim::Env.new("API_SCHEMA_MAX_DEPTH", 15).to_i %>
+ proposals:
+ similarity_threshold: <%= Decidim::Env.new("PROPOSALS_SIMILARITY_THRESHOLD", 0.25).to_f %>
+ similarity_limit: <%= Decidim::Env.new("PROPOSALS_SIMILARITY_LIMIT", 10).to_i %>
+ participatory_space_highlighted_proposals_limit: <%= Decidim::Env.new("PROPOSALS_PARTICIPATORY_SPACE_HIGHLIGHTED_PROPOSALS_LIMIT", 4).to_i %>
+ process_group_highlighted_proposals_limit: <%= Decidim::Env.new("PROPOSALS_PROCESS_GROUP_HIGHLIGHTED_PROPOSALS_LIMIT", 3).to_i %>
+ meetings:
+ upcoming_meeting_notification: <%= Decidim::Env.new("MEETINGS_UPCOMING_MEETING_NOTIFICATION", 2).to_i %>
+ enable_proposal_linking: <%= Decidim::Env.new("MEETINGS_ENABLE_PROPOSAL_LINKING", "auto").default_or_present_if_exists.to_s %>
+ embeddable_services: <%= Decidim::Env.new("MEETINGS_EMBEDDABLE_SERVICES").to_array(separator: " ").to_json %>
+ budgets:
+ enable_proposal_linking: <%= Decidim::Env.new("BUDGETS_ENABLE_PROPOSAL_LINKING", "auto").default_or_present_if_exists.to_s %>
+ accountability:
+ enable_proposal_linking: <%= Decidim::Env.new("ACCOUNTABILITY_ENABLE_PROPOSAL_LINKING", "auto").default_or_present_if_exists.to_s %>
+ consultations:
+ stats_cache_expiration_time: <%= Decidim::Env.new("CONSULTATIONS_STATS_CACHE_EXPIRATION_TIME", 5).to_i %>
+ initiatives:
+ creation_enabled: <%= Decidim::Env.new("INITIATIVES_CREATION_ENABLED", "auto").default_or_present_if_exists.to_s %>
+ similarity_threshold: <%= Decidim::Env.new("INITIATIVES_SIMILARITY_THRESHOLD", 0.25).to_f %>
+ similarity_limit: <%= Decidim::Env.new("INITIATIVES_SIMILARITY_LIMIT", 5).to_i %>
+ minimum_committee_members: <%= Decidim::Env.new("INITIATIVES_MINIMUM_COMMITTEE_MEMBERS", 2).to_i %>
+ default_signature_time_period_length: <%= Decidim::Env.new("INITIATIVES_DEFAULT_SIGNATURE_TIME_PERIOD_LENGTH", 120).to_i %>
+ default_components: <%= Decidim::Env.new("INITIATIVES_DEFAULT_COMPONENTS", "pages, meetings").to_array.to_json %>
+ first_notification_percentage: <%= Decidim::Env.new("INITIATIVES_FIRST_NOTIFICATION_PERCENTAGE", 33).to_i %>
+ second_notification_percentage: <%= Decidim::Env.new("INITIATIVES_SECOND_NOTIFICATION_PERCENTAGE", 66).to_i %>
+ stats_cache_expiration_time: <%= Decidim::Env.new("INITIATIVES_STATS_CACHE_EXPIRATION_TIME", 5).to_i %>
+ max_time_in_validating_state: <%= Decidim::Env.new("INITIATIVES_MAX_TIME_IN_VALIDATING_STATE", 60).to_i %>
+ print_enabled: <%= Decidim::Env.new("INITIATIVES_PRINT_ENABLED", "auto").default_or_present_if_exists.to_s %>
+ do_not_require_authorization: <%= Decidim::Env.new("INITIATIVES_DO_NOT_REQUIRE_AUTHORIZATION").to_boolean_string %>
+
+elections_default: &elections_default
+ bulletin_board_server: <%= Decidim::Env.new("ELECTIONS_BULLETIN_BOARD_SERVER", 'http://bulletin-board.lvh.me:8000/api').to_s %>
+ bulletin_board_public_key: {"kty":"RSA","n":"zMXsZpYPKkDlSmezX898y7zNOaJ7ENIN4kj4UhQ95Vm4HlgTpIs2VMMsO0eqynMaOR_G1mXdqbpbaJtXijBe4V8323QwGm6WVAa71E7pDXa5g6-uo5f8GePitN0YER9y2yNQN4uTaNzJiWV2uLBUYfMdj3SIif31YwLULHAOj3B_oleFK8coE_Qr3NzATcYBmsqE8AR4NljxTO6KDmP1SLdf5GBOBhOAIFbnL_Kpj2xkm7MS3hjMVKpiRhqA1UgX5oKZ8ixBv46fNJF0pBsHi3fHNjK9oZzgdx_AI-YFpdE_40-8bh_g9sWzxacqOM2-MdQLHbvRPEVltO3E8tr6I5YWrylcP7l9VD8OJeqjq2qFYHnGYdmLoD2XuXmI9EuBvSb9H4-qcartxZSIQCimKib_fxZvgrG1FSRRhK6YpvIdGv4-G2zfCCRsC4XD80TYI2bf-oYCoy7eU3_eVHFMV2yg4p1Wnuw2Vgq0edPL_bKaV9JvGx7F-U5juxNN0WZR9LzbPl4ReejzN95lyHgbj0nTH_u3bSpZmgJrQF-PwdnPcG46deVjJgUeosrlC4lQxVrRz0GL58BuFunnz2uYDBDrcJCiG60EbdkAFHjOcXU4wrUWATin7je_aqdBXhSnkTafcJAMvL7Y2Ld7vDge8nLqjAVlAi5am3rN0kqKT6M","e":"AQAB","kid":"a8e86f02ca27e1861bfc49e2a9a4614ca9068f8efdb6d42d19d3aab0eb2a31be"}
+ authority_private_key: {"kty":"RSA","n":"pNgMt8lnPDD3TlWYGhRiV1oZkPQmnLdiUzwyb_-35qKD9k-HU86xo0uSgoOUWkBtnvFscq8zNDPAGAlZVokaN_z9ksZblSce0LEl8lJa3ICgghg7e8vg_7Lz5dyHSQ3PCLgenyFGcL401aglDde1Xo4ujdz33Lklc4U9zoyoLUI2_viYmNOU6n5Mn0sJd30FeICMrLD2gX46pGe3MGug6groT9EvpKcdOoJHKoO5yGSVaeY5-Bo3gngvlgjlS2mfwjCtF4NYwIQSd2al-p4BKnuYAVKRSgr8rYnnjhWfJ4GsCaqiyXNi5NPYRV6gl_cx_1jUcA1rRJqQR32I8c8QbAXm5qNO4URcdaKys9tNcVgXBL1FsSdbrLVVFWen1tfWNfHm-8BjiWCWD79-uk5gI0SjC9tWvTzVvswWXI5weNqqVXqpDydr46AsHE2sG40HRCR3UF3LupT-HwXTcYcOZr5dJClJIsU3Hrvy4wLssub69YSNR1Jxn-KX2vUc06xY8CNIuSMpfufEq5cZopL6O2l1pRsW1FQnF3s078_Y9MaQ1gPyBo0IipLBVUj5IjEIfPuiEk4jxkiUYDeqzf7bAvSFckp94yLkRWTs_pEZs7b_ogwRG6WMHjtcaNYe4CufhIm9ekkKDeAWOPRTHfKNmohRBh09XuvSjqrx5Z7rqb8","e":"AQAB","kid":"b8dba1459df956d60107690c34fa490db681eac4f73ffaf6e4055728c02ddc8e","d":"Uh3KIBe1VJez6pLbBUrYPlmE2N-3CGSWF46qNX62lq6ofB_b8xTJCuaPonJ3iYoE0aPEeVDrefq5m3-0wFXl-LQPgXlMj_1_7UgB9jeuSZ_N1WDK6P2EJPx5YS09O1gkpVxK7Mx_sZQe77wmUUH-eI7tg__qfUrB7E0Yn_cTpBATI2qlYaQsz6-A7e1MVvixq_ilmzVAZvuBrPp5mCZVb6FlXrV_PU9-UPIrD3O1La1lfO6SPBSbSGQkmGHwD2QbkHn9D_R_Vs-z_0TkM_dX71jIPQhrle3pN222KuJ8eQqwr9QP6biQMBuT5eKgr3MVtfUDRpp4sCEq9GIFwSd8LvbmGPrOoz8ueOEQ05nisIBQuOTYiWpYs2CEV062HR1bLFRLDUcSlflGNr0bgiXTUFx4wxRG06OaI-rQ6nG3M8TE0I0phMNCG3c7YyV28z_k2I65oQF9aKtiwFwc0YsUSGPTOFZGWHuCCPLm0lFeebpI_JIYqIv70NJxbSZEBY8DAIqZPqP6y_CRo2_C7piCgsjg9pnF8cp45vz4L6DWZ0Tumc_5aRuqIBkYXXwP9TjqhzxL-2SQHIqUAjj6Y6S35tZT6ekZSbnPIKX_e42y6bDT_Ztf01QfKiTkcx3_I8RwOuh6CzJzr72AykQpU3XKOKF1x1GBtYyrno4jG5LgaGE","p":"1UARZ-rRnpKG5NHKlXTys3irCy-d91edHL3fEIzDKvhMRQCIWh7dt8l0_sIpcBF-EbVilbFKj7yfgZBTr8EkAXHgweayK8rnlMqi2jte1_u-5DBtrGVVUTSQltSLDOZHK5QfUxVK6Bbk8K5ROLvef91oNgnSNWNOeoCZdlS55nMZcAgY_6mxSuuMq54Tgy8o4Ip890-ZEYY6OSFXhU-ieoGO4Jw--c6QzmCa3gGo2oVClidMNaM1jquK4Pj6xaoxR2NWeIX9Ix7k1P2B24pegyHXjSIpQ6JYdn352VViXi2tx7TTJh6ClNVjgoRmL4Gfy_IJNx0GhF5OB3yughUc7w","q":"xePJGBt466qM9F0BPxWFjyWbIs_GNXr-lBGASui0Z94cfgFbsZwqRsWQEf7jDVQsDNVnPSWZ_Wd6UqoQaIxc0tE8gaokPG6A4EUDyoLaZ231ZydDVoWof8FnPDaJwrcPwZ4R6ZLKGmkfytCZuU9I_9B4uuV0dyjEzKfS-Os3UcLumKPlgJ71OZAb49GTqUHuTePcSJjyYOYXx6eE7i_1m8TjU9Ut18BJNQhLqWmerA6X1ijbR2_syY6GXhGSfciSBH8xVkiUnqXb2jt1bE8nwWw-Sam5ikjzNbXqqs978IcCE5HTddQmy99bwuArA8PLqIFj3OOO1CSo8oyn2XDgMQ","dp":"Diky_rOZN-6DBq7nxQT_GOvqb9O5qbMnu8DgDzlJvJDAf9SJOXLTRmEaY9CA7_A5bvOcmFQtn13nObNb20_4FCB7zGSFcGMI_dh2-Ab5RV5yTrTok4onID1dXKbAlRq1ny825U2Eq-TZTyJEQoA3RkZtpSkBzInLrFbd2f3GWodKKSZggpnCLDd4H-1fXlbDYCXSJpoikAdZ1nFgXnnrUDdKRaAajnwpIYtIvXVewSQYR-BULzunUtIRZt8hx_6FRzhRha9gH_TtPTeYZ_vISuz0Y2rhUpx1Q2kaLlR9M8PUxm47l0xvX3LMKN6h6oWxFtn7wq0qwZ-Bjv24mOrOAQ","dq":"nXGD10hURrwk9W7hxP0sjB2Rdnr06iv3THs4JWFL16_h32bZO1BSWoho_chbgYlMmtFXGFFIWVLxAcAI2gWC_MA4cbmapvIMW2LNh1vgxJW5v95_NuGUlECeEEwcAu1-_b7z5XBCmAy3nLem9sbb_5wv0hMpPH0VRvbnZeBO3SBIkO0lddYCqU-8wN9HqkyoexQleSUnAm1O0iy4GIHT2aEmdNaRaKy2EhmNiTZdZeseZueOvyGPtTVONp2ofacMdcN0z39jr22qo9DWtdusd7nVPOpqkllEF6GrGUeHBnGD92n4YjDuxRnqefu8fXxUFrcLav0p8CNSv9ek291woQ","qi":"w6hfKEBLLHRWPkjajgxZyyetj-UFfVkILRT0plOllJ2JV8whcOXRXbiXH2r8zqMeyMFrrMwmuvv4TVQaruKB0ZQOG7Tz5Lw0RZEREOLnBwc3vSi_iLd-jBz01LdExTpqsAHMkaMQR9x62J8DE1ZNxVdn3ELYKik0f1L2r_WErzhvT1uq69HAybUp6WHcFYH0PSqHg4LOneXAdU1_g-ji2Zn9dlA_2oYGQ5S6JXPV7v2IVbEFpxyVD1lPbFT0iKhyZZevictjgD_JGHveIVqsq5w0Csyz08h0oEW9hYEq-4bquMxSf18gjldoS5uQPD7FUECgL8bxsCdc4hP6UEKYGw"}
+ authority_name: "Decidim Test Authority"
+ authority_api_key: "89Ht70GZNcicu8WEyagz_rRae6brbqZAGuBEICYBCii-PTV3MAstAtx1aRVe5H5YfODi-JgYPvyf9ZMH7tOeZ15e3mf9B2Ymgw7eknvBFMRP213YFGo1SPn_C4uLK90G"
+ scheme_name: "dummy"
+ quorum: 2
+ number_of_trustees: 3
+ setup_minimum_hours_before_start: 1
+
+storage_default: &storage_default
+ provider: <%= Decidim::Env.new("STORAGE_PROVIDER", "local").to_s %>
+ cdn_host: <%= ENV["STORAGE_CDN_HOST"] %>
+ s3:
+ access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
+ secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
+ region: <%= ENV["AWS_REGION"] %>
+ bucket: <%= ENV["AWS_BUCKET"] %>
+ endpoint: <%= ENV["AWS_ENDPOINT"] %>
+ azure:
+ storage_access_key: <%= ENV["AZURE_STORAGE_ACCESS_KEY"] %>
+ storage_account_name: <%= ENV["AZURE_STORAGE_ACCOUNT_NAME"] %>
+ container: <%= ENV["AZURE_CONTAINER"] %>
+ gcs:
+ project: <%= ENV["GCS_PROJECT"] %>
+ bucket: <%= ENV["GCS_BUCKET"] %>
+ type: <%= Decidim::Env.new("GCS_TYPE", "service_account").to_s %>
+ project_id: <%= Decidim::Env.new("GCS_PROJECT_ID").to_s %>
+ private_key_id: <%= Decidim::Env.new("GCS_PRIVATE_KEY_ID").to_s %>
+ private_key: <%= Decidim::Env.new("GCS_PRIVATE_KEY").to_s %>
+ client_email: <%= Decidim::Env.new("GCS_CLIENT_EMAIL").to_s %>
+ client_id: <%= Decidim::Env.new("GCS_CLIENT_ID").to_s %>
+ auth_uri: <%= Decidim::Env.new("GCS_AUTH_URI", "https://accounts.google.com/o/oauth2/auth").to_s %>
+ token_uri: <%= Decidim::Env.new("GCS_TOKEN_URI", "https://accounts.google.com/o/oauth2/token").to_s %>
+ auth_provider_x509_cert_url: <%= Decidim::Env.new("GCS_AUTH_PROVIDER_X509_CERT_URL", "https://www.googleapis.com/oauth2/v1/certs").to_s %>
+ client_x509_cert_url: <%= Decidim::Env.new("GCS_CLIENT_X509_CERT_URL").to_s %>
default: &default
+ decidim:
+ <<: *decidim_default
omniauth:
facebook:
# It must be a boolean. Remember ENV variables doesn't support booleans.
enabled: false
app_id: <%= ENV["OMNIAUTH_FACEBOOK_APP_ID"] %>
app_secret: <%= ENV["OMNIAUTH_FACEBOOK_APP_SECRET"] %>
+ icon: facebook-line
twitter:
enabled: false
api_key: <%= ENV["OMNIAUTH_TWITTER_API_KEY"] %>
api_secret: <%= ENV["OMNIAUTH_TWITTER_API_SECRET"] %>
+ icon: twitter-line
google_oauth2:
enabled: false
icon_path: decidim/brands/google.svg
@@ -34,10 +149,28 @@ default: &default
here_api_key: <%= ENV["GEOCODER_API_KEY"] %>
maps:
api_key: <%= ENV["MAPS_API_KEY"] %>
+ provider: <%= ENV["MAPS_PROVIDER"] %>
+ dynamic_provider: <%= Decidim::Env.new("MAPS_DYNAMIC_PROVIDER", ENV["MAPS_PROVIDER"]).to_s %>
+ static_provider: <%= Decidim::Env.new("MAPS_STATIC_PROVIDER", ENV["MAPS_PROVIDER"]).to_s %>
+ static_api_key: <%= Decidim::Env.new("MAPS_STATIC_API_KEY", ENV["MAPS_API_KEY"]).to_s %>
+ dynamic_api_key: <%= Decidim::Env.new("MAPS_DYNAMIC_API_KEY", ENV["MAPS_API_KEY"]).to_s %>
+ dynamic_url: <%= ENV["MAPS_DYNAMIC_URL"] %>
+ static_url: <%= ENV["MAPS_STATIC_URL"] %>
+ attribution: <%= ENV["MAPS_ATTRIBUTION"].to_json %>
+ extra_vars: <%= ENV["MAPS_EXTRA_VARS"].to_json %>
+ geocoding_host: <%= ENV["MAPS_GEOCODING_HOST"] %>
etherpad:
server: <%= ENV["ETHERPAD_SERVER"] %>
api_key: <%= ENV["ETHERPAD_API_KEY"] %>
- api_version: "1.2.1"
+ api_version: <%= Decidim::Env.new("ETHERPAD_API_VERSION", "1.2.1") %>
+ elections:
+ <<: *elections_default
+ storage:
+ <<: *storage_default
+ vapid:
+ enabled: <%= Decidim::Env.new("VAPID_PUBLIC_KEY").to_boolean_string %>
+ public_key: <%= ENV["VAPID_PUBLIC_KEY"] %>
+ private_key: <%= ENV["VAPID_PRIVATE_KEY"] %>
development:
<<: *default
@@ -45,7 +178,7 @@ development:
omniauth:
developer:
enabled: true
- icon: phone
+ icon: phone-line
line_login:
enabled: true
client_id:
@@ -67,6 +200,10 @@ test:
enabled: true
client_id:
client_secret:
+ elections:
+ <<: *elections_default
+ bulletin_board_server: <%= Decidim::Env.new("ELECTIONS_BULLETIN_BOARD_SERVER", 'http://bulletin-board.lvh.me:5017/api').to_s %>
+
# Do not keep production secrets in the repository,
# instead read values from the environment.
@@ -79,6 +216,23 @@ production:
smtp_password: <%= ENV["SMTP_PASSWORD"] %>
smtp_address: <%= ENV["SMTP_ADDRESS"] %>
smtp_domain: <%= ENV["SMTP_DOMAIN"] %>
- smtp_port: "587"
+ smtp_port: <%= Decidim::Env.new("SMTP_PORT", 587).to_i %>
smtp_starttls_auto: true
- smtp_authentication: "plain"
+ smtp_authentication: <%= Decidim::Env.new("SMTP_AUTHENTICATION", "plain").to_s %>
+ elections:
+ bulletin_board_server: <%= ENV["BULLETIN_BOARD_SERVER"] %>
+ bulletin_board_public_key: <%= ENV["BULLETIN_BOARD_PUBLIC_KEY"] %>
+ authority_api_key: <%= ENV["BULLETIN_BOARD_API_KEY"] %>
+ authority_name: <%= ENV["AUTHORITY_NAME"] %>
+ authority_private_key: <%= ENV["AUTHORITY_PRIVATE_KEY"] %>
+ scheme_name: <%= Decidim::Env.new("ELECTIONS_SCHEME_NAME", "electionguard").to_s %>
+ number_of_trustees: <%= Decidim::Env.new("ELECTIONS_NUMBER_OF_TRUSTEES").to_i %>
+ quorum: <%= Decidim::Env.new("ELECTIONS_QUORUM").to_i %>
+ setup_minimum_hours_before_start: <%= Decidim::Env.new("ELECTIONS_SETUP_MINIMUM_HOURS_BEFORE_START", 1).to_i %>
+ start_vote_maximum_hours_before_start: <%= Decidim::Env.new("ELECTIONS_START_VOTE_MAXIMUM_HOURS_BEFORE_START", 6).to_i %>
+ voter_token_expiration_minutes: <%= Decidim::Env.new("ELECTIONS_VOTER_TOKEN_EXPIRATION_MINUTES", 120).to_i %>
+ votings:
+ check_census_max_requests: <%= Decidim::Env.new("VOTINGS_CHECK_CENSUS_MAX_REQUESTS", 5).to_i %>
+ throttling_period: <%= Decidim::Env.new("VOTINGS_THROTTLING_PERIOD", 1).to_i %>
+ census:
+ access_codes_export_expiry_time: <%= Decidim::Env.new("VOTINGS_CENSUS_ACCESS_CODES_EXPORT_EXPIRY_TIME", 2).to_i %>
diff --git a/config/spring.rb b/config/spring.rb
index ff5ba06b6d..50d36abe86 100644
--- a/config/spring.rb
+++ b/config/spring.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "decidim/spring"
+
%w(
.ruby-version
.rbenv-vars
diff --git a/config/webpack/custom.js b/config/webpack/custom.js
index 6c37a831b9..cac081d39e 100644
--- a/config/webpack/custom.js
+++ b/config/webpack/custom.js
@@ -1,7 +1,6 @@
/* eslint-disable */
-
-const path = require("path");
const { config } = require("@rails/webpacker");
+const { InjectManifest } = require("workbox-webpack-plugin");
module.exports = {
module: {
@@ -93,5 +92,18 @@ module.exports = {
optimization: {
runtimeChunk: false
},
- entry: config.entrypoints
+ entry: config.entrypoints,
+ plugins: [
+ new InjectManifest({
+ swSrc: "src/decidim/sw/sw.js",
+
+ /**
+ * NOTE:
+ * @rails/webpacker outputs to '/packs',
+ * in order to make the SW run properly
+ * they must be put at the project's root folder '/'
+ */
+ swDest: "../sw.js"
+ })
+ ]
}
diff --git a/config/webpacker.yml b/config/webpacker.yml
index 6a1a41f9fc..34b1e9121e 100644
--- a/config/webpacker.yml
+++ b/config/webpacker.yml
@@ -33,7 +33,7 @@ development:
hmr: false
client:
# Should we show a full-screen overlay in the browser when there are compiler errors or warnings?
- overlay: true
+ overlay: false
# May also be a string
# webSocketURL:
# hostname: "0.0.0.0"
diff --git a/db/migrate/20230719081051_add_service_name_to_active_storage_blobs.decidim.rb b/db/migrate/20230719081051_add_service_name_to_active_storage_blobs.decidim.rb
new file mode 100644
index 0000000000..316952eee9
--- /dev/null
+++ b/db/migrate/20230719081051_add_service_name_to_active_storage_blobs.decidim.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20210831181634)
+
+# This migration comes from active_storage (originally 20190112182829)
+class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
+ def up
+ return if column_exists?(:active_storage_blobs, :service_name)
+
+ add_column :active_storage_blobs, :service_name, :string
+ # rubocop:disable Lint/AssignmentInCondition
+ # rubocop:disable Rails/SkipsModelValidations
+ if configured_service = ActiveStorage::Blob.service.name
+ ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
+ end
+ # rubocop:enable Lint/AssignmentInCondition
+ # rubocop:enable Rails/SkipsModelValidations
+ change_column :active_storage_blobs, :service_name, :string, null: false
+ end
+
+ def down
+ remove_column :active_storage_blobs, :service_name
+ end
+end
diff --git a/db/migrate/20230719081052_create_active_storage_variant_records.decidim.rb b/db/migrate/20230719081052_create_active_storage_variant_records.decidim.rb
new file mode 100644
index 0000000000..ef13a6c387
--- /dev/null
+++ b/db/migrate/20230719081052_create_active_storage_variant_records.decidim.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20210831181635)
+
+# This migration comes from active_storage (originally 20191206030411)
+class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
+ def change
+ create_table :active_storage_variant_records do |t|
+ t.belongs_to :blob, null: false, index: false
+ t.string :variation_digest, null: false
+
+ t.index [:blob_id, :variation_digest], name: "index_active_storage_variant_records_uniqueness", unique: true
+ t.foreign_key :active_storage_blobs, column: :blob_id
+ end
+ end
+end
diff --git a/db/migrate/20230719081053_create_decidim_reminders.decidim.rb b/db/migrate/20230719081053_create_decidim_reminders.decidim.rb
new file mode 100644
index 0000000000..c3e7594d82
--- /dev/null
+++ b/db/migrate/20230719081053_create_decidim_reminders.decidim.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20211208155453)
+
+class CreateDecidimReminders < ActiveRecord::Migration[6.0]
+ def change
+ create_table :decidim_reminders do |t|
+ t.belongs_to :decidim_user, index: true, foreign_key: true, null: false
+ t.belongs_to :decidim_component, index: true, foreign_key: true
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20230719081054_create_decidim_reminder_records.decidim.rb b/db/migrate/20230719081054_create_decidim_reminder_records.decidim.rb
new file mode 100644
index 0000000000..63170c9aae
--- /dev/null
+++ b/db/migrate/20230719081054_create_decidim_reminder_records.decidim.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20211209121025)
+
+class CreateDecidimReminderRecords < ActiveRecord::Migration[6.0]
+ def change
+ create_table :decidim_reminder_records do |t|
+ t.string :state, :string, index: true, default: "active"
+ t.belongs_to :decidim_reminder, index: true, foreign_key: true
+ t.belongs_to :remindable, polymorphic: true, null: false, index: { name: "index_decidim_reminder_records_remindable" }
+ end
+ end
+end
diff --git a/db/migrate/20230719081055_create_decidim_reminder_deliveries.decidim.rb b/db/migrate/20230719081055_create_decidim_reminder_deliveries.decidim.rb
new file mode 100644
index 0000000000..aae6e2a977
--- /dev/null
+++ b/db/migrate/20230719081055_create_decidim_reminder_deliveries.decidim.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20211209121040)
+
+class CreateDecidimReminderDeliveries < ActiveRecord::Migration[6.0]
+ def change
+ create_table :decidim_reminder_deliveries do |t|
+ t.belongs_to :decidim_reminder, index: true, foreign_key: true
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20230719081056_change_required_description_categories.decidim.rb b/db/migrate/20230719081056_change_required_description_categories.decidim.rb
new file mode 100644
index 0000000000..65966c9c34
--- /dev/null
+++ b/db/migrate/20230719081056_change_required_description_categories.decidim.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220118121921)
+
+class ChangeRequiredDescriptionCategories < ActiveRecord::Migration[6.0]
+ def change
+ change_column_null :decidim_categories, :description, true
+ end
+end
diff --git a/db/migrate/20230719081057_add_notification_settings_to_users.decidim.rb b/db/migrate/20230719081057_add_notification_settings_to_users.decidim.rb
new file mode 100644
index 0000000000..f5d061a8de
--- /dev/null
+++ b/db/migrate/20230719081057_add_notification_settings_to_users.decidim.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220127113419)
+
+class AddNotificationSettingsToUsers < ActiveRecord::Migration[6.0]
+ def change
+ add_column :decidim_users, :notification_settings, :jsonb, default: {}
+ end
+end
diff --git a/db/migrate/20230719081058_add_notifications_sending_frequency_to_users.decidim.rb b/db/migrate/20230719081058_add_notifications_sending_frequency_to_users.decidim.rb
new file mode 100644
index 0000000000..02ecfe6a10
--- /dev/null
+++ b/db/migrate/20230719081058_add_notifications_sending_frequency_to_users.decidim.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220203121137)
+
+class AddNotificationsSendingFrequencyToUsers < ActiveRecord::Migration[6.0]
+ def change
+ add_column :decidim_users, :notifications_sending_frequency, :string, default: "daily", index: true
+ end
+end
diff --git a/db/migrate/20230719081059_add_digest_sent_at_to_users.decidim.rb b/db/migrate/20230719081059_add_digest_sent_at_to_users.decidim.rb
new file mode 100644
index 0000000000..f75a48be01
--- /dev/null
+++ b/db/migrate/20230719081059_add_digest_sent_at_to_users.decidim.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220215172439)
+
+class AddDigestSentAtToUsers < ActiveRecord::Migration[6.0]
+ def change
+ add_column :decidim_users, :digest_sent_at, :datetime
+ end
+end
diff --git a/db/migrate/20230719081060_add_index_to_decidim_users_notifications_sending_frequency.decidim.rb b/db/migrate/20230719081060_add_index_to_decidim_users_notifications_sending_frequency.decidim.rb
new file mode 100644
index 0000000000..aaa7996781
--- /dev/null
+++ b/db/migrate/20230719081060_add_index_to_decidim_users_notifications_sending_frequency.decidim.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220323195258)
+
+class AddIndexToDecidimUsersNotificationsSendingFrequency < ActiveRecord::Migration[6.0]
+ def change
+ add_index :decidim_users, :notifications_sending_frequency
+ end
+end
diff --git a/db/migrate/20230719081061_drop_emails_on_notifications_flag_from_user.decidim.rb b/db/migrate/20230719081061_drop_emails_on_notifications_flag_from_user.decidim.rb
new file mode 100644
index 0000000000..f5048f88fe
--- /dev/null
+++ b/db/migrate/20230719081061_drop_emails_on_notifications_flag_from_user.decidim.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220427142214)
+
+class DropEmailsOnNotificationsFlagFromUser < ActiveRecord::Migration[5.1]
+ class DecidimUser < ApplicationRecord
+ self.table_name = :decidim_users
+ end
+
+ def change
+ # rubocop:disable Rails/SkipsModelValidations
+ DecidimUser.where(email_on_notification: true).update_all(notifications_sending_frequency: "real_time")
+ # rubocop:enable Rails/SkipsModelValidations
+
+ remove_column :decidim_users, :email_on_notification
+ end
+end
diff --git a/db/migrate/20230719081062_add_previous_passwords_to_users.decidim.rb b/db/migrate/20230719081062_add_previous_passwords_to_users.decidim.rb
new file mode 100644
index 0000000000..bbd0d9ffb1
--- /dev/null
+++ b/db/migrate/20230719081062_add_previous_passwords_to_users.decidim.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220518094535)
+
+class AddPreviousPasswordsToUsers < ActiveRecord::Migration[6.1]
+ class User < ApplicationRecord
+ self.table_name = :decidim_users
+ end
+
+ def change
+ add_column :decidim_users, :password_updated_at, :datetime
+ add_column :decidim_users, :previous_passwords, :string, array: true, default: []
+
+ reversible do |direction|
+ direction.up do
+ # rubocop:disable Rails/SkipsModelValidations
+ User.update_all("password_updated_at = updated_at")
+ # rubocop:enable Rails/SkipsModelValidations
+ end
+ end
+ end
+end
diff --git a/db/migrate/20230719081063_create_decidim_short_links.decidim.rb b/db/migrate/20230719081063_create_decidim_short_links.decidim.rb
new file mode 100644
index 0000000000..dbdc8a116d
--- /dev/null
+++ b/db/migrate/20230719081063_create_decidim_short_links.decidim.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+# This migration comes from decidim (originally 20220524195530)
+
+class CreateDecidimShortLinks < ActiveRecord::Migration[6.1]
+ def change
+ create_table :decidim_short_links do |t|
+ t.references :decidim_organization, null: false, index: true
+ t.references :target, polymorphic: true, null: false, index: true
+ t.string :identifier, limit: 10, null: false
+ t.string :mounted_engine_name, index: true
+ t.string :route_name, index: true
+ t.jsonb :params
+
+ t.timestamps
+ end
+
+ add_index(
+ :decidim_short_links,
+ [:decidim_organization_id, :identifier],
+ unique: true,
+ name: "idx_decidim_short_links_organization_id_identifier"
+ )
+ end
+end
diff --git a/db/migrate/20230719081064_create_decidim_participatory_process_types.decidim_participatory_processes.rb b/db/migrate/20230719081064_create_decidim_participatory_process_types.decidim_participatory_processes.rb
new file mode 100644
index 0000000000..4b741d5812
--- /dev/null
+++ b/db/migrate/20230719081064_create_decidim_participatory_process_types.decidim_participatory_processes.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+# This migration comes from decidim_participatory_processes (originally 20211125202008)
+
+class CreateDecidimParticipatoryProcessTypes < ActiveRecord::Migration[6.0]
+ def change
+ create_table :decidim_participatory_process_types do |t|
+ t.jsonb :title, null: false
+ t.references(
+ :decidim_organization,
+ foreign_key: true,
+ index: { name: "index_decidim_process_types_on_decidim_organization_id" }
+ )
+ t.timestamps
+ end
+
+ add_reference(
+ :decidim_participatory_processes,
+ :decidim_participatory_process_type,
+ foreign_key: true,
+ index: { name: "index_decidim_processes_on_decidim_process_type_id" }
+ )
+ end
+end
diff --git a/db/migrate/20230719081065_remove_not_null_on_customize_registration_email.decidim_meetings.rb b/db/migrate/20230719081065_remove_not_null_on_customize_registration_email.decidim_meetings.rb
new file mode 100644
index 0000000000..b75856cd17
--- /dev/null
+++ b/db/migrate/20230719081065_remove_not_null_on_customize_registration_email.decidim_meetings.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# This migration comes from decidim_meetings (originally 20211105115625)
+
+class RemoveNotNullOnCustomizeRegistrationEmail < ActiveRecord::Migration[6.0]
+ def change
+ change_column_null :decidim_meetings_meetings, :customize_registration_email, true
+ end
+end
diff --git a/db/migrate/20230719081066_add_geolocalization_fields_to_projects.decidim_budgets.rb b/db/migrate/20230719081066_add_geolocalization_fields_to_projects.decidim_budgets.rb
new file mode 100644
index 0000000000..2a7b59f01d
--- /dev/null
+++ b/db/migrate/20230719081066_add_geolocalization_fields_to_projects.decidim_budgets.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+# This migration comes from decidim_budgets (originally 20220428072638)
+
+class AddGeolocalizationFieldsToProjects < ActiveRecord::Migration[6.1]
+ def change
+ add_column :decidim_budgets_projects, :address, :text
+ add_column :decidim_budgets_projects, :latitude, :float
+ add_column :decidim_budgets_projects, :longitude, :float
+ end
+end
diff --git a/db/migrate/20230719081067_add_title_to_timeline_entries.decidim_accountability.rb b/db/migrate/20230719081067_add_title_to_timeline_entries.decidim_accountability.rb
new file mode 100644
index 0000000000..d003be8bd4
--- /dev/null
+++ b/db/migrate/20230719081067_add_title_to_timeline_entries.decidim_accountability.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# This migration comes from decidim_accountability (originally 20220331150008)
+
+class AddTitleToTimelineEntries < ActiveRecord::Migration[6.1]
+ def change
+ add_column :decidim_accountability_timeline_entries, :title, :jsonb
+ end
+end
diff --git a/db/migrate/20230719081068_move_legacy_description_to_title_of_timeline_entries.decidim_accountability.rb b/db/migrate/20230719081068_move_legacy_description_to_title_of_timeline_entries.decidim_accountability.rb
new file mode 100644
index 0000000000..ca121c7585
--- /dev/null
+++ b/db/migrate/20230719081068_move_legacy_description_to_title_of_timeline_entries.decidim_accountability.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+# This migration comes from decidim_accountability (originally 20220331150155)
+
+class MoveLegacyDescriptionToTitleOfTimelineEntries < ActiveRecord::Migration[6.1]
+ class TimelineEntry < ApplicationRecord
+ self.table_name = :decidim_accountability_timeline_entries
+ end
+
+ def up
+ TimelineEntry.find_each do |timeline_entry|
+ timeline_entry.update!(title: timeline_entry.description, description: nil)
+ end
+ end
+end
diff --git a/db/migrate/20230808035643_create_decidim_templates.decidim_templates.rb b/db/migrate/20230808035643_create_decidim_templates.decidim_templates.rb
new file mode 100644
index 0000000000..1eac5dd88b
--- /dev/null
+++ b/db/migrate/20230808035643_create_decidim_templates.decidim_templates.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+# This migration comes from decidim_templates (originally 20200518093819)
+
+class CreateDecidimTemplates < ActiveRecord::Migration[5.2]
+ def change
+ create_table :decidim_templates_templates do |t|
+ t.integer :decidim_organization_id, null: false, index: { name: "index_decidim_templates_organization" }
+ t.references :templatable, polymorphic: true, index: { name: "index_decidim_templates_templatable" }
+ t.jsonb :name, null: false
+ t.jsonb :description
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0c65bf3829..5a0c93a436 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -2,15 +2,15 @@
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
-# This file is the source Rails uses to define your schema when running `rails
-# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
+# This file is the source Rails uses to define your schema when running `bin/rails
+# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2023_05_22_090010) do
+ActiveRecord::Schema.define(version: 2023_08_08_035643) do
# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
@@ -35,9 +35,16 @@
t.bigint "byte_size", null: false
t.string "checksum", null: false
t.datetime "created_at", null: false
+ t.string "service_name", null: false
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
end
+ create_table "active_storage_variant_records", force: :cascade do |t|
+ t.bigint "blob_id", null: false
+ t.string "variation_digest", null: false
+ t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
+ end
+
create_table "decidim_accountability_results", id: :serial, force: :cascade do |t|
t.jsonb "title"
t.jsonb "description"
@@ -79,6 +86,7 @@
t.integer "decidim_accountability_result_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.jsonb "title"
t.index ["decidim_accountability_result_id"], name: "index_decidim_accountability_timeline_entries_on_results_id"
t.index ["entry_date"], name: "index_decidim_accountability_timeline_entries_on_entry_date"
end
@@ -375,13 +383,16 @@
t.date "selected_at"
t.integer "comments_count", default: 0, null: false
t.integer "follows_count", default: 0, null: false
+ t.text "address"
+ t.float "latitude"
+ t.float "longitude"
t.index ["decidim_budgets_budget_id"], name: "index_decidim_budgets_projects_on_decidim_budgets_budget_id"
t.index ["decidim_scope_id"], name: "index_decidim_budgets_projects_on_decidim_scope_id"
end
create_table "decidim_categories", id: :serial, force: :cascade do |t|
t.jsonb "name", null: false
- t.jsonb "description", null: false
+ t.jsonb "description"
t.integer "parent_id"
t.integer "decidim_participatory_space_id"
t.string "decidim_participatory_space_type"
@@ -788,7 +799,7 @@
t.string "registration_type", default: "registration_disabled", null: false
t.string "registration_url"
t.integer "follows_count", default: 0, null: false
- t.boolean "customize_registration_email", default: false, null: false
+ t.boolean "customize_registration_email", default: false
t.jsonb "registration_email_custom_content"
t.datetime "published_at"
t.string "video_url"
@@ -1061,6 +1072,14 @@
t.index ["position"], name: "index_order_by_position_for_steps"
end
+ create_table "decidim_participatory_process_types", force: :cascade do |t|
+ t.jsonb "title", null: false
+ t.bigint "decidim_organization_id"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["decidim_organization_id"], name: "index_decidim_process_types_on_decidim_organization_id"
+ end
+
create_table "decidim_participatory_process_user_roles", id: :serial, force: :cascade do |t|
t.integer "decidim_user_id"
t.integer "decidim_participatory_process_id"
@@ -1105,10 +1124,12 @@
t.boolean "show_metrics", default: true
t.integer "weight", default: 1, null: false
t.integer "follows_count", default: 0, null: false
+ t.bigint "decidim_participatory_process_type_id"
t.index ["decidim_area_id"], name: "index_decidim_participatory_processes_on_decidim_area_id"
t.index ["decidim_organization_id", "slug"], name: "index_unique_process_slug_and_organization", unique: true
t.index ["decidim_organization_id"], name: "index_decidim_processes_on_decidim_organization_id"
t.index ["decidim_participatory_process_group_id"], name: "idx_process_on_process_group_id"
+ t.index ["decidim_participatory_process_type_id"], name: "index_decidim_processes_on_decidim_process_type_id"
t.index ["decidim_scope_id"], name: "idx_process_on_scope_id"
t.index ["decidim_scope_type_id"], name: "index_decidim_participatory_processes_on_decidim_scope_type_id"
end
@@ -1249,6 +1270,34 @@
t.index ["valuator_role_type", "valuator_role_id"], name: "decidim_proposals_valuation_assignment_valuator_role"
end
+ create_table "decidim_reminder_deliveries", force: :cascade do |t|
+ t.bigint "decidim_reminder_id"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["decidim_reminder_id"], name: "index_decidim_reminder_deliveries_on_decidim_reminder_id"
+ end
+
+ create_table "decidim_reminder_records", force: :cascade do |t|
+ t.string "state", default: "active"
+ t.string "string", default: "active"
+ t.bigint "decidim_reminder_id"
+ t.string "remindable_type", null: false
+ t.bigint "remindable_id", null: false
+ t.index ["decidim_reminder_id"], name: "index_decidim_reminder_records_on_decidim_reminder_id"
+ t.index ["remindable_type", "remindable_id"], name: "index_decidim_reminder_records_remindable"
+ t.index ["state"], name: "index_decidim_reminder_records_on_state"
+ t.index ["string"], name: "index_decidim_reminder_records_on_string"
+ end
+
+ create_table "decidim_reminders", force: :cascade do |t|
+ t.bigint "decidim_user_id", null: false
+ t.bigint "decidim_component_id"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["decidim_component_id"], name: "index_decidim_reminders_on_decidim_component_id"
+ t.index ["decidim_user_id"], name: "index_decidim_reminders_on_decidim_user_id"
+ end
+
create_table "decidim_reports", id: :serial, force: :cascade do |t|
t.integer "decidim_moderation_id", null: false
t.integer "decidim_user_id", null: false
@@ -1342,6 +1391,23 @@
t.index ["token_for_type", "token_for_id"], name: "decidim_share_tokens_token_for"
end
+ create_table "decidim_short_links", force: :cascade do |t|
+ t.bigint "decidim_organization_id", null: false
+ t.string "target_type", null: false
+ t.bigint "target_id", null: false
+ t.string "identifier", limit: 10, null: false
+ t.string "mounted_engine_name"
+ t.string "route_name"
+ t.jsonb "params"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["decidim_organization_id", "identifier"], name: "idx_decidim_short_links_organization_id_identifier", unique: true
+ t.index ["decidim_organization_id"], name: "index_decidim_short_links_on_decidim_organization_id"
+ t.index ["mounted_engine_name"], name: "index_decidim_short_links_on_mounted_engine_name"
+ t.index ["route_name"], name: "index_decidim_short_links_on_route_name"
+ t.index ["target_type", "target_id"], name: "index_decidim_short_links_on_target"
+ end
+
create_table "decidim_sortitions_sortitions", force: :cascade do |t|
t.bigint "decidim_component_id"
t.integer "decidim_proposals_component_id"
@@ -1415,6 +1481,18 @@
t.index ["reset_password_token"], name: "index_decidim_system_admins_on_reset_password_token", unique: true
end
+ create_table "decidim_templates_templates", force: :cascade do |t|
+ t.integer "decidim_organization_id", null: false
+ t.string "templatable_type"
+ t.bigint "templatable_id"
+ t.jsonb "name", null: false
+ t.jsonb "description"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["decidim_organization_id"], name: "index_decidim_templates_organization"
+ t.index ["templatable_type", "templatable_id"], name: "index_decidim_templates_templatable"
+ end
+
create_table "decidim_term_customizer_constraints", force: :cascade do |t|
t.bigint "decidim_organization_id", null: false
t.string "subject_type"
@@ -1510,7 +1588,6 @@
t.boolean "admin", default: false, null: false
t.boolean "managed", default: false, null: false
t.string "roles", default: [], array: true
- t.boolean "email_on_notification", default: false, null: false
t.string "nickname", limit: 20, default: "", null: false
t.string "personal_url"
t.text "about"
@@ -1535,6 +1612,11 @@
t.integer "block_id"
t.boolean "email_on_moderations", default: true
t.integer "follows_count", default: 0, null: false
+ t.jsonb "notification_settings", default: {}
+ t.string "notifications_sending_frequency", default: "daily"
+ t.datetime "digest_sent_at"
+ t.datetime "password_updated_at"
+ t.string "previous_passwords", default: [], array: true
t.index ["confirmation_token"], name: "index_decidim_users_on_confirmation_token", unique: true
t.index ["decidim_organization_id"], name: "index_decidim_users_on_decidim_organization_id"
t.index ["email", "decidim_organization_id"], name: "index_decidim_users_on_email_and_decidim_organization_id", unique: true, where: "((deleted_at IS NULL) AND (managed = false) AND ((type)::text = 'Decidim::User'::text))"
@@ -1544,6 +1626,7 @@
t.index ["invited_by_id", "invited_by_type"], name: "index_decidim_users_on_invited_by_id_and_invited_by_type"
t.index ["invited_by_id"], name: "index_decidim_users_on_invited_by_id"
t.index ["nickname", "decidim_organization_id"], name: "index_decidim_users_on_nickame_and_decidim_organization_id", unique: true, where: "((deleted_at IS NULL) AND (managed = false))"
+ t.index ["notifications_sending_frequency"], name: "index_decidim_users_on_notifications_sending_frequency"
t.index ["officialized_at"], name: "index_decidim_users_on_officialized_at"
t.index ["reset_password_token"], name: "index_decidim_users_on_reset_password_token", unique: true
t.index ["unlock_token"], name: "index_decidim_users_on_unlock_token", unique: true
@@ -1630,6 +1713,7 @@
end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
+ add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "decidim_area_types", "decidim_organizations"
add_foreign_key "decidim_areas", "decidim_area_types", column: "area_type_id"
add_foreign_key "decidim_areas", "decidim_organizations"
@@ -1650,8 +1734,14 @@
add_foreign_key "decidim_identities", "decidim_organizations"
add_foreign_key "decidim_newsletters", "decidim_users", column: "author_id"
add_foreign_key "decidim_participatory_process_steps", "decidim_participatory_processes"
+ add_foreign_key "decidim_participatory_process_types", "decidim_organizations"
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_reminder_deliveries", "decidim_reminders"
+ add_foreign_key "decidim_reminder_records", "decidim_reminders"
+ add_foreign_key "decidim_reminders", "decidim_components"
+ add_foreign_key "decidim_reminders", "decidim_users"
add_foreign_key "decidim_scope_types", "decidim_organizations"
add_foreign_key "decidim_scopes", "decidim_organizations"
add_foreign_key "decidim_scopes", "decidim_scope_types", column: "scope_type_id"
diff --git a/db/seeds.rb b/db/seeds.rb
index f1a59e5c62..5ad12880fa 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -11,7 +11,7 @@
Decidim.seed!
-if !Rails.env.production? || ENV["SEED"]
+if !Rails.env.production? || ENV.fetch("SEED")
print "Creating seeds for decidim-cfj...\n" unless Rails.env.test?
require "decidim/faker/localized"
@@ -19,7 +19,7 @@
Decidim::User.find_each do |user|
user_extension = {
real_name: "#{user.name}_実名",
- address: Faker::Lorem.words(number: 4).join(""),
+ address: Faker::Lorem.words(number: 4).join,
gender: [0, 1, 2].sample,
birth_year: (1980..2010).to_a.sample,
occupation: ["会社員", "学生", "公務員", "自営業", "無職", nil].sample
diff --git a/decidim-comments/app/cells/decidim/comments/comment/actions.erb b/decidim-comments/app/cells/decidim/comments/comment/actions.erb
index 6d4a91c034..b98727795f 100644
--- a/decidim-comments/app/cells/decidim/comments/comment/actions.erb
+++ b/decidim-comments/app/cells/decidim/comments/comment/actions.erb
@@ -1,4 +1,9 @@
<% end %>
-
<%= t("decidim.components.comments.loading") %>
+Un commentaire pour #{author_link}
Comment mentioning some user group, #{author_link}
Un commentaire pour #{author_link}
Comment mentioning some user, #{author_link}
<%= t("decidim.account.email_change.title") %>
+<%= t("decidim.account.email_change.body1", unconfirmed_email: current_user.unconfirmed_email) %>
++ <%== t( + "decidim.account.email_change.body2", + resend_link: link_to(t("decidim.account.email_change.send_again"), resend_confirmation_instructions_account_path, role: :button, method: :post, remote: true), + cancel_link: link_to(t("decidim.account.email_change.cancel"), cancel_email_change_account_path, role: :button, method: :post, remote: true)) %> +
+- <%= t ".change_password" %> +