Commit Graph

20028 Commits

Author SHA1 Message Date
Javi Martín
f341634f0a Merge pull request #5592 from consuldemocracy/dependabot/npm_and_yarn/stylelint-scss-6.3.2
Bump stylelint-scss from 6.2.1 to 6.3.2
2024-07-05 16:10:41 +02:00
Javi Martín
c524db9c7b Add scss/at-mixin-no-risky-nesting-selector rule
This rule was added in stylelint-scss 6.3.0. We've always used it so
far, so we're adding it to make sure we remain using it, since it
prevents a pattern in mixins that makes the code confusing.
2024-07-05 15:54:26 +02:00
dependabot[bot]
761f77779f Bump stylelint-scss from 6.2.1 to 6.3.2
Bumps [stylelint-scss](https://github.com/stylelint-scss/stylelint-scss) from 6.2.1 to 6.3.2.
- [Release notes](https://github.com/stylelint-scss/stylelint-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-scss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-scss/compare/v6.2.1...v6.3.2)

---
updated-dependencies:
- dependency-name: stylelint-scss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 15:54:26 +02:00
Javi Martín
2419084745 Don't add the ruby label to dependabot pull requests
The "ruby" label was redundant because most our dependencies are ruby
gems. We're still keeping the "javascript" dependencies for npm
dependencies, though.
2024-07-04 17:19:49 +02:00
Javi Martín
3c17de5435 Use dependabot to update github actions dependencies
This way we don't have to update them manually.
2024-07-04 17:19:49 +02:00
Javi Martín
bc1489ce83 Merge pull request #5483 from consuldemocracy/stylelint_code_climate
Don't run linters in Code Climate
2024-07-04 17:02:09 +02:00
Javi Martín
8d4d1b7e4b Don't run linters in Code Climate
We're now running the linters in github actions, and code climate
doesn't use the same versions of the gems or npm packages that we're
using in the application. For example, only a few limited rubocop
versions are available, and sometimes code climate breaks because our
rubocop version isn't compatible with theirs. Now we're also using a
version of stylelint they don't support.

All in all, the linters check in code climate isn't helpful at all
anymmore.
2024-07-04 16:50:51 +02:00
Javi Martín
8f1739cc6a Use Stylelint instead of SCSS Lint in Code Climate
We forgot to do so in commit e210682ac.
2024-07-04 16:50:51 +02:00
Javi Martín
3b802987a7 Merge pull request #5608 from consuldemocracy/prs_in_kanban
Remove kanban management github action workflow
2024-07-04 15:52:16 +02:00
Javi Martín
96b43b3c95 Merge pull request #5559 from consuldemocracy/dependabot/bundler/recipient_interceptor-0.3.2
Bump recipient_interceptor from 0.3.1 to 0.3.2
2024-07-02 23:44:41 +02:00
dependabot[bot]
52ef2364a3 Bump recipient_interceptor from 0.3.1 to 0.3.2
Bumps [recipient_interceptor](https://github.com/croaky/recipient_interceptor) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/croaky/recipient_interceptor/releases)
- [Commits](https://github.com/croaky/recipient_interceptor/compare/v0.3.1...v0.3.2)

---
updated-dependencies:
- dependency-name: recipient_interceptor
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 21:27:08 +00:00
Javi Martín
29b3fbe1cd Merge pull request #5550 from consuldemocracy/dependabot/npm_and_yarn/stylelint-16.6.1
Bump stylelint from 16.3.1 to 16.6.1
2024-07-02 23:25:35 +02:00
dependabot[bot]
376595fc34 Bump stylelint from 16.3.1 to 16.6.1
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.3.1 to 16.6.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.3.1...16.6.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 23:07:21 +02:00
Javi Martín
ec8473dd85 Merge pull request #5518 from consuldemocracy/dependabot/npm_and_yarn/stylistic/stylelint-plugin-2.1.2
Bump @stylistic/stylelint-plugin from 2.1.1 to 2.1.2
2024-07-02 22:23:53 +02:00
dependabot[bot]
c9c8711356 Bump @stylistic/stylelint-plugin from 2.1.1 to 2.1.2
Bumps [@stylistic/stylelint-plugin](https://github.com/stylelint-stylistic/stylelint-stylistic) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/stylelint-stylistic/stylelint-stylistic/releases)
- [Changelog](https://github.com/stylelint-stylistic/stylelint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-stylistic/stylelint-stylistic/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: "@stylistic/stylelint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 20:06:23 +00:00
Javi Martín
6dace929a7 Merge pull request #5604 from consuldemocracy/dependabot/bundler/selenium-webdriver-4.22.0
Bump selenium-webdriver from 4.16.0 to 4.22.0
2024-07-02 21:47:05 +02:00
Javi Martín
ad4680788e Merge pull request #5606 from consuldemocracy/dependabot/bundler/knapsack_pro-7.6.2
Bump knapsack_pro from 7.0.1 to 7.6.2
2024-07-02 21:46:17 +02:00
dependabot[bot]
4e7f5d2454 Bump selenium-webdriver from 4.16.0 to 4.22.0
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.16.0 to 4.22.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.16.0...selenium-4.22.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 19:26:27 +00:00
dependabot[bot]
6dd8f5607c Bump knapsack_pro from 7.0.1 to 7.6.2
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 7.0.1 to 7.6.2.
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.0.1...v7.6.2)

---
updated-dependencies:
- dependency-name: knapsack_pro
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 19:26:14 +00:00
Javi Martín
c8d7a1c4d6 Merge pull request #5566 from consuldemocracy/dependabot/bundler/letter_opener_web-3.0.0
Bump letter_opener_web from 2.0.0 to 3.0.0
2024-07-02 21:24:36 +02:00
dependabot[bot]
ad9697b3e1 Bump letter_opener_web from 2.0.0 to 3.0.0
Bumps [letter_opener_web](https://github.com/fgrehm/letter_opener_web) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/fgrehm/letter_opener_web/releases)
- [Changelog](https://github.com/fgrehm/letter_opener_web/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fgrehm/letter_opener_web/compare/v2.0.0...v3.0.0)

---
updated-dependencies:
- dependency-name: letter_opener_web
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 19:02:29 +00:00
Javi Martín
ff004c00d8 Merge pull request #5527 from consuldemocracy/dependabot/bundler/spring-4.2.1
Bump spring from 4.1.3 to 4.2.1
2024-07-02 20:57:58 +02:00
dependabot[bot]
05d6eddc63 Bump spring from 4.1.3 to 4.2.1
Bumps [spring](https://github.com/rails/spring) from 4.1.3 to 4.2.1.
- [Release notes](https://github.com/rails/spring/releases)
- [Changelog](https://github.com/rails/spring/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rails/spring/compare/v4.1.3...v4.2.1)

---
updated-dependencies:
- dependency-name: spring
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 18:36:07 +00:00
Javi Martín
9bb0484688 Merge pull request #5609 from consuldemocracy/dependabot/bundler/capistrano-3.19.1
Bump capistrano from 3.18.1 to 3.19.1
2024-07-02 20:21:36 +02:00
dependabot[bot]
e0fa4e43ab Bump capistrano from 3.18.1 to 3.19.1
Bumps [capistrano](https://github.com/capistrano/capistrano) from 3.18.1 to 3.19.1.
- [Release notes](https://github.com/capistrano/capistrano/releases)
- [Commits](https://github.com/capistrano/capistrano/compare/v3.18.1...v3.19.1)

---
updated-dependencies:
- dependency-name: capistrano
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 20:08:49 +02:00
Javi Martín
fb978c8051 Merge pull request #5594 from consuldemocracy/dependabot/bundler/rspec-rails-6.1.3
Bump rspec-rails from 6.1.2 to 6.1.3
2024-07-02 19:46:55 +02:00
dependabot[bot]
b22a0660e0 Bump rspec-rails from 6.1.2 to 6.1.3
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 6.1.2 to 6.1.3.
- [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v6.1.2...v6.1.3)

---
updated-dependencies:
- dependency-name: rspec-rails
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 15:02:25 +00:00
Javi Martín
bf47d82989 Merge pull request #5599 from consuldemocracy/dependabot/bundler/rubocop-factory_bot-2.26.1
Bump rubocop-factory_bot from 2.25.1 to 2.26.1
2024-07-02 16:59:39 +02:00
dependabot[bot]
265743314a Bump rubocop-factory_bot from 2.25.1 to 2.26.1
Bumps [rubocop-factory_bot](https://github.com/rubocop/rubocop-factory_bot) from 2.25.1 to 2.26.1.
- [Release notes](https://github.com/rubocop/rubocop-factory_bot/releases)
- [Changelog](https://github.com/rubocop/rubocop-factory_bot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-factory_bot/compare/v2.25.1...v2.26.1)

---
updated-dependencies:
- dependency-name: rubocop-factory_bot
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 14:37:32 +00:00
Javi Martín
1d16835fd9 Merge pull request #5596 from consuldemocracy/dependabot/bundler/rubocop-performance-1.21.1
Bump rubocop-performance from 1.20.2 to 1.21.1
2024-07-02 16:35:16 +02:00
dependabot[bot]
e63f7715de Bump rubocop-performance from 1.20.2 to 1.21.1
Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.20.2 to 1.21.1.
- [Release notes](https://github.com/rubocop/rubocop-performance/releases)
- [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.20.2...v1.21.1)

---
updated-dependencies:
- dependency-name: rubocop-performance
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 14:18:02 +00:00
Javi Martín
aa6b87ef23 Merge pull request #5595 from consuldemocracy/dependabot/bundler/rubocop-capybara-2.21.0
Bump rubocop-capybara from 2.20.0 to 2.21.0
2024-07-02 16:16:27 +02:00
dependabot[bot]
7f5bf2ec5c Bump rubocop-capybara from 2.20.0 to 2.21.0
Bumps [rubocop-capybara](https://github.com/rubocop/rubocop-capybara) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/rubocop/rubocop-capybara/releases)
- [Changelog](https://github.com/rubocop/rubocop-capybara/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-capybara/compare/v2.20.0...v2.21.0)

---
updated-dependencies:
- dependency-name: rubocop-capybara
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 13:58:28 +00:00
Javi Martín
fe660096c9 Merge pull request #5565 from consuldemocracy/dependabot/bundler/faker-3.4.1
Bump faker from 3.3.1 to 3.4.1
2024-07-02 15:40:53 +02:00
Javi Martín
bdcedafc8d Remove kanban management github action workflow
This workflow only supports classic projects [1], but we're migrating to
new projects because github will automatically close classic projects on
August 23 [2].

[1] Issue 89 in https://github.com/srggrs/assign-one-project-github-action/
[2] https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/
2024-07-02 15:30:02 +02:00
dependabot[bot]
0505132173 Bump faker from 3.3.1 to 3.4.1
Bumps [faker](https://github.com/faker-ruby/faker) from 3.3.1 to 3.4.1.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v3.3.1...v3.4.1)

---
updated-dependencies:
- dependency-name: faker
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 13:21:31 +00:00
Sebastia
cc71d98d69 Merge pull request #5586 from consuldemocracy/release_2.2.0
Release version 2.2.0
2024-07-01 16:43:51 +02:00
taitus
b20fb4e943 Release version 2.2.0 2024-06-28 16:58:20 +02:00
Sebastia
5c88028e96 Merge pull request #5589 from consuldemocracy/i18n_crowdin
Update translations from Crowdin
2024-06-28 16:55:07 +02:00
Consul Bot
0cc421f372 Update translations from Crowdin 2024-06-28 16:10:24 +02:00
Javi Martín
82b73e5ddc Merge pull request #5587 from consuldemocracy/zeitwerk_docs
Update documentation to load custom code
2024-06-28 14:24:18 +02:00
Javi Martín
f78e2bed94 Update documentation to load custom code
Just like mentioned in commit 6552e3197d, we need to use `load` instead
of `require_dependency` since we started using zeitwerk.
2024-06-28 03:49:20 +02:00
Javi Martín
20c55da48b Merge pull request #5539 from consuldemocracy/add_option_id_to_poll_answers
Avoid duplicate records in poll answers
2024-06-27 15:35:24 +02:00
Javi Martín
5dbd2ede14 Delete duplicate records in different languages 2024-06-27 15:22:02 +02:00
Javi Martín
58f88d6805 Add task to add option_id to existing answers
Note: to avoid confusion, "answer" will mean a row in the poll_answers
table and "choice" will mean whatever is in the "answer" column of that
table (I'm applying the same convention in the code of the task).

In order make this task perform reasonably on installations with
millions of votes, we're using `update_all` to update all the answers
with the same choice at once. In order to do that, we first need to
check the existing choices and what are the possible option_ids for
those choices.

Note that, in order for this task to work, we need to remote the
duplicate answers first. Otherwise, we will run into a RecordNotUnique
exception when trying to add the same option_id to two duplicate
answers.

So we're making this task depend on the one that removes duplicate
answers. That means we no longer need to specify the task to remove
duplicate answers in the release tasks; it will automatically be
executed when running the task to add an option_id.
2024-06-27 15:05:56 +02:00
Javi Martín
d2ec73e92c Add task to delete duplicate poll answers 2024-06-26 20:20:24 +02:00
Javi Martín
81abbd5021 Remove unused block variable in poll ABC factory 2024-06-26 20:20:24 +02:00
Javi Martín
5033691666 Avoid duplicate records in poll answers
Until now, we've stored the text of the answer somebody replied to. The
idea was to handle the scenarios where the user voters for an option but
then that option is deleted and restored, or the texts of the options
are accidentally edited and so the option "Yes" is now "Now" and vice
versa.

However, since commit 3a6e99cb8, options can no longer be edited once
the poll starts, so there's no risk of the option changing once somebody
has voted.

This means we can now store the ID of the option that has been voted.
That'll also help us deal with a bug introduced int 673ec075e, since
answers in different locales are not counted as the same answer. Note we
aren't dealing with this bug right now.

We're still keeping (and storing) the answer as well. There are two
reasons for that.

First, we might add an "open answer" type of questions in the future and
use this column for it.

Second, we've still got logic depending on the answer, and we need to be
careful when changing it because there are existing installations where
the answer is present but the option_id is not.

Note that we're using `dependent: nullify`. The reasoning is that, since
we're storing both the option_id and the answer text, we can still use
the answer text when removing the option. In practice, this won't matter
much, though, since we've got a validation rule that makes it impossible
to destroy options once the poll has started.

Also note we're still allowing duplicate records when the option is nil.
We need to do that until we've removed every duplicate record in the
database.
2024-06-26 20:20:24 +02:00
Javi Martín
03f89c9ca2 Move action to create answers to AnswersController
It was confusing to have the action to create an answer in
`QuestionsController#answer` while the action to destroy it was
`AnswersController#destroy`.
2024-06-26 20:20:24 +02:00
Javi Martín
9a840bb8d1 Remove unused code in poll questions controller
This code wasn't used since commit d9ad65875.
2024-06-26 20:20:24 +02:00