Commit Graph

20065 Commits

Author SHA1 Message Date
Javi Martín
62304b50e0 Remove non-existent action in management routes 2023-08-30 14:46:34 +02:00
Javi Martín
1d7a269408 Use a transaction when registering a vote
Otherwise it would be possible to increment the votes counter without
actually introducing the vote.
2023-08-30 14:46:34 +02:00
Javi Martín
9491b20314 Extract method to get vote counts by votable type 2023-08-30 14:46:34 +02:00
Javi Martín
0d35bddf9e Simplify finding the booth assignment for a voter 2023-08-30 14:46:34 +02:00
Javi Martín
28a90f05f8 Make installation details code easier to follow 2023-08-30 14:46:34 +02:00
Javi Martín
88f499d114 Simplify passing parameters in FollowsController 2023-08-30 14:46:34 +02:00
Javi Martín
9d74f06d24 Simplify loading resources in DraftVersionsController
We were using `prepend: true`, but it doesn't seem to be necessary.

We were also loading the draft versions twice in the index, so we can
remove the line loading them a second time.
2023-08-30 14:46:34 +02:00
dependabot[bot]
fd780b39fe Bump caxlsx from 3.2.0 to 3.4.1
Bumps [caxlsx](https://github.com/caxlsx/caxlsx) from 3.2.0 to 3.4.1.
- [Changelog](https://github.com/caxlsx/caxlsx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caxlsx/caxlsx/compare/v3.2.0...v3.4.1)

---
updated-dependencies:
- dependency-name: caxlsx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 12:15:41 +00:00
Javi Martín
3e2da29443 Merge pull request #5196 from consuldemocracy/dependabot/bundler/paranoia-2.6.2
Bump paranoia from 2.6.0 to 2.6.2
2023-08-30 14:14:46 +02:00
dependabot[bot]
3da41ed7b8 Bump paranoia from 2.6.0 to 2.6.2
Bumps [paranoia](https://github.com/rubysherpas/paranoia) from 2.6.0 to 2.6.2.
- [Release notes](https://github.com/rubysherpas/paranoia/releases)
- [Changelog](https://github.com/rubysherpas/paranoia/blob/core/CHANGELOG.md)
- [Commits](https://github.com/rubysherpas/paranoia/compare/v2.6.0...v2.6.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 11:48:01 +00:00
Javi Martín
5a4f622932 Merge pull request #5191 from consuldemocracy/dependabot/bundler/dalli-3.2.5
Bump dalli from 3.2.3 to 3.2.5
2023-08-30 13:41:44 +02:00
dependabot[bot]
b3133e6f2b Bump dalli from 3.2.3 to 3.2.5
Bumps [dalli](https://github.com/petergoldstein/dalli) from 3.2.3 to 3.2.5.
- [Changelog](https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/petergoldstein/dalli/compare/v3.2.3...v3.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 18:12:43 +00:00
Javi Martín
818d37ba87 Merge pull request #5189 from consuldemocracy/dependabot/bundler/launchy-2.5.2
Bump launchy from 2.5.0 to 2.5.2
2023-08-29 18:41:29 +02:00
dependabot[bot]
44b1fe0380 Bump launchy from 2.5.0 to 2.5.2
Bumps [launchy](https://github.com/copiousfreetime/launchy) from 2.5.0 to 2.5.2.
- [Changelog](https://github.com/copiousfreetime/launchy/blob/main/README.md)
- [Commits](https://github.com/copiousfreetime/launchy/compare/v2.5.0...v2.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 16:16:53 +00:00
Javi Martín
334cfe7355 Merge pull request #5187 from consuldemocracy/dependabot/bundler/pronto-eslint-0.11.1
Bump pronto-eslint from 0.11.0 to 0.11.1
2023-08-29 18:11:10 +02:00
dependabot[bot]
57c663c160 Bump pronto-eslint from 0.11.0 to 0.11.1
Bumps [pronto-eslint](https://github.com/mmozuras/pronto-eslint) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/mmozuras/pronto-eslint/releases)
- [Commits](https://github.com/mmozuras/pronto-eslint/compare/v0.11.0...v0.11.1)

---
updated-dependencies:
- dependency-name: pronto-eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 15:42:51 +00:00
Javi Martín
4df98f65f1 Merge pull request #5186 from consuldemocracy/dependabot/bundler/scss_lint-0.60.0
Bump scss_lint from 0.59.0 to 0.60.0
2023-08-29 17:40:57 +02:00
dependabot[bot]
d34a14771c Bump scss_lint from 0.59.0 to 0.60.0
Bumps [scss_lint](https://github.com/sds/scss-lint) from 0.59.0 to 0.60.0.
- [Release notes](https://github.com/sds/scss-lint/releases)
- [Changelog](https://github.com/sds/scss-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sds/scss-lint/compare/v0.59.0...v0.60.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 15:18:00 +00:00
Javi Martín
add4d3b80d Merge pull request #5185 from consuldemocracy/dependabot/bundler/acts_as_votable-0.14.0
Bump acts_as_votable from 0.13.2 to 0.14.0
2023-08-29 17:16:27 +02:00
dependabot[bot]
422258acb9 Bump acts_as_votable from 0.13.2 to 0.14.0
Bumps [acts_as_votable](https://github.com/ryanto/acts_as_votable) from 0.13.2 to 0.14.0.
- [Release notes](https://github.com/ryanto/acts_as_votable/releases)
- [Commits](https://github.com/ryanto/acts_as_votable/compare/v0.13.2...v0.14.0)

---
updated-dependencies:
- dependency-name: acts_as_votable
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 14:49:01 +00:00
Javi Martín
abc0e75c61 Merge pull request #5183 from consuldemocracy/dependabot/bundler/capistrano-3.17.3
Bump capistrano from 3.17.1 to 3.17.3
2023-08-29 16:46:33 +02:00
dependabot[bot]
b2eec088ba Bump capistrano from 3.17.1 to 3.17.3
Bumps [capistrano](https://github.com/capistrano/capistrano) from 3.17.1 to 3.17.3.
- [Release notes](https://github.com/capistrano/capistrano/releases)
- [Commits](https://github.com/capistrano/capistrano/compare/v3.17.1...v3.17.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 14:14:09 +00:00
Javi Martín
6b82f02840 Merge pull request #5182 from consuldemocracy/dependabot/bundler/mdl-0.12.0
Bump mdl from 0.11.0 to 0.12.0
2023-08-29 16:13:06 +02:00
dependabot[bot]
74713ffbb2 Bump mdl from 0.11.0 to 0.12.0
Note we need to update the indentation of nested unordered list due to a
change in MDL [1].

Bumps [mdl](https://github.com/mivok/markdownlint) from 0.11.0 to 0.12.0.
- [Changelog](https://github.com/markdownlint/markdownlint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mivok/markdownlint/compare/v0.11.0...v0.12.0)

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

[1] https://github.com/markdownlint/markdownlint/commit/67f8312aae

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 15:53:08 +02:00
Javi Martín
429b2905a0 Merge pull request #5181 from consuldemocracy/dependabot/bundler/omniauth-2.1.1
Bump omniauth from 2.1.0 to 2.1.1
2023-08-29 15:46:17 +02:00
dependabot[bot]
8d7d503410 Bump omniauth from 2.1.0 to 2.1.1
Bumps [omniauth](https://github.com/omniauth/omniauth) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/omniauth/omniauth/releases)
- [Commits](https://github.com/omniauth/omniauth/compare/v2.1.0...v2.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 13:07:06 +00:00
Javi Martín
d4eb32143a Merge pull request #5180 from consuldemocracy/dependabot/bundler/jquery-rails-4.6.0
Bump jquery-rails from 4.5.0 to 4.6.0
2023-08-29 15:05:51 +02:00
dependabot[bot]
db2d0bb800 Bump jquery-rails from 4.5.0 to 4.6.0
Bumps [jquery-rails](https://github.com/rails/jquery-rails) from 4.5.0 to 4.6.0.
- [Changelog](https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/jquery-rails/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: jquery-rails
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 12:25:15 +00:00
Javi Martín
49a937de00 Merge pull request #5153 from consuldemocracy/enable_dependabot_again
Enable Dependabot again
2023-08-29 14:23:54 +02:00
Javi Martín
5fcc5164b4 Merge pull request #5154 from consuldemocracy/multiline_rubocop
Add Rubocop rules for multiline statements
2023-08-28 11:34:19 +02:00
Javi Martín
58e8cf3ff3 Enable Dependabot again
We disabled Dependabot in commit a8d6b9b33 because it would
automatically create pull requests on every fork.

But since November 2022 Dependabot no longer behaves that way [1], so
now we can safely enable it without spamming every repository in our
community.

[1] https://github.blog/changelog/2022-11-07-dependabot-pull-requests-off-by-default-for-forks/
2023-08-18 14:57:29 +02:00
Javi Martín
c9676b8c3e Enable alignment-related rubocop rules
Even though we always follow these rules, this'll make it easier to run
Rubocop with `--autocorrect` when we're applying multiline rules.
2023-08-18 14:56:17 +02:00
Javi Martín
cbda85c48d Add and apply Style/LineEndConcatenation rule
We were already using it in most places.

Note that enabling this rule means we've got to change a few lines in
order to follow the LineEndStringConcatenationIndentation rule. In the
link list tests, the easiest way to do so was to use heredoc instead,
which IMHO improves readability over the previous version.
2023-08-18 14:56:17 +02:00
Javi Martín
96a0aa2a88 Add and apply LineContinuationSpacing rubocop rule
So now we're consistent when separating multiline strings.
2023-08-18 14:56:17 +02:00
Javi Martín
f5c2a3d4ef Add and apply BlockAlignment rubocop rule
This will make it easier to run rubocop with `--autocorrect` when
dealing with the LineLength rule.
2023-08-18 14:56:17 +02:00
Javi Martín
30befbc08a Remove obsolete code about banner images and styles
We forgot to remove it in commit 8066b96fe. We're removing it now
because these methods didn't follow the Layout/BlockAlignment rubocop
rule, which we're about to add.
2023-08-18 14:56:16 +02:00
Javi Martín
1a098dfcab Add and apply MultilineMethodCallBraceLayout rule
In order for this rule to work effectively when running `--autocorrect`,
we also need to enable the `ClosingParenthesisIndentation` rule.
2023-08-18 14:56:16 +02:00
Javi Martín
5b6de96241 Add and apply MultilineMethodCallIndentation rule 2023-08-18 14:56:16 +02:00
Javi Martín
629e208e9d Add and apply ArgumentAlignment rubocop rule
We're choosing the default `with_first_argument` style because it's the
one we use the most.
2023-08-18 14:56:16 +02:00
Javi Martín
32b1fc53e1 Add and appy MultilineOperationIndentation rule
This way it's easier to see when lines are part of multiline
statements and when they belong to `if` statements.
2023-08-18 14:56:16 +02:00
Javi Martín
8b13daad95 Add and apply rules for multi-line hashes
For the HashAlignment rule, we're using the default `key` style (keys
are aligned and values aren't) instead of the `table` style (both keys
and values are aligned) because, even if we used both in the
application, we used the `key` style a lot more. Furthermore, the
`table` style looks strange in places where there are both very long and
very short keys and sometimes we weren't even consistent with the
`table` style, aligning some keys without aligning other keys.

Ideally we could align hashes to "either key or table", so developers
can decide whether keeping the symmetry of the code is worth it in a
case-per-case basis, but Rubocop doesn't allow this option.
2023-08-18 14:56:16 +02:00
Javi Martín
97aca0cf95 Add and apply rules for multi-line arrays
We were already applying these rules in most cases.

Note we aren't enabling the `MultilineArrayLineBreaks` rule because
we've got places with many elements whire it isn't clear whether
having one element per line would make the code more readable.
2023-08-18 14:56:16 +02:00
Javi Martín
1cb6268d4e Add and apply Layout/ClosingHeredocIndentation rule 2023-08-18 14:56:16 +02:00
Javi Martín
09c63e354c Add and apply Layout/DotPosition rule
Since IRB has improved its support for multiline, the main argument
towars using a trailing dot no longer affects most people.

It still affects me, though, since I use Pry :), but I agree
leading dots are more readable, so I'm enabling the rule anyway.
2023-08-18 14:56:16 +02:00
Javi Martín
fd71ae5333 Merge pull request #5177 from consuldemocracy/release_2.0.1
Release version 2.0.1
2023-08-18 13:15:28 +02:00
Senén Rodero
e064475d69 Merge pull request #5176 from consuldemocracy/i18n_crowdin
Update translations from Crowdin
2023-08-18 12:00:52 +02:00
Javi Martín
20e577d7c8 Release version 2.0.1 2023-08-17 21:13:48 +02:00
Consul Bot
582f8506c5 Update translations from Crowdin 2023-08-17 18:17:19 +02:00
Alberto
b34cfaac1b Replace back link on budget results 2023-08-10 18:32:54 +02:00
Javi Martín
74b07def8f Merge pull request #5156 from consuldemocracy/fix_rubocop
Fix Rubocop convention offenses
2023-08-09 13:35:56 +02:00